Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish the perf project #1753

Merged
merged 8 commits into from
Oct 27, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
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
22 changes: 22 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,16 @@ jobs:
path: current_release/
- run: IMAGE_NAME=$WATCHER_IMAGE_NAME sh .circleci/ci_publish.sh

publish_perf:
machine:
image: ubuntu-1604:201903-01
environment:
PERF_IMAGE_NAME: "omisego/perf"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious do we want to start migrate the naming to omgnetwork?

Copy link
Contributor Author

@ayrat555 ayrat555 Oct 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. All docker images have the same prefix
cc @achiurizo @InoMurko

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not aware of a way to migrate a docker hub account to a new namespace! (which is what omisego is)

steps:
- checkout
- run: make docker-perf IMAGE_NAME=$PERF_IMAGE_NAME
- run: IMAGE_NAME=$PERF_IMAGE_NAME sh .circleci/ci_publish.sh

publish_watcher_info:
machine:
image: ubuntu-1604:201903-01
Expand Down Expand Up @@ -1099,6 +1109,18 @@ workflows:
audit_deps
]
filters: *master_and_version_branches_and_all_tags

- publish_perf:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably like publish_watcher, only publish after some required tests have been done? eg the local docker perf test one so we can make sure this version of perf is runnable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added requires: [test_docker_compose_performance]

requires: [test_docker_compose_performance]
filters:
branches:
only:
- master
# vMAJOR.MINOR (e.g. v0.1, v0.2, v1.0, v2.1, etc.)
- /^v[0-9]+\.[0-9]+/
tags:
only:
- /.+/
# Increase chart version for master, this will end up trigger deployment on dev
- increase_chart_version_watcher_master:
requires: [publish_watcher, publish_watcher_info]
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,9 @@ docker-watcher: docker-watcher-prod docker-watcher-build
docker-watcher_info: docker-watcher_info-prod docker-watcher_info-build
docker-child_chain: docker-child_chain-prod docker-child_chain-build

docker-perf:
docker build -f ./priv/perf/Dockerfile -t $(IMAGE_NAME) .

docker-build: docker-watcher docker-watcher_info docker-child_chain

docker-push: docker
Expand Down
4 changes: 2 additions & 2 deletions apps/omg_eth/test/support/dev_geth.ex
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ defmodule OMG.Eth.DevGeth do

waiting_task
|> Task.async()
|> Task.await(30_000)
|> Task.await(90_000)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious what is leading to this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dev geth is timing out which causes ci failures. I increased it so dev geth has more time to prepare itself


pid
end
Expand All @@ -112,7 +112,7 @@ defmodule OMG.Eth.DevGeth do
if ready?(pid) do
:ok
else
Process.sleep(1_000)
Process.sleep(2_000)
wait_for_rpc(pid)
end
end
Expand Down
41 changes: 41 additions & 0 deletions priv/perf/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
FROM elixir:1.10.4-alpine

RUN apk add git curl bash maven jq \
autoconf \
automake \
gmp \
gmp-dev \
libtool \
gcc \
cmake \
gnupg \
alpine-sdk

COPY ./ ./elixir-omg

WORKDIR ./elixir-omg

RUN mkdir -p priv/openapitools \
&& curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/v4.3.1/bin/utils/openapi-generator-cli.sh > priv/openapitools/openapi-generator-cli \
&& chmod u+x priv/openapitools/openapi-generator-cli

RUN priv/openapitools/openapi-generator-cli generate \
-i https://raw.githubusercontent.com/omgnetwork/omg-childchain-v1/master/apps/omg_child_chain_rpc/priv/swagger/operator_api_specs.yaml \
-g elixir \
-o priv/perf/apps/child_chain_api/

RUN priv/openapitools/openapi-generator-cli generate \
-i apps/omg_watcher_rpc/priv/swagger/security_critical_api_specs.yaml \
-g elixir \
-o priv/perf/apps/watcher_security_critical_api/

RUN priv/openapitools/openapi-generator-cli generate \
-i apps/omg_watcher_rpc/priv/swagger/info_api_specs.yaml \
-g elixir \
-o priv/perf/apps/watcher_info_api/

RUN mix local.hex --force && mix local.rebar --force

WORKDIR ./priv/perf

RUN mix deps.get && mix compile