Skip to content

Latest commit

 

History

History
129 lines (94 loc) · 4.6 KB

README.md

File metadata and controls

129 lines (94 loc) · 4.6 KB

Polkadot-K8s-Monitor

A tool to deploy a Monitoring System for your Substrate based Nodes in a Kubernetes cluster. The focus is specific on Validators.

My on-chain Identity

ALESSIO (Validator on Polkadot): 16cdSZUq7kxq6mtoVMWmYXo62FnNGT9jzWjVRUg87CpL9pxP
ALESSIO (Validator0 on Kusama): GaK38GT7LmgCpRSTRdDC2LeiMaV9TJmx8NmQcb9L3cJ3fyX
ALESSIO (Validator1 on Kusama): GTuMySjzg6ibdn4sJ2XgS4cVH1LcjmXUWZyoxB5GPCCNRtx

identity

Related Projects

Application Architecture

architecture

Youtube

Table Of Contents

Requirements

Polkadot Secure Validator

This project is particularly suited to be working in synergy with the polkadot-secure-validator, the official node deployment tool from Web3 Foundation: https://github.com/w3f/polkadot-secure-validator

How To Configure the Application

You can find a sample of the nodes related yaml config file here.

validatorsPolkadot:
- name: polkadot-node-0
  stashAccount: YourPolkadotStashAddress
  ip: x.x.x.x   
validatorsKusama: 
- name: kusama-node-0
  stashAccount: YourKusamaStashAddress
  ip: x.x.x.x 

You can find two samples of the environment variables related files, meant to contain also your secrets and your passwords:

  • the complete configuration file, production ready
  • the local configuration file, ready to be deployed into a local kind cluster
export GRAFANA_PASSWORD="xxx" #Optional: default "admin"

export VALIDATOR_HTTP_AUTH_USER='xxx' #Optional: default "prometheus"
export VALIDATOR_HTTP_AUTH_PASSWORD='xxx' #Optional: default "nginx_password"

#### Optional: if you want the Matrix/Riot notifications working #####
export KUSAMA_VALIDATOR_MATRIXBOT_USER='@xxx:matrix.org'
export KUSAMA_VALIDATOR_MATRIXBOT_PASSWORD='xxx'
export KUSAMA_VALIDATOR_MATRIXBOT_ROOM_ID='!xxx:matrix.org'

export POLKADOT_VALIDATOR_MATRIXBOT_USER='@xxx:matrix.org'
export POLKADOT_VALIDATOR_MATRIXBOT_PASSWORD='xxx'
export POLKADOT_VALIDATOR_MATRIXBOT_ROOM_ID='!xxx:matrix.org'

export MATRIXBOT_USER='@xxx:matrix.org'
export MATRIXBOT_PASSWORD='xxx'
export MATRIXBOT_ROOM_ID='!xxx:matrix.org'
######################################################################

How To Deploy it Locally

I'd reccomend to test first this approach

git clone https://github.com/ironoa/polkadot-k8s-monitor.git
cd polkadot-k8s-monitor
cp config/env.sample.local.sh config/env.sh #create the default env config file
cp config/nodes.sample.yaml config/nodes.yaml #create the default nodes config file
#just the fist time

./scripts/deployLocal.sh
# just re trigger it to deploy configuration changes

#if you want to delete your local cluster
#./scripts/uninstallLocal.sh

How To Deploy it in Production

First, connect yourself to your chosen kubernetes cluster.

git clone https://github.com/ironoa/polkadot-k8s-monitor.git 
cd polkadot-k8s-monitor
cp config/env.sample.complete.sh config/env.sh #create the default env config file
cp config/nodes.sample.yaml config/nodes.yaml #create the default nodes config file
#just the fist time

./scripts/deployProduction.sh
# just re trigger it to deploy configuration changes

How it will look like

grafanaNodeLoad grafanaNodeChainStatus clusterAlerts nodesAlerts

Troubleshooting

Future Developments

  • Improve the documentation
  • Youtube tutorials