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

Added automatic testnet command #42

Merged
merged 5 commits into from
Nov 21, 2019
Merged

Conversation

RiccardoM
Copy link
Contributor

Description

Added the localnet-start and localnet-stop commands which allow to create a local 4-node testnet using a Docker image.
Taken and adapted from the gaia repo.

Closes #33

Checklist

  • Targeted PR against correct branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote tests
  • Re-reviewed Files changed in the Github PR explorer

@RiccardoM RiccardoM added the kind/enhancement Enhance an already existing feature; no "New feature" to add label Nov 19, 2019
@RiccardoM RiccardoM added this to the v0.1.0 milestone Nov 19, 2019
@RiccardoM RiccardoM requested a review from kwunyeung November 19, 2019 08:34
@codecov-io
Copy link

codecov-io commented Nov 19, 2019

Codecov Report

Merging #42 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop      #42   +/-   ##
========================================
  Coverage    81.47%   81.47%           
========================================
  Files           13       13           
  Lines          502      502           
========================================
  Hits           409      409           
  Misses          84       84           
  Partials         9        9

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 94d641b...4b25c40. Read the comment docs.

README.md Outdated
#### Configuration

The `make localnet-start` creates files for a 4-node testnet in `./build` by
calling the `demosd testnet` command. This outputs a handful of files in the
Copy link
Contributor

Choose a reason for hiding this comment

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

desmosd testnet

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks for the heads up

# Makefile for the "desmosd" docker image.

all:
docker build --tag desmos-labs/desmosdnode desmosdnode
Copy link
Contributor

Choose a reason for hiding this comment

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

The organization I created on Docker Hub is desmoslabs (https://hub.docker.com/orgs/desmoslabs). I think the tag has to be desmoslabs/desmosdnode here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed it!

Copy link
Contributor

@kwunyeung kwunyeung left a comment

Choose a reason for hiding this comment

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

I got this error

docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: \"/usr/bin/wrapper.sh\": permission denied": unknown.

when I run the command. Maybe some setup in the docker file. I don't get this error in gaia local testnet.

- Fixed some typo into the README
- Updated the chmod index of wrapper.sh
- Updated the Docker image organization name

Signed-off-by: RiccardoM <[email protected]>
Copy link
Contributor Author

@RiccardoM RiccardoM left a comment

Choose a reason for hiding this comment

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

I got this error

docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: \"/usr/bin/wrapper.sh\": permission denied": unknown.

when I run the command. Maybe some setup in the docker file. I don't get this error in gaia local testnet.

I think it was due to a missing execute permission on the file. I've updated the index adding chmod=+x and should work properly now

@RiccardoM RiccardoM requested a review from kwunyeung November 20, 2019 06:38
@RiccardoM RiccardoM mentioned this pull request Nov 20, 2019
4 tasks
Copy link
Contributor

@kwunyeung kwunyeung left a comment

Choose a reason for hiding this comment

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

It's still not working with the permission denied error. I don't understand why the permission is not preserved. I tried adding RUN chmod +x /usr/bin/wrapper.sh to the Dockerfile before and after the ENTREPOINT but still not working.

Actually this doesn't affect the functionality of the node. We can still merge this and #44 and tag our v0.1.0 for testnet and revisit this again later. What do you think?

@RiccardoM
Copy link
Contributor Author

Yeah I'm fine with merging this and opening an issue for the specific error

@kwunyeung kwunyeung merged commit 8fdb136 into develop Nov 21, 2019
@RiccardoM RiccardoM deleted the riccardo/docker-testnet branch November 21, 2019 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Enhance an already existing feature; no "New feature" to add
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add generate testnet scripts
3 participants