Last active
May 21, 2020 00:44
-
-
Save Daniel-VDM/23f60e01813d633bc60119c3d1966333 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# profile | |
export WHOAMI=LRTN; export HMY_PROFILE=lrtn; | |
# init network | |
./go.sh -p lrtn -k | |
# deinit network | |
./aws-instances.sh -g LRTN && ls *.ids # always check listed files for correct IPs. | |
./aws-instances.sh -G delete | |
# check for consensus without watchdiog | |
./run_on_shard.sh -y -p lrtn -T 0 'tac ~/*/zerolog*.log | grep -m 1 HOORAY' | |
./run_on_shard.sh -y -p lrtn -T 1 'tac ~/*/zerolog*.log | grep -m 1 HOORAY' | |
./run_on_shard.sh -y -p lrtn -T 2 'tac ~/*/zerolog*.log | grep -m 1 HOORAY' | |
./run_on_shard.sh -y -p lrtn -T 3 'tac ~/*/zerolog*.log | grep -m 1 HOORAY' | |
# update watchdog | |
./update_nodedb.sh -w LRTN -t testnet -u -c -p -r -y | |
# Debug | |
./run_on_shard.sh -p lrtn -T 1 'tac ~/*/zerolog*.log | grep -m 1 Announce' | |
# reset nodes for hard-refresh | |
./run_on_shard.sh -y -p lrtn -T 0 'sudo systemctl stop harmony; sudo rm -rf harmony_db_*; sudo rm -rf explorer_storage_*; sudo rm -rf ../tmp_log/*/*; sudo rm -rf ~/latest/*; sudo rm -rf .dht*;' | |
./run_on_shard.sh -y -p lrtn -T 1 'sudo systemctl stop harmony; sudo rm -rf harmony_db_*; sudo rm -rf explorer_storage_*; sudo rm -rf ../tmp_log/*/*; sudo rm -rf ~/latest/*; sudo rm -rf .dht*;' | |
./run_on_shard.sh -y -p lrtn -T 2 'sudo systemctl stop harmony; sudo rm -rf harmony_db_*; sudo rm -rf explorer_storage_*; sudo rm -rf ../tmp_log/*/*; sudo rm -rf ~/latest/*; sudo rm -rf .dht*;' | |
./run_on_shard.sh -y -p lrtn -T 3 'sudo systemctl stop harmony; sudo rm -rf harmony_db_*; sudo rm -rf explorer_storage_*; sudo rm -rf ../tmp_log/*/*; sudo rm -rf ~/latest/*; sudo rm -rf .dht*;' | |
# restart all shards with upgraded binary at the same time | |
cat logs/lrtn/shard0.txt | xargs -i{} -P50 bash -c './restart_node.sh -y -U -d logs/lrtn -p lrtn -t 0 -r 0 -R 0 {}' & cat logs/lrtn/shard1.txt | xargs -i{} -P50 bash -c './restart_node.sh -y -U -d logs/lrtn -p lrtn -t 0 -r 0 -R 0 {}' & cat logs/lrtn/shard2.txt | xargs -i{} -P50 bash -c './restart_node.sh -y -U -d logs/lrtn -p lrtn -t 0 -r 0 -R 0 {}' & cat logs/lrtn/shard3.txt | xargs -i{} -P50 bash -c './restart_node.sh -y -U -d logs/lrtn -p lrtn -t 0 -r 0 -R 0 {}' | |
# restart shards | |
./run_on_shard.sh -y -p lrtn -T 0 'sudo systemctl restart harmony' | |
./run_on_shard.sh -y -p lrtn -T 1 'sudo systemctl restart harmony' | |
./run_on_shard.sh -y -p lrtn -T 2 'sudo systemctl restart harmony' | |
./run_on_shard.sh -y -p lrtn -T 3 'sudo systemctl restart harmony' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment