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

Create pre-configured dev docker image #1806

Merged
merged 7 commits into from
May 8, 2020
Merged

Create pre-configured dev docker image #1806

merged 7 commits into from
May 8, 2020

Conversation

NicolasMahe
Copy link
Member

@NicolasMahe NicolasMahe commented May 5, 2020

dependent on #1801 and #1808

related to #1815

  • Added a dev chain in the folder dev-chain.
  • Added a dockerfile that use configure the "default" image to a dev image using the generated dev chain
    • This image is starting internally 3 processes by using a custom script that to the following:
      • if one is dead: it terminates all other processes and exit with an error code
      • if the script is terminated (by docker for example) then its terminates processes and exit without error
  • Update e2e tests to use it

@NicolasMahe NicolasMahe self-assigned this May 5, 2020
@NicolasMahe NicolasMahe changed the title dev image Create pre-configured dev docker image May 5, 2020
@NicolasMahe NicolasMahe requested a review from antho1404 May 5, 2020 10:41
@NicolasMahe NicolasMahe marked this pull request as ready for review May 5, 2020 10:41
@NicolasMahe NicolasMahe added release:add Pull requests that add something and removed waiting dependent pr labels May 5, 2020
@@ -70,7 +70,7 @@ jobs:
- run: docker swarm init
- <<: *restore_go_cache
- <<: *restore_go_path
- run: make e2e
- run: make e2e version=`echo $CIRCLE_SHA1 | cut -c1-7`
Copy link
Member Author

Choose a reason for hiding this comment

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

this is reverted in the next PR (i set a default value to version)

@NicolasMahe NicolasMahe added this to the next milestone May 6, 2020
scripts/run-e2e.sh Outdated Show resolved Hide resolved
ARG from
FROM $from

COPY ./dev-chain/cli /root/.mesg-cli
Copy link
Member

Choose a reason for hiding this comment

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

can't we just generate all the commands in the docker file instead of copy the files. This way we don't have to store and maintain the files and we can still have a deterministic chain with mnemonic as args of the docker.

I'm afraid that we will have a lot of issues if we do some migration of the genesis

Copy link
Member Author

Choose a reason for hiding this comment

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

That's could be possible but I think there will be some issue with the way the cosmos commands takes password: there is not password flag and the passwords are read directly from stdin.
I would like to do this (if possible) in another PR.

There will not be any migration of genesis as this dev version is intended to be used on temp volume that are discarded at every start/stop of the associated docker.

Copy link
Member

Choose a reason for hiding this comment

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

The migration I'm talking about is if we add a new parameter and the structure of the genesis changes for some reasons. It would be better to re-generate it all the time or at least have tests to ensure that breaking changes on the genesis will be changed on the dev directory. But otherwise yes a script if possible would be nice in another PR but not a priority

Copy link
Member Author

Choose a reason for hiding this comment

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

In this current version, if the genesis is not valid, then the e2e tests will breaks.

scripts/run-e2e.sh Show resolved Hide resolved
scripts/run-e2e.sh Outdated Show resolved Hide resolved
scripts/dev-cli.sh Show resolved Hide resolved
scripts/dev-cli.sh Show resolved Hide resolved
@NicolasMahe NicolasMahe merged commit c7249a7 into dev May 8, 2020
@NicolasMahe NicolasMahe deleted the feature/dev-image branch May 8, 2020 04:49
This was referenced May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:add Pull requests that add something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants