Coder Social home page Coder Social logo

gyrusdentatus / nym-ansible Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 23.63 MB

This repo includes Ansible role that deploys the full Nym validator node for testnet Milhon v0.11.0

License: Apache License 2.0

Shell 26.19% Jinja 73.81%
ansible-role mixnet blockchain cosmos-sdk deployment-automation

nym-ansible's Introduction

Nym validator v0.11.0 Ansible role

This repo includes Ansible role that deploys the full Nym validator node for testnet Milhon v0.11.0. It fetches the binaries from nymtech/nym Github repo instead of compiling it locally or remotely on the target server.

However, it also checks the sha256 hashes of the binaries and also sha1 of the genesis.json file for an extra security reasons.

All variables can be found in roles/validator/defaults/defaults.yml including the checksums(which I kept there just for testing purposes, they are being fetched with get_url module instead directly from the Nym repo)

The Nym validator role follows the validator docs Rest of the instructions from the README.md are also followed - for example the changes in config.toml.

Make sure you change the moniker and password in defaults.yml.

For this role to work properly, you should use --tags and --skip-tags simply because I haven't found a way how to automate the binary swap (it takes just way too long to sync the node and I did not have time neither storage for that).

You may find the tags with some brief description in the next section.

NOTE: This role does extensive checks so it would not overwrite any of your critical files but as always, use with caution.

Using this role (complete deployment of Cosmos mainnet hub 4 node)

Prerequisites:

  • Python 3.6+
  • pip
  • Ansible 2.10+ (tested with Ansible 2.11.2 but it should work on earlier versions as well.)

Install ansible & dependencies:

pip install -r requirements.txt or better if on Ubuntu 20.04 or higher - apt install ansible

Add the IP of the remote server to the inventory:

echo 1.2.3.4 > config/inventory.ini

Run your playbook:

bin/provision --list-tags --list-tasks to see all tasks and tags bin/provision -v to run the complete install

Tags:

Some tags are duplicate or non-essential, it is a bit chaotic still, so use with caution until I manage to find some time to improve this repo. You can find the main tags in tasks/main.yml but here is also a brief description what each tag does(or should do).

to see all tasks and tags in detail, please run the main playbook like this:

bin/provision --list-tasks --list-tag

download: needed to download binaries and checksums as well as creating gaia user and group. 
  additional tags for download:
    checksums - parses the release notes for checksums 
fresh_node:
  full init, adding admin user account, using moniker and password from default.yml file,  config edits and p2p seeds, genesis file downlaod. 
  
  additional tags for fresh_node:
    create_admin - add admin user
    genesis_download - downlaod, unzip genesis to target config dir and check shasum
init: edits config and adds admin user
  additional tags:
    config_edit - edits config.toml according to the Cosmos mainnet README.md
    
run: installs systemd service script and starts gaiad
service_check: checks if systemd gaiad.service works
logging: installs the python monitoring script (disabled currently, was used for *gaiad* with *StatsD*) and runs it as a systemd service

Basic monitoring script to get the latest_block_height

NOTE: right now not functional yet and turned off but if you're using StatsD server, you can change the tasks/main.yml and allow it Simple monitoring script in Python that retrieves the latest block height from local json-rcp endpoint (pst, check this out) and reports it as a gauge to the local StatsD server (UDP 8125) every 10 seconds.

For it to work in the current state of the repo, you will need to have StatsD server on the machine preinstalled or you can uncomment the task from the tasks/main.yml or you can use --skip-tags "logging"

nym-ansible's People

Contributors

gyrusdentatus avatar rfunduk avatar

Watchers

 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.