You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
2.0 KiB

  1. Using Ansible
  2. =============
  3. .. figure:: assets/a_plus_t.png
  4. :alt: Ansible plus Tendermint
  5. Ansible plus Tendermint
  6. The playbooks in `the ansible directory <https://github.com/tendermint/tendermint/tree/master/networks/remote/ansible>`__
  7. run ansible `roles <http://www.ansible.com/>`__ to configure the sentry node architecture.
  8. Prerequisites
  9. -------------
  10. - Install `Ansible 2.0 or higher <https://www.ansible.com>`__ on a linux machine.
  11. - Create a `DigitalOcean API token <https://cloud.digitalocean.com/settings/api/tokens>`__ with read and write capability.
  12. - Create SSH keys
  13. - Install the python dopy package (for the digital_ocean.py script)
  14. Build
  15. -----
  16. ::
  17. export DO_API_TOKEN="abcdef01234567890abcdef01234567890"
  18. export SSH_KEY_FILE="$HOME/.ssh/id_rsa.pub"
  19. ansible-playbook -i inventory/digital_ocean.py -l sentrynet install.yml
  20. # The scripts assume that you have your validator set up already.
  21. # You can create the folder structure for the sentry nodes using `tendermint testnet`.
  22. # For example: tendermint testnet --v 0 --n 4 --o build/
  23. # Then copy your genesis.json and modify the config.toml as you see fit.
  24. # Reconfig the sentry nodes with a new BINARY and the configuration files from the build folder:
  25. ansible-playbook -i inventory/digital_ocean.py -l sentrynet config.yml -e BINARY=`pwd`/build/tendermint -e CONFIGDIR=`pwd`/build
  26. Shipping logs to logz.io
  27. ------------------------
  28. Logz.io is an Elastic stack (Elastic search, Logstash and Kibana) service provider. You can set up your nodes to log there automatically. Create an account and get your API key from the notes on `this page <https://app.logz.io/#/dashboard/data-sources/Filebeat>`__.
  29. ::
  30. yum install systemd-devel || echo "This will only work on RHEL-based systems."
  31. apt-get install libsystemd-dev || echo "This will only work on Debian-based systems."
  32. go get github.com/mheese/journalbeat
  33. ansible-playbook -i inventory/digital_ocean.py -l sentrynet logzio.yml -e LOGZIO_TOKEN=ABCDEFGHIJKLMNOPQRSTUVWXYZ012345