Set of tools to monitor all needs for being a validator on the Celo network.
Running a validator consists of running at least three seperate machines. A proxy that is connect to the internet, a validator that is connect via a private network communicating with the proxy and an attestation service for mapping mobile phone numbers to cryptographic addresses. These scripts monitor the health of the validator and the attestation service. For the time being they DO NOT manage the health of the machines that these services are running on.
Set environment variables so the scripts can read information securely.
- source ~/.bash_profile
- set env variables
- Attestation
- CELO_ATTESTATION_IP
- CELO_ATTESTATION_ERRORS
- CELO_UNEXPECTED_ERRORS
- Twilio
- TWILIO_ACCOUNT_SID
- TWILIO_AUTH_TOKEN
- TWILIO_NUMBER_TO_SEND
- TWILIO_NUMBER
- Validator
- CELO_VALIDATOR_RG_ADDRESS
- Attestation
- ATTESTATION_SERVICE_SWITCH
- Attestation
On the machine you have your env variables and the celo cli installed - mkdir monitoringTools && cd monitoringTools - wget https://github.com/abellinii/celoMonitoringScripts.git - Set cronjob to run every minute by $ crontab -e and " * * * * * /home/ubuntu/monitoringTools/monitor.sh >> /home/ubuntu/monitoringTools/mainnetjob.log 2>&1 " - this will also provide a log to help with debugging
Set the Attestation service logging to on by setting ATTESTATION_SERVICE_SWITCH=1 and ATTESTATION_SERVICE_SWITCH=0 to turn it off
Inital setup forked from (Celo Repo)[https://github.com/celo-org/celo-monorepo/tree/master/packages/terraform-modules-public/aws] and modified
Terraform is a tool by Hashicorp that allows developers to treat "infrastructure as code", easying the management and repeatibility of the infrastructure. Infrastructure and all kind of cloud resources are defined in modules, and Terraform creates/changes/destroys when changes are applied.
Inside the testnet folder you will find a module (and submodules) to create the setup for running a Celo Validator on Google Cloud Platform. The next logic resources can be created:
proxy
module for creating a Geth Proxy connected to a validatorvalidator
module for deploying a Validatortx-node
for deploying a transaction node (also known as full-node), thought to expose the rpc interface and allows interaction with the network easilyattestation-service
for deploying the Attestation Service (https://docs.celo.org/getting-started/baklava-testnet/running-a-validator#running-the-attestation-service)
The proxy, validator and tx-node services includes the geth-exporter service to export geth metrics for Prometheus. Serving at port 9200, you can configure your Prometheus server to collect the metrics at endpoint http://:9200/metrics
Inside the example folder you can find an example tf to use the module. We recommend you to use that tf as base file for your deployment, modifying the account variables used for your convenience. Alternatively you can take that tf files as base for customizing your deployment. Please take care specially about the VPC network configuration. The validators nodes deployed have not a public IP so the access to them is restricted. In order to provide outbound connection of these nodes the VPC network has to be configured with a NAT service allowing external traffic.