This repo is to set up the Cosmos-based node. It currently support:
- BitCanna
- Chihuahua
- Comdex
- Juno
- Kava
- KiChain
- Osmosis
- Sifchain
- Terra
You run one playbook and set up a node. For example:
ansible-playbook -i inventory juno.yml -e "target=juno_mainnet_main"
But before you rush with this easy setup, you probably want to read on so you understand the structure of this Ansible program and all the features it offers.
First, make sure that you have a production inventory file with your confidential server info. You will start by copying the sample inventory file (included in the repo). The sample file gives you a good idea on how to define the inventory.
cp inventory.sample inventory
Needless to say, you need to update the dummy values in the inventory file. For each node, you need to update the server IP, validator_name and log_name (log_name is optional if you do not install Promtail). While you are free to keep the default, you might also want to update:
- ansible_user: The sample file assumes
ubuntu
, but feel free to use other user name. This user need sudo privilege. - ansible_port: The sample file assumes
22
. But if you are like me, you will have a different ssh port other than22
to avoid port sniffing. - ansible_ssh_private_key_file: The sample file assumes
~/.ssh/id_rsa
, but you might have a different key location. - path: This is to make sure that the ansible_user can access the
go
executable. If your ansible_user is notubuntu
, you need to update it. - node_exporter: Default is
true
. Change it tofalse
if you do not want to install node_exporter - promtail: Default is
true
. Change it tofalse
if you do not want to install promtail - log_monitor: Enter your monitor server IP. It is most likely a private IP address if you use a firewall around your private virtual cloud (VPC). You do not need this if you do not install promtail
It is beyond the scope of this guide to help you create a sudo user, alternate ssh port, create a private key, install Ansible on your machine, etc. You can do a quick online search and find the answers. In my experience, Digital Ocean have some quality guides on these topics. Stack Overflow can help you trouble-shoot if you are stuck.
The basic cluster structure is:
- Name each juno node as
juno_mainnet_main
,juno_mainnet_backup
, etc. Group all Juno nodes intojuno_mainnet
group. - Name each juno node as
comdex_mainnet_main
,Comdex_mainnet_test
, etc. Group all comdex nodes intocomdex_mainnet
group. - ...
The structure allows you to target vars
to each node, or a group cluster, or the whole cluster. Make sure that you are familiar with the files in the group_vars
folder. They follow this clustered structure closely.
The key Ansible playbook is <chain>.yml
files. It will set up a fresh node from scratch. For example:
ansible-playbook -i inventory bitcanna.yml -e "target=bitcanna_mainnet_main"
ansible-playbook -i inventory chihuahua.yml -e "target=chihuahua_mainnet_main"
ansible-playbook -i inventory comdex.yml -e "target=comdex_mainnet_main"
ansible-playbook -i inventory juno.yml -e "target=juno_mainnet_main"
ansible-playbook -i inventory kava.yml -e "target=kava_mainnet_main"
ansible-playbook -i inventory kichain.yml -e "target=kichain_mainnet_main"
ansible-playbook -i inventory osmosis.yml -e "target=osmosis_mainnet_main"
ansible-playbook -i inventory sifchain.yml -e "target=sifchain_betanet_main"
ansible-playbook -i inventory terra.yml -e "target=terra_mainnet_main"
If you prefer to install the node manually, you can run a 'prepare' playbook to set up a server for a cosmos-based chain without installing the node itself.
Playbooks are:
Playbook | Description |
---|---|
prepare.yml |
Prepare the server with node_exporter, promtail, go, cosmovisor, and firewall rules |
bitcanna.yml |
Set up Bitcanna node. It includes the general prepare task and bitcanna specific task |
chihuahua.yml |
Set up Chihuahua node. It includes the general prepare task and chihuahua specific task |
comdex.yml |
Set up Comdex node. It includes the general prepare task and comdex specific task |
juno.yml |
Set up Juno node. It includes the general prepare task and juno specific task |
kava.yml |
Set up Kava node. It includes the general prepare task and kava specific task |
kichain.yml |
Set up KiChain node. It includes the general prepare task and kichain specific task |
osmosis.yml |
Set up Osmosis node. It includes the general prepare task and osmosis specific task |
sifchain.yml |
Set up Sifchain node. It includes the general prepare task and sifchain specific task |
terra.yml |
Set up Sifchain node. It includes the general prepare task and terra specific task |
When you install a node that has upgrades in the past, you can either sync from Block 1, or use a snapshot to time-travel to the present quickly. We strongly recommend using snapshots. It will save you time of syncing and debugging. Here are a list of trusted snapshot providers. Do your own research and make sure that you can trust the snapshot providers:
Kava: Snapshot is here
KiChain: Follow instruction here. In fact, we cannot make it work with the peers listed when we tried to sync from Block 1. The only way we made it work is by syncing with the snapshot from the included link.
Osmosis: Snapshot is here
Sifchain: Follow instruction here
Network | Main Validator | Fully synced Spare | Testnet Participation |
---|---|---|---|
Bitcanna | Yes ๐ฟ | Yes | In Progress |
Chihuahua | Yes ๐ถ | Yes | No |
Comdex | Yes ๐ข๏ธ | Yes | In Progress |
Juno | Yes โ | Yes | In Progress |
Kava | Yes ๐ | Yes | No |
KiChain | Yes ๐ | No | No |
Osmosis | Yes ๐งช | No | No |
Sifchain | Yes โ๏ธ | Yes | In Progress |
Network | Validator | Useful Commands |
---|---|---|
Bitcanna | bcnavaloper1gp957czryfgyvxwn3tfnyy2f0t9g2p4pxqv0cj |
BitCanna |
Chihuahua | chihuahuavaloper1gp957czryfgyvxwn3tfnyy2f0t9g2p4p40qac2 |
Chihuahua |
Comdex | comdexvaloper1gp957czryfgyvxwn3tfnyy2f0t9g2p4p3447dz |
Comdex |
Juno | junovaloper1gp957czryfgyvxwn3tfnyy2f0t9g2p4pvzc6k3 |
Juno |
Kava | kavavaloper125s8t5c6ypwee7ytun90lnhgpls2zl3vta43aj |
Kava |
KiChain | kivaloper1gp957czryfgyvxwn3tfnyy2f0t9g2p4pq8jud7 |
KiChain |
Osmosis | osmovaloper1gp957czryfgyvxwn3tfnyy2f0t9g2p4phpkatp |
Osmosis |
Sifchain | sifvaloper1gp957czryfgyvxwn3tfnyy2f0t9g2p4pfj2j90 |
Sifchain |