cosmos-sdk/networks
Greg Szabo 179b8f9c49 Merge PR #1821: Added seed node update scripts
* Added seed node update scripts
* Updated PENDING
* Fixed issue with GENESISFILE and added GENESISURL to seed node scripts
* Fixed unsafe reset bug
* As requested, multiline ansible-playbook command
* Added monitoring gaiacli.service to logz.io template
* Added journald configuration ansible script
2018-08-01 03:13:22 +02:00
..
local deleted attic and .rst file, moved /core into /sdk, added getting-started, introduction, lotion, validators, resources and documentation image 2018-07-12 16:58:12 -04:00
remote Merge PR #1821: Added seed node update scripts 2018-08-01 03:13:22 +02:00
Makefile Merge PR #1821: Added seed node update scripts 2018-08-01 03:13:22 +02:00
Makefile.do Merge PR #1234: Cloud network setup scripts 2018-07-24 06:27:39 +02:00
README-DO.rst Merge PR #1234: Cloud network setup scripts 2018-07-24 06:27:39 +02:00
README.rst Merge PR #1234: Cloud network setup scripts 2018-07-24 06:27:39 +02:00
add-cluster.sh Merge PR #1234: Cloud network setup scripts 2018-07-24 06:27:39 +02:00
add-datadog.sh Merge PR #1234: Cloud network setup scripts 2018-07-24 06:27:39 +02:00
del-cluster.sh Merge PR #1234: Cloud network setup scripts 2018-07-24 06:27:39 +02:00
del-datadog.sh Merge PR #1234: Cloud network setup scripts 2018-07-24 06:27:39 +02:00
list.sh Merge PR #1234: Cloud network setup scripts 2018-07-24 06:27:39 +02:00
new-testnet.sh Merge PR #1234: Cloud network setup scripts 2018-07-24 06:27:39 +02:00
upgrade-gaiad.sh Merge PR #1234: Cloud network setup scripts 2018-07-24 06:27:39 +02:00

README.rst

Terraform & Ansible
===================

Automated deployments are done using `Terraform <https://www.terraform.io/>`__ to create servers on AWS then
`Ansible <http://www.ansible.com/>`__ to create and manage testnets on those servers.

Prerequisites
-------------

-  Install `Terraform <https://www.terraform.io/downloads.html>`__ and `Ansible <http://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html>`__ on a Linux machine.
-  Create an `AWS API token <https://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html>`__ with EC2 create capability.
-  Create SSH keys

::

    export AWS_ACCESS_KEY_ID="2345234jk2lh4234"
    export AWS_SECRET_ACCESS_KEY="234jhkg234h52kh4g5khg34"
    export TESTNET_NAME="remotenet"
    export CLUSTER_NAME= "remotenetvalidators"
    export SSH_PRIVATE_FILE="$HOME/.ssh/id_rsa"
    export SSH_PUBLIC_FILE="$HOME/.ssh/id_rsa.pub"

These will be used by both ``terraform`` and ``ansible``.

Create a remote network
-----------------------

::

    SERVERS=1 REGION_LIMIT=1 make validators-start


The testnet name is what's going to be used in --chain-id, while the cluster name is the administrative tag in AWS for the servers. The code will create SERVERS amount of servers in each availability zone up to the number of REGION_LIMITs, starting at us-east-2. (us-east-1 is excluded.) The below BaSH script does the same, but sometimes it's more comfortable for input.

::

    ./new-testnet.sh "$TESTNET_NAME" "$CLUSTER_NAME" 1 1


Quickly see the /status endpoint
--------------------------------

::

    make validators-status


Delete servers
--------------

::

    make validators-stop

Logging
-------

You can ship logs to Logz.io, 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>`__, then:

::

   yum install systemd-devel || echo "This will only work on RHEL-based systems."
   apt-get install libsystemd-dev || echo "This will only work on Debian-based systems."

   go get github.com/mheese/journalbeat
   ansible-playbook -i inventory/digital_ocean.py -l remotenet logzio.yml -e LOGZIO_TOKEN=ABCDEFGHIJKLMNOPQRSTUVWXYZ012345


Monitoring
----------

You can install DataDog agent using

::

    make datadog-install