This simple Ansible repo will deploy an RPC API node hooked into the EOS mainnet.
It is intended to be used as the companion repo for the EOS Node Tools microsite.
Check the official docs for installing on the control machine.
Please make sure you have the most recent version of Ansible installed as this repo utilises some of the newer syntax found in later versions.
-
Update
inventory
with your server IP -
Update the environment vars in
group_vars/mainnet.yml
for your own settings -
To upgrade EOS, update the
version
var ingroup_vars/mainnet.yml
When you first attempt to run an ansible playbook, it needs to be able to SSH to the target machine in the same way that you would manually SSH via the command line.
Set up key based authentication for SSH, and update the ansible_user
variable in group_vars/mainnet.yml
with that user.
You can run a single command to:
- Clone latest EOS repo
- Install mainnet configuration
- Download latest mainnet blocks backup from eosnode.tools
- Kick of a resync with the network
Just update the inventory
with your node's IP, ensure you can access via ssh using key based auth, and run:
ansible-playbook install.yml
Note: this will take some time! Once complete, you can follow progress on the node by tailing the log.txt
in the /opt/mainnet
directory (default location).
If you don't want to use the one liner, there are 3 playbooks that manage each stage.
To install or upgrade EOS run:
ansible-playbook eos.yml
To setup EOS for first time, run:
ansible-playbook mainnet.yml
You can roll new changes to the config.ini
with:
ansible-playbook mainnet.yml --tags=config
There are a few simple helpers to restart/stop the nodeos
process:
ansible-playbook management.yml -e "job=restart"
ansible-playbook management.yml -e "job=stop"
Warning! This will auto remove your blocks
and state
directories. It will take a long time to download and uncompress the blocks backup, consider using -v
verbose modes to follow progress.
ansible-playbook management.yml -e "job=replay"