nimbus-eth2/docker/shared_testnet
Ștefan Talpalaru 3cd14c44e6
docker/shared_testnet/altona_validators.sh
2020-06-29 17:22:36 +02:00
..
Dockerfile shared_testnet: fix Dockerfile 2020-06-26 23:42:02 +02:00
Makefile new Docker image for shared testnets 2020-06-26 17:26:18 +02:00
README.md shared_testnet: docs 2020-06-29 13:38:26 +02:00
altona_validators.sh docker/shared_testnet/altona_validators.sh 2020-06-29 17:22:36 +02:00
entry_point.sh shared_testnet/entry_point.sh: "--network" option 2020-06-29 15:10:49 +02:00
validator_keys.sh shared_testnet: support newlines in options 2020-06-28 18:18:49 +02:00

README.md

local testing

From the "nim-beacon-chain" repo (top-level dir):

make -C docker/shared_testnet NETWORK=witti build
mkdir tmp
docker run --rm --mount type=bind,source="$(pwd)"/tmp,target=/root/.cache/nimbus --name testnet2 statusteam/nimbus_beacon_node:testnet2 --build
ls -l tmp/nim-beacon-chain/build
docker run --rm --mount type=bind,source="$(pwd)"/tmp,target=/root/.cache/nimbus --name testnet2 -p 127.0.0.1:8008:8008 -p 9000:9000 statusteam/nimbus_beacon_node:testnet2 --run -- --metrics-address=0.0.0.0

# from another terminal
docker ps
docker stop testnet2

# when you're happy with the Docker image:
make -C docker/shared_testnet NETWORK=witti push

setting up remote servers

From the "infra-nimbus" repo:

git pull
ansible-galaxy install -g -f -r ansible/requirements.yml
ansible-playbook ansible/nimbus.yml -i ansible/inventory/test -t beacon-node -u YOUR_USER -K -l nimbus-slaves[5:8]

# faster way to pull the Docker image and recreate the containers (this also stops any running container)
ansible nimbus-slaves[5:8] -i ansible/inventory/test -u YOUR_USER -o -m shell -a "echo; cd /docker/beacon-node-testnet2-1; docker-compose --compatibility pull; docker-compose --compatibility up --no-start; echo '---'" | sed 's/\\n/\n/g'

# build beacon_node in an external volume
ansible nimbus-slaves[5:8] -i ansible/inventory/test -u YOUR_USER -o -m shell -a "echo; cd /docker/beacon-node-testnet2-1; docker-compose --compatibility run --rm beacon_node --build; echo '---'" | sed 's/\\n/\n/g'

create and copy validator keys

Back up "build/data/shared_witti_0", if you need to. It will be deleted.

From the nim-beacon-chain repo:

# If you have "ignorespace" or "ignoreboth" in HISTCONTROL in your ".bashrc", you can prevent
# the key from being stored in your command history by prefixing it with a space.
# See https://www.linuxjournal.com/content/using-bash-history-more-efficiently-histcontrol

 ./docker/shared_testnet/validator_keys.sh 0xYOUR_ETH1_PRIVATE_GOERLI_KEY

start the containers

From the "infra-nimbus" repo:

ansible nimbus-slaves[5:8] -i ansible/inventory/test -u YOUR_USER -o -m shell -a "echo; cd /docker/beacon-node-testnet2-1; docker-compose --compatibility up -d; echo '---'" | sed 's/\\n/\n/g'