A tool to deploy a Monitoring System for your Substrate based Nodes in a Kubernetes cluster. The focus is specific on Validators.
ALESSIO (Validator on Polkadot): 16cdSZUq7kxq6mtoVMWmYXo62FnNGT9jzWjVRUg87CpL9pxP
ALESSIO (Validator0 on Kusama): GaK38GT7LmgCpRSTRdDC2LeiMaV9TJmx8NmQcb9L3cJ3fyX
ALESSIO (Validator1 on Kusama): GTuMySjzg6ibdn4sJ2XgS4cVH1LcjmXUWZyoxB5GPCCNRtx
- Requirements
- Polkadot Secure Validator
- How To Configure the Application
- How To Deploy it Locally
- How To Deploy it in Production
- How it will look like
- Future Developments
- kind (if you want to deploy it locally): https://kind.sigs.k8s.io/docs/user/quick-start/#installation
- kind requires Docker: https://docs.docker.com/get-docker/
- A Kubernetes cluster (if you don't want to use kind). Version 1.21+
- kubectl: https://kubernetes.io/docs/tasks/tools/
- helmfile: https://github.com/roboll/helmfile#installation => brew install helmfile (on macOS)
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
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'
######################################################################
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
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
- Improve the documentation
- Youtube tutorials