Giter Club home page Giter Club logo

cosmos-validators's Introduction

Cosmos-based Node Ansible Setup

This repo is to set up the Cosmos-based node. It currently support:

  • BitCanna
  • Chihuahua
  • Comdex
  • Juno
  • Kava
  • KiChain
  • Osmosis
  • Sifchain
  • Terra

Summary

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.

Some Preparations

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:

  1. ansible_user: The sample file assumes ubuntu, but feel free to use other user name. This user need sudo privilege.
  2. ansible_port: The sample file assumes 22. But if you are like me, you will have a different ssh port other than 22 to avoid port sniffing.
  3. ansible_ssh_private_key_file: The sample file assumes ~/.ssh/id_rsa, but you might have a different key location.
  4. path: This is to make sure that the ansible_user can access the go executable. If your ansible_user is not ubuntu, you need to update it.
  5. node_exporter: Default is true. Change it to false if you do not want to install node_exporter
  6. promtail: Default is true. Change it to false if you do not want to install promtail
  7. 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.

Basic Cluster Structure

The basic cluster structure is:

  1. Name each juno node as juno_mainnet_main, juno_mainnet_backup, etc. Group all Juno nodes into juno_mainnet group.
  2. Name each juno node as comdex_mainnet_main, Comdex_mainnet_test, etc. Group all comdex nodes into comdex_mainnet group.
  3. ...

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.

Playbooks

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

Additional Info

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

Our Validator setup

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

Please stake with our validators

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

P.S.

General

Terra, Injective, Celestia

Validator Server Migration Best Practice

cosmos-validators's People

Contributors

husonghua avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.