insight_infra.harmony_deploy
Harmony ansible deployment
Copy hosts-example to credentials/hosts and configure the remote hosts
Install BLS key(s) to credentials/<hostname>/bls/<pubkey>.key
Multiple BLS keys are supported.
Note that changing num_bls is not enough, you have to add/remove the
appropriate BLS keys on chain using hmy staking edit-validator with
--remove-bls-key and --add-bls-key to match what is on the node.
BLS passphrases are not supported by this role at the moment.
Secure credentials
chmod og-rx -R credentials
Update binaries from upstream, push to hosts
Note that this downloads binaries to your local machine, and the role installs those binaries.
./update.sh
ansible-playbook main.yml
./update.sh downloads binaries native to where it is run, and on MacOS this
means it downloads binaries that cannot be deployed to our nodes.
NOTE: If BN_MA changes in node.sh, update files/sbin/harmonyd
All other changes in node.sh (e.g. arguments etc) need to be updated in files/sbin/harmonyd
On a new install this will NOT automatically start harmony! To do that:
Start/restart Harmony
ansible-playbook restart.yml
Stop/clean/start Harmony (like ./node.sh -c)
ansible-playbook clean.yml
Stop Harmony
ansible-playbook stop.yml
Stop Harmony, clean, start harmony
./update.sh
ansible-playbook stop.yml clean.yml main.yml start.yml
Nuke Harmony database and user
ansible-playbook nuke.yml
Fetch remote wallet in to local credentials/
Edit hosts and adjust the wallet_home fact to taste.
ansible-playbook fetch.yml
To check balances on the node
./hmy.sh balances <public_address>
Building Harmony
Checkout upstream
mkdir harmony-one
cd harmony-one
git clone [email protected]:harmony-one/bls
git clone [email protected]:harmony-one/mcl
Check out our fork of t3
git clone [email protected]:Blockdaemon/harmony.git
cd harmony
git remote add upstream [email protected]:harmony-one/harmony
git fetch --all
git checkout -b t3 upstream/t3
Build
make
To deploy binary built in src/harmony-one/harmony
ansible-playbook main.yml --tags dev
Update our fork from upstream
git -C ../bls pull
git -C ../mcl pull
git fetch --all
git remote prune upstream
git remote prune origin
git checkout go.mod
git checkout master && git rebase upstream/master
git checkout t3 && git rebase upstream/t3
Push result to our fork
git push origin t3
git push origin master
ansible-galaxy install insight_infra.harmony_deploy