Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
17e2ba8
set grace period to 1m to give enough time to the engine to stop runn…
NicolasMahe Mar 28, 2020
2c3cef9
Merge branch 'dev' into feature/graceful-stop
Mar 30, 2020
39fcc1a
Merge branch 'dev' into feature/graceful-stop
Apr 10, 2020
4352b2b
Merge pull request #1760 from mesg-foundation/feature/graceful-stop
May 2, 2020
9121f1a
Bump github.com/sirupsen/logrus from 1.4.2 to 1.5.0
dependabot-preview[bot] May 2, 2020
e4981f7
Bump github.com/spf13/viper from 1.6.2 to 1.6.3
dependabot-preview[bot] May 2, 2020
da8b25a
Bump google.golang.org/grpc from 1.28.0 to 1.29.1
dependabot-preview[bot] May 2, 2020
5212a3c
Merge pull request #1745 from mesg-foundation/dependabot/go_modules/g…
May 2, 2020
bb1cc3d
Merge pull request #1777 from mesg-foundation/dependabot/go_modules/g…
May 2, 2020
2968c39
Merge pull request #1794 from mesg-foundation/dependabot/go_modules/g…
May 2, 2020
80d225e
Bump github.com/golang/protobuf from 1.3.4 to 1.4.0
dependabot-preview[bot] May 2, 2020
33617e3
update protoc to v 3.11.4
NicolasMahe May 2, 2020
fb77e47
Merge pull request #1782 from mesg-foundation/dependabot/go_modules/g…
May 2, 2020
159e3e5
Bump github.com/prometheus/client_golang from 1.5.0 to 1.6.0
dependabot-preview[bot] May 2, 2020
c7aa751
run go mod tidy
NicolasMahe May 2, 2020
4863ee9
Merge pull request #1800 from mesg-foundation/dependabot/go_modules/g…
May 2, 2020
f60d843
Add tx commands for modules execution, instance, ownership, process, …
NicolasMahe May 1, 2020
fd297f7
add orchestrator cmd
NicolasMahe May 3, 2020
9680101
fix xrand init
NicolasMahe May 3, 2020
83adbba
add in memory keybase new function to keybase
NicolasMahe May 3, 2020
74dc36c
update daemon cli name and default folder
NicolasMahe May 3, 2020
045bc70
rename in cosmos lcd and rpc clients minGasPrices by simply gasPrices
NicolasMahe May 3, 2020
8068a7b
update readme
NicolasMahe May 3, 2020
1fe1de4
Merge pull request #1802 from mesg-foundation/feature/lcd-rpc-naming
antho1404 May 3, 2020
db2c657
Merge pull request #1803 from mesg-foundation/feature/update-readme
May 4, 2020
f9df966
Merge branch 'dev' into feature/write-commands
antho1404 May 5, 2020
6431f8e
Merge pull request #1798 from mesg-foundation/feature/write-commands
antho1404 May 5, 2020
1737ed4
Merge branch 'dev' into feature/orchestrator-cli
antho1404 May 5, 2020
040cf13
improve error message in orchestrator command
NicolasMahe May 5, 2020
bee4221
add Dockerfile for cli and add command in makefile to build it
NicolasMahe May 5, 2020
98cd898
Update Dockerfile.cli
May 5, 2020
6f413eb
fix runner e2e that block the tests on error
NicolasMahe May 4, 2020
9edc85d
Merge branch 'feature/orchestrator-cli' into feature/dev-image
NicolasMahe May 5, 2020
6ac069e
generate a dev chain. save every info in dev-chain folder
NicolasMahe May 5, 2020
6025ee5
Add dev cli dockerfile
NicolasMahe May 5, 2020
9760e71
update e2e to work with dev cli image
NicolasMahe May 5, 2020
562a5e7
add suggestion from code review
NicolasMahe May 5, 2020
b4c8c43
Merge pull request #1801 from mesg-foundation/feature/orchestrator-cli
May 5, 2020
df2fa1a
Merge pull request #1809 from mesg-foundation/feature/fix-e2e-error-b…
May 5, 2020
f75159d
Merge pull request #1808 from mesg-foundation/feature/cli-image
May 5, 2020
3ed9081
Merge branch 'dev' into feature/dev-image
May 5, 2020
f72dc39
revert golang/protobuf to v1.3.5 and prometheus/client_golang to v1.5.1
NicolasMahe May 6, 2020
35fc439
Merge pull request #1811 from mesg-foundation/revert/update-protobuf
antho1404 May 7, 2020
d1d4ed0
Merge branch 'dev' into feature/dev-image
NicolasMahe May 7, 2020
0f1a698
remove all unused go files
NicolasMahe May 6, 2020
8b5f247
update dockerfile and scripts to switch all to cli based engine
NicolasMahe May 6, 2020
4b6f019
poll instead of sleep in run-e2e script
NicolasMahe May 8, 2020
c7249a7
Merge pull request #1806 from mesg-foundation/feature/dev-image
May 8, 2020
096cc7a
Merge branch 'dev' into feature/remove-core
May 8, 2020
c0f2bfd
Merge pull request #1810 from mesg-foundation/feature/remove-core
May 8, 2020
6db5231
update e2e test to use docker container instead of docker service
NicolasMahe May 8, 2020
2ec4b30
add missing step to pull image if it doesn't exist locally
NicolasMahe May 8, 2020
29120ca
make stopGracePeriod and maximumRetryCount configurable in container …
NicolasMahe May 11, 2020
7345fe5
Merge pull request #1817 from mesg-foundation/feature/e2e-docker-cont…
May 11, 2020
abc499d
switch to tendermint logger
NicolasMahe May 11, 2020
a91b4b7
transform log to a more state transition approach
NicolasMahe May 11, 2020
102cd2f
Merge pull request #1812 from mesg-foundation/feature/orchestrator-logs
May 12, 2020
1adf685
add v0.24.0 to changelog
NicolasMahe May 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ run_on_machine: &run_on_machine

run_on_docker: &run_on_docker
docker:
- image: circleci/golang:1.13.0
- image: circleci/golang:1.13.10

go_path: &go_path /tmp/go/path

Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
name: "Install Go"
command: |
sudo rm -rf /usr/local/go
curl -sSL "https://dl.google.com/go/go1.13.linux-amd64.tar.gz" | sudo tar -xz -C /usr/local/
curl -sSL "https://dl.google.com/go/go1.13.10.linux-amd64.tar.gz" | sudo tar -xz -C /usr/local/
echo "export PATH=$PATH:/usr/local/go/bin" >> $BASH_ENV
- run: docker swarm init
- <<: *restore_go_cache
Expand All @@ -79,33 +79,33 @@ jobs:
- image: golangci/golangci-lint:v1.21
steps:
- checkout
- run: make lint
- run: golangci-lint

"publish_docker_dev":
"publish_docker_unstable":
<<: *run_on_machine
steps:
- checkout
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run: make docker-publish-dev version=`echo $CIRCLE_SHA1 | cut -c1-7`
- run: make publish-docker-unstable version=`echo $CIRCLE_SHA1 | cut -c1-7`

"publish_docker_prod":
<<: *run_on_machine
steps:
- checkout
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run: make docker-publish version=$CIRCLE_TAG
- run: make publish-docker-prod version=$CIRCLE_TAG

"release_cli_dev":
"release_cli_unstable":
<<: *run_on_docker
steps:
- checkout
- run: make publish-cmds version="dev build `echo $CIRCLE_SHA1 | cut -c1-7`" release-type=dev
- run: make publish version="`echo $CIRCLE_SHA1 | cut -c1-7`" release-type=unstable

"release_cli_prod":
<<: *run_on_docker
steps:
- checkout
- run: make publish-cmds version=$CIRCLE_TAG release-type=prod
- run: make publish version=$CIRCLE_TAG release-type=prod

workflows:
version: 2
Expand Down Expand Up @@ -133,7 +133,7 @@ workflows:
- "test"
- "lint"

release_dev:
release_unstable:
jobs:
- "lint":
filters:
Expand All @@ -151,10 +151,10 @@ workflows:
requires:
- "test"
- "lint"
- "publish_docker_dev":
- "publish_docker_unstable":
requires:
- "test_e2e"
- "release_cli_dev":
- "release_cli_unstable":
requires:
- "test_e2e"

Expand Down
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ Dockerfile

# build
/bin
!/bin/engine

# repo files
README.md
Expand All @@ -11,7 +10,6 @@ CONTRIBUTING.md
schema1.svg
.github

/scripts
/examples

# test & debug files
Expand Down
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Changelog

## [v0.24.0](https://github.com/mesg-foundation/engine/releases/tag/v0.24.0)

#### Breaking Changes

- ([#1810](https://github.com/mesg-foundation/engine/pull/1810)) Switch to CLI based Engine.

#### Added

- ([#1798](https://github.com/mesg-foundation/engine/pull/1798)) Add tx commands for service, process, execution and runner modules.
- ([#1801](https://github.com/mesg-foundation/engine/pull/1801)) Add orchestrator command to CLI.
- ([#1806](https://github.com/mesg-foundation/engine/pull/1806)) Create pre-configured dev docker image.
- ([#1808](https://github.com/mesg-foundation/engine/pull/1808)) Add cli dockerfile.
- ([#1812](https://github.com/mesg-foundation/engine/pull/1812)) Add logs to orchestrator.

#### Changed

- ([#1802](https://github.com/mesg-foundation/engine/pull/1802)) Rename in cosmos lcd and rpc clients minGasPrices by simply gasPrices.
- ([#1803](https://github.com/mesg-foundation/engine/pull/1803)) Update readme.
- ([#1817](https://github.com/mesg-foundation/engine/pull/1817)) Use docker container in e2e tests.

#### Fixed

- ([#1760](https://github.com/mesg-foundation/engine/pull/1760)) Set grace period to 1m in dev script.
- ([#1809](https://github.com/mesg-foundation/engine/pull/1809)) Fix runner e2e that block the tests on error.

#### Dependencies

- ([#1745](https://github.com/mesg-foundation/engine/pull/1745)) Bump github.com/sirupsen/logrus from 1.4.2 to 1.5.0.
- ([#1777](https://github.com/mesg-foundation/engine/pull/1777)) Bump github.com/spf13/viper from 1.6.2 to 1.6.3.
- ([#1782](https://github.com/mesg-foundation/engine/pull/1782)) Bump github.com/golang/protobuf from 1.3.4 to 1.4.0.
- ([#1794](https://github.com/mesg-foundation/engine/pull/1794)) Bump google.golang.org/grpc from 1.28.0 to 1.29.1.
- ([#1800](https://github.com/mesg-foundation/engine/pull/1800)) Bump github.com/prometheus/client_golang from 1.5.0 to 1.6.0.
- ([#1811](https://github.com/mesg-foundation/engine/pull/1811)) Revert golang/protobuf to v1.3.5 and prometheus/client_golang to v1.5.1.

## [v0.23.0](https://github.com/mesg-foundation/engine/releases/tag/v0.23.0)

#### Added
Expand Down
28 changes: 17 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
# base Go image version.
FROM golang:1.13.0-stretch AS build

WORKDIR /project
# base Go image version for building the binaries
FROM golang:1.13.10 AS build
WORKDIR /app

# install dependencies
COPY go.mod go.sum ./
RUN go mod download

COPY . .
ARG version
RUN go build -mod=readonly -o ./bin/engine -ldflags="-X 'github.com/mesg-foundation/engine/version.Version=$version'" core/main.go

RUN go build -mod=readonly -o ./bin/mesg-cli -ldflags="-s -w -X 'github.com/cosmos/cosmos-sdk/version.Name=mesg' -X 'github.com/cosmos/cosmos-sdk/version.ServerName=mesg-daemon' -X 'github.com/cosmos/cosmos-sdk/version.ClientName=mesg-cli' -X 'github.com/cosmos/cosmos-sdk/version.Version=$version'" ./cmd/mesg-cli/
RUN go build -mod=readonly -o ./bin/mesg-daemon -ldflags="-s -w -X 'github.com/cosmos/cosmos-sdk/version.Name=mesg' -X 'github.com/cosmos/cosmos-sdk/version.ServerName=mesg-daemon' -X 'github.com/cosmos/cosmos-sdk/version.ClientName=mesg-cli' -X 'github.com/cosmos/cosmos-sdk/version.Version=$version'" ./cmd/mesg-daemon/

# ubuntu image with binaries for distribution
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates=20180409 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
apt-get install -y --no-install-recommends ca-certificates=20180409 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY --from=build /project/bin/engine .
CMD ["./engine"]
ENV PATH="/app:${PATH}"

COPY --from=build /app/bin/mesg-cli .
COPY --from=build /app/bin/mesg-daemon .

CMD ["mesg-daemon", "start"]
15 changes: 8 additions & 7 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates=20180409 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY ./bin/engine .
CMD [ "./engine" ]
ARG from
FROM $from

COPY ./dev-chain/cli /root/.mesg-cli
COPY ./dev-chain/validator /root/.mesg-node
COPY ./scripts/dev-starter.sh .

CMD ["bash", "dev-starter.sh"]
4 changes: 2 additions & 2 deletions Dockerfile.tools
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# base Go image version.
FROM golang:1.13.0-stretch
FROM golang:1.13.10

WORKDIR /project

Expand All @@ -9,7 +9,7 @@ RUN apt-get update -y && \
rm -rf /var/lib/apt/lists/*

# protobuf(protoc) version.
ARG protobuf=3.9.1
ARG protobuf=3.11.4
ARG gogoprotobuf=1.3.1

# install protobuf(protoc).
Expand Down
115 changes: 55 additions & 60 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,92 +1,87 @@
.PHONY: all build build-cmd-cosmos changelog check-version clean clean-build clean-docker dep dev dev-mon dev-start dev-stop docker-build docker-dev docker-publish docker-publish-dev docker-tools genesis lint protobuf test publish-cmds
.PHONY: build build-docker publish publish-docker-prod publish-docker-unstable test e2e dep lint build-tools protobuf changelog clean dev dev-mon

version ?= local
MAJOR_VERSION := $(shell echo $(version) | cut -d . -f 1)
MINOR_VERSION := $(shell echo $(version) | cut -d . -f 1-2)
PATCH_VERSION := $(version)

all: clean lint build test e2e
# Build

check-version:
ifndef version
$(error version is undefined)
endif
build: dep
./scripts/build-cli.sh "$(version)"

docker-build: check-version
build-docker:
docker build \
--build-arg version=$(PATCH_VERSION) \
-t mesg/engine:$(MAJOR_VERSION) \
-t mesg/engine:$(MINOR_VERSION) \
-t mesg/engine:$(PATCH_VERSION) \
-t mesg/engine:latest \
--build-arg version=$(version) \
-t mesg/engine:$(version) \
.
docker build \
-f ./Dockerfile.dev \
--build-arg from=mesg/engine:$(version) \
-t mesg/engine:$(version)-dev \
.

docker-dev: dep
./scripts/build-engine.sh
# Publish

docker-publish: docker-build
docker push mesg/engine:$(MAJOR_VERSION)
publish: build
./scripts/publish-cli.sh "$(version)" "$(release-type)"

publish-docker-prod: build-docker
docker tag mesg/engine:$(version) mesg/engine:$(MINOR_VERSION)
docker tag mesg/engine:$(version) mesg/engine:$(MAJOR_VERSION)
docker tag mesg/engine:$(version) mesg/engine:latest

docker push mesg/engine:$(version)
docker push mesg/engine:$(MINOR_VERSION)
docker push mesg/engine:$(PATCH_VERSION)
docker push mesg/engine:$(MAJOR_VERSION)
docker push mesg/engine:latest

docker-publish-dev: check-version
docker build -t mesg/engine:dev --build-arg version=$(version) .
docker push mesg/engine:dev
docker tag mesg/engine:$(version)-dev mesg/engine:$(MINOR_VERSION)-dev
docker tag mesg/engine:$(version)-dev mesg/engine:$(MAJOR_VERSION)-dev
docker tag mesg/engine:$(version)-dev mesg/engine:latest-dev

docker-tools:
docker build -t mesg/tools:local -f Dockerfile.tools .

dev: docker-dev
- ./scripts/dev.sh
docker push mesg/engine:$(version)-dev
docker push mesg/engine:$(MINOR_VERSION)-dev
docker push mesg/engine:$(MAJOR_VERSION)-dev
docker push mesg/engine:latest-dev

dev-mon: docker-dev
- ./scripts/dev.sh -m
publish-docker-unstable: build-docker
docker tag mesg/engine:$(version) mesg/engine:unstable
docker push mesg/engine:unstable

dev-start: docker-dev
./scripts/dev.sh -q
docker tag mesg/engine:$(version)-dev mesg/engine:unstable-dev
docker push mesg/engine:unstable-dev

dev-stop: docker-dev
./scripts/dev.sh -m stop
# Test

dep:
go mod download
test: dep
go test -short -mod=readonly -v -coverprofile=coverage.txt ./...

build: check-version dep
go build -mod=readonly -o ./bin/engine -ldflags="-X 'github.com/mesg-foundation/engine/version.Version=$(version)'" core/main.go
e2e: build-docker
./scripts/run-e2e.sh "$(version)"

publish-cmds: check-version dep
./scripts/publish-cmds.sh "$(version)" "$(release-type)"
dev: build-docker
./scripts/dev.sh "$(version)"

build-cmd: dep
go build -mod=readonly -o ./bin/mesg-cli ./cmd/mesg-cli/
go build -mod=readonly -o ./bin/mesg-daemon ./cmd/mesg-daemon/
dev-mon: build-docker
./scripts/dev.sh "$(version)" "monitoring"

e2e: docker-dev
./scripts/run-e2e.sh
# MISC

test: dep
go test -short -mod=readonly -v -coverprofile=coverage.txt ./...
dep:
go mod download

lint:
golangci-lint run
docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v1.21 golangci-lint run

protobuf: docker-tools
build-tools:
docker build -t mesg/tools:local -f Dockerfile.tools .

protobuf: build-tools
docker run --rm -v $(PWD):/project mesg/tools:local ./scripts/build-proto.sh

changelog:
./scripts/changelog.sh $(milestone)

clean-build:
clean:
- rm -rf bin

clean-docker:
- docker image rm \
mesg/engine:$(version) \
mesg/engine:latest \
mesg/engine:local \
mesg/engine:dev 2>/dev/null

clean: clean-build clean-docker

genesis:
go run internal/tools/gen-genesis/main.go --path $(path) --chain-id $(chain-id) --validators $(validators)
- docker image rm $(docker images | grep 'mesg')
Loading