diff --git a/ansible/README.rst b/ansible/README.rst index 24ca6f878..5c416c018 100644 --- a/ansible/README.rst +++ b/ansible/README.rst @@ -9,8 +9,8 @@ Using Ansible The playbooks in `our ansible directory `__ run ansible `roles `__ which: -- install and configure basecoin or ethermint -- start/stop basecoin or ethermint and reset their configuration +- install and configure basecoind or ethermint +- start/stop basecoind or ethermint and reset their configuration Prerequisites ------------- @@ -200,7 +200,7 @@ DigitalOcean DO_API_TOKEN="" TF_VAR_TESTNET_NAME="testnet-servers" - ansible-playbook -i inventory/digital_ocean.py install.yml -e service=basecoin + ansible-playbook -i inventory/digital_ocean.py install.yml -e service=basecoind Amazon AWS ~~~~~~~~~~ @@ -210,12 +210,12 @@ Amazon AWS AWS_ACCESS_KEY_ID='' AWS_SECRET_ACCESS_KEY='' TF_VAR_TESTNET_NAME="testnet-servers" - ansible-playbook -i inventory/ec2.py install.yml -e service=basecoin + ansible-playbook -i inventory/ec2.py install.yml -e service=basecoind Installing custom versions ~~~~~~~~~~~~~~~~~~~~~~~~~~ -By default ansible installs the tendermint, basecoin or ethermint binary +By default ansible installs the tendermint, basecoind or ethermint binary versions from the latest release in the repository. If you build your own version of the binaries, you can tell ansible to install that instead. @@ -223,11 +223,11 @@ instead. :: GOPATH="" - go get -u github.com/tendermint/basecoin/cmd/basecoin + go get -u github.com/tendermint/basecoin/cmd/basecoind DO_API_TOKEN="" TF_VAR_TESTNET_NAME="testnet-servers" - ansible-playbook -i inventory/digital_ocean.py install.yml -e service=basecoin -e release_install=false + ansible-playbook -i inventory/digital_ocean.py install.yml -e service=basecoind -e release_install=false Alternatively you can change the variable settings in ``group_vars/all``. @@ -237,15 +237,15 @@ Other commands and roles There are few extra playbooks to make life easier managing your servers. -- install.yml - Install basecoin or ethermint applications. (Tendermint +- install.yml - Install basecoind or ethermint applications. (Tendermint gets installed automatically.) Use the ``service`` parameter to - define which application to install. Defaults to ``basecoin``. + define which application to install. Defaults to ``basecoind``. - reset.yml - Stop the application, reset the configuration and data, then start the application again. You need to pass - ``-e service=``, like ``-e service=basecoin``. It will + ``-e service=``, like ``-e service=basecoind``. It will restart the underlying tendermint application too. - restart.yml - Restart a service on all nodes. You need to pass - ``-e service=``, like ``-e service=basecoin``. It will + ``-e service=``, like ``-e service=basecoind``. It will restart the underlying tendermint application too. - stop.yml - Stop the application. You need to pass ``-e service=``. diff --git a/ansible/group_vars/all b/ansible/group_vars/all index ea8ff4857..bd14134cc 100644 --- a/ansible/group_vars/all +++ b/ansible/group_vars/all @@ -9,8 +9,8 @@ ## install ## -## service variable defines which service is going to be managed. It can be set to basecoin or ethermint. -service: basecoin +## service variable defines which service is going to be managed. It can be set to basecoind or ethermint. +service: basecoind ## release_install indicates if the install role should look for a privately built binary after installing the service package. If set to false, the privately built binary in the GOPATH is going to override the binary on the target systems. #release_install: true diff --git a/ansible/roles/config/tasks/main.yml b/ansible/roles/config/tasks/main.yml index 4b62fe089..85c37e3b3 100644 --- a/ansible/roles/config/tasks/main.yml +++ b/ansible/roles/config/tasks/main.yml @@ -7,6 +7,13 @@ register: pubkeys changed_when: false +- name: gather tendermint peer IDs + when: genesis_file is not defined + tags: reconfig-toml + command: "/usr/bin/tendermint show_node_id --home /etc/{{service}} --log_level error" + register: nodeids + changed_when: false + - name: resetting permissions from root after gathering public keys tags: reconfig-toml,reconfig-genesis file: "path=/etc/{{service}} owner={{service}} group={{service}} recurse=yes" @@ -17,6 +24,12 @@ set_fact: "pubkey='{{pubkeys.stdout}}'" connection: local +- name: register node ids as host facts + when: genesis_file is not defined + tags: reconfig-toml + set_fact: "nodeid='{{nodeids.stdout}}'" + connection: local + - name: copy generated genesis.json - genesis_time will be updated when: (validators == true or validators == 'true') and (genesis_file is not defined) tags: reconfig-genesis