ARK-Failover
May 2, 2018 · View on GitHub
Requirements
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!)
Tutorials
- 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.
Installation
git clone https://github.com/reconnico/ark-failover.gitcd ~/ark-failoverbash failover.sh install(if the errorNo such file or directoryoccurs please runsudo updatedb)
Configuration
- create
secret.txtfile and insert your secret. Checksecret.sample.txtfor an example. - create
nodes.txtfile and set your nodesforging;relay. Use ssh host names of your nodes here. Checknodes.sample.txtfor 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, changenetworkto eithermainnetordevnet(it's set todevnetby default), also double check if paths are set correctly.
Commands
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.
Testing on devnet
We recommend you to test the setup on a test environment first.
- change the network variable in
variables.shtodevnet - change your secret in
secret.txtto your devnet delegate secret - edit
nodes.txtand set your nodesforging;relay(use ssh host names of your nodes here)
Credits
- Nico Allers
- Brian Faust Developer of noah
- Contributors
License
MIT © Nico Allers