Go to file
phahulin d49dc96a97 Restructure log files, add logrotate config 2018-01-03 16:08:24 +03:00
group_vars Make poa_role a separte variable 2018-01-03 00:47:49 +03:00
logs Restructure log files, add logrotate config 2018-01-03 16:08:24 +03:00
roles/backup-parity/tasks Make poa_role a separte variable 2018-01-03 00:47:49 +03:00
.gitignore Restructure log files, add logrotate config 2018-01-03 16:08:24 +03:00
README.md Fix typo 2018-01-03 14:23:02 +03:00
cron-bkp-blockchain.sh Restructure log files, add logrotate config 2018-01-03 16:08:24 +03:00
hosts.example refactoring 2017-12-29 21:44:16 +03:00
logrotate-bkp-blockchain.conf Restructure log files, add logrotate config 2018-01-03 16:08:24 +03:00
site.yml refactoring 2017-12-29 21:44:16 +03:00

README.md

DevOps scripts

Setup blockchain backup from a node:

  1. connect to the node as root.

  2. clone this repository to root's home folder:

git clone https://github.com/poanetwork/poa-devops.git
  1. make sure python (v2.6+ or v3.5+) is installed on the node.

  2. install pip and/or upgrade it to the newest version:

apt-get install python-pip
pip install --upgrade pip
  1. upgrade setuptools to the newest version:
pip install --upgrade setuptools
  1. install ansible:
pip install ansible
  1. create group_vars/all file:
cp group_vars/all.example group_vars/all

and set the following variables in it:

  • poa_role - node's role (one of bootnode, validator, moc, explorer, netstat)
  • access_key - s3 access key
  • secret_key - s3 secret key
  • s3_bucket - s3 bucket name
  1. create hosts file:
cp hosts.example hosts

and set it to run on localhost:

[backup]
localhost
  1. run playbook (still, do this on the node)
ansible-playbook -i hosts -c local site.yml
  1. if all is well, setup a cronjob to run every hour:
crontab -e

append the following line:

30 * * * * /bin/bash /root/poa-devops/cron-bkp-blockchain.sh