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

Add script based setup to join merge devnet #3514

Merged
merged 11 commits into from
Dec 16, 2021
Merged

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Dec 12, 2021

Easy script to join the merge devnet(s)

This is a setup to run and join the devnet with a single shell command. This script will pull the appropriate images and config and spin up the EL client and lodestar.

Requirements
  1. docker
  2. git
  3. A bash shell
Just run the script with arguments
cd kintsugi/devnets
./setup.sh --dataDir kintsugi-data --elClient geth --devnetVars ./kintsugi.vars [--dockerWithSudo --withTerminal "gnome-terminal --disable-factory --"]
Example scenarios
  1. Run with separate terminals launched & attached (best for testing in local) :
    ./setup.sh --dataDir kintsugi-data --elClient nethermind --devnetVars ./kintsugi.vars --withTerminal "gnome-terminal --disable-factory --" --dockerWithSudo
  2. Run in-terminal attached with logs interleaved (best for testing in remote shell) :
    ./setup.sh --dataDir kintsugi-data --elClient nethermind --devnetVars ./kintsugi.vars --dockerWithSudo
  3. Run detached (best for leaving it to run, typically after testing 1 or 2):
    ./setup.sh --dataDir kintsugi-data --elClient nethermind --devnetVars ./kintsugi.vars --detached --dockerWithSudo

You can alternate between geth and nethermind to experiment with the ELs being out of sync ( and catching up) with lodestar.

Script parameters help
  1. dataDir: Where you want the script and client's configuration data to be setup. Should be non-existent one for the first run. (The directory if already present will skip fetching the configuration, assuming it has done previously). You can also clean indivizual directories of CL/EL between the re-runs.
  2. elClient: Which EL client you want, currently working with geth and nethermind
  3. devnetVars: Contains the configuration specific to a devnet, like images, or urls for EL/CL to interact. Will be updated with new vars.
  4. dockerWithSudo(optional): Provide this argument if your docker needs a sudo prefix
  5. --withTerminal(optional): Provide the terminal command prefix for CL and EL processes to run in your favourite terminal.
    You may use an alias or a terminal launching script as long as it waits for the command it runs till ends and then closes.If not provided, it will launch the docker processes in in-terminal mode.
  6. --detached(optional): By default the script will wait for processes and use user input (ctrl +c) to end the processes, however you can pass this option to skip this behavior and just return, for e.g. in case you just want to leave it running.

Only one of --withTerminal or --detached should be provided.

@codeclimate
Copy link

codeclimate bot commented Dec 12, 2021

Code Climate has analyzed commit 2703325 and detected 0 issues on this pull request.

View more on Code Climate.

@codecov
Copy link

codecov bot commented Dec 12, 2021

Codecov Report

Merging #3514 (2703325) into master (20409fe) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3514   +/-   ##
=======================================
  Coverage   37.57%   37.57%           
=======================================
  Files         310      310           
  Lines        8251     8251           
  Branches     1272     1272           
=======================================
  Hits         3100     3100           
  Misses       5003     5003           
  Partials      148      148           

@g11tech g11tech changed the title A easy script based setup to spinup devnet An easy script based setup to spinup devnet Dec 12, 2021
@g11tech g11tech changed the title An easy script based setup to spinup devnet An easy script based setup to join merge devnet Dec 12, 2021
@dapplion dapplion changed the title An easy script based setup to join merge devnet Add script based setup to join merge devnet Dec 12, 2021
@g11tech g11tech force-pushed the devnets branch 2 times, most recently from ce7cde3 to 0fba75b Compare December 14, 2021 07:53
wemeetagain
wemeetagain previously approved these changes Dec 15, 2021
dapplion
dapplion previously approved these changes Dec 15, 2021
twoeths
twoeths previously approved these changes Dec 16, 2021
@dapplion dapplion merged commit 2a06574 into ChainSafe:master Dec 16, 2021
@g11tech g11tech deleted the devnets branch December 16, 2021 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants