To run the failover script you need 3 standalone servers. For the documentation we used the following names:
- master (runs the failover script with ssh connection to nodes)
- relay-1 (running ark-node who is currently forging)
- relay-2 (running ark-node who isn't forging right now. Node needs to be in sync!)
- How to setup an ark node
- How to secure your ark node
- How to set your nodes as ssh host on the master node
Both nodes (forging and relay) must have noah installed correctly. Note that noah
shouldn't be running on these nodes, it just has to be installed!
The first relay needs to be the current forging delegate node. The second relay needs to be a running ark-node that doesn't forge. The master node only need to run the failover script and have a functioning ssh connection to both nodes.
git clone https://github.com/reconnico/ark-failover.git
cd ~/ark-failover
bash failover.sh install
(if the errorNo such file or directory
occurs please runsudo updatedb
)
- create
secret.txt
file and insert your secret. Checksecret.sample.txt
for an example. - create
nodes.txt
file and set your nodesforging;relay
. Use ssh host names of your nodes here. Checknodes.sample.txt
for an example. bash failover.sh test
(If an error occur please repeat the last 2 steps and check your configuration)bash failover.sh start
- modify vars in
variables.sh
. Example, changenetwork
to eithermainnet
ordevnet
(it's set todevnet
by default), also double check if paths are set correctly.
Usage: failover.sh [options]
options:
help Show help information.
install Install the application.
start Start the application.
stop Stop the application.
restart Restart the application.
test Test the application.
switch Switch the forging node.
rebuild [node] Rebuild a node using noah.
update Update the application to the latest version.
nodes Display current nodes information.
status Display the status of the application.
log Show log information.
alias Create a bash alias for failover.
We recommend you to test the setup on a test environment first.
- change the network variable in
variables.sh
todevnet
- change your secret in
secret.txt
to your devnet delegate secret - edit
nodes.txt
and set your nodesforging;relay
(use ssh host names of your nodes here)
- Nico Allers
- Brian Faust Developer of noah
- Contributors
MIT © Nico Allers