✨ An Ansible toolkit for Cosmos networks 💫
Use this toolkit to:
- Join a testnet
- Start a local testnet
- Start a multi-node testnet
- Python 3
- Ansible
- Install Ansible with
pipand notapt:pip install ansible
- Install Ansible with
To join the Cosmos Hub Interchain Security Testnet:
- Clone this repository
- Run
ansible-galaxy install -r requirements.ymlto install dependencies - Set up SSH access to the target machine
- Run the playbook
ansible-playbook node.yml -i examples/inventory-ics-testnet-provider.yml -e 'target=SERVER_IP_OR_DOMAIN' - Log into the target machine to follow the syncing process
journalctl -fu cv-provider
- See the examples for more command, playbook, and configuration options.
- See the Playbook Variables Overview for a list of default variables you can override with the
--extra-varsor-eoption. - See the Monitoring Setup Guide for setting up alerting and monitoring infrastructure.
- Visit the Cosmos testnets repo for more information.
Use node_control.py to run only part of the node playbook:
./node_control.py [-i inventory] [-t target] operation
The inventory argument is optional and defaults to inventory.yml (e.g. ./node_control.py restart).
The target option is the server IP or domain.
The operation will apply to all the nodes in the inventory:
restartrestarts the node binary/cosmovisor servicestopstops the node binary/cosmovisor servicestartstarts the node binary/cosmovisor servicerebootreboots the machineresetrunsnode_binary unsafe-reset-all
- The
noderole provides the core functionality of this toolkit - Node setup:
roles/node/tasks/main.yml - Default variables:
roles/node/defaults/main.yml - Systemd services:
roles/node/templates/ - To add a variable to the node config files, add it to:
roles/node/templates/ansible_vars.json.j2
This repository runs the following test automatically as defined below.
We test joining the Cosmos Hub public testnet weekly using GitHub Actions and a badge is displayed at the top of this readme.
- All Python code is formatted to PEP 8 and linted with
pylint. - All YAML code is linted with
yamllint. - See
lint.shand.config/for details.
