Consensys / quorum-terraform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Terraform

The following repo has example reference implementations of private networks on AWS and Azure. This is intended to get developers and ops people familiar with how to run a private ethereum network and understand the concepts involved.

Provisiong Besu on all nodes in these examples uses our Ansible Galaxy role. This makes it easy to upgrade, perform maintenance etc.

Production Network Guidelines:

⚠️ Note: After you have familiarised yourself with the examples in this repo, it is recommended that you design your network based on your needs and take our recommendations into account. It is also recommended to set up a Terraform Backend for a production deployment (e.g. using a S3 Bucket for saving tfstate and a DynamoDB table for state-locking and consistency checking).

IBFT2 with 4 validators and n nodes, with monitoring via prometheus and grafana

You get the following per setup:

  • monitoring node with prometheus, grafana with the Besu dashboard
  • 4 validators (bootnode, node-0, node-1 and node-2)
  • rpcnode
  • n nodes

The keys for the various nodes can be found under ibft-4-validators/files/besu-ibft/ Please modify with as many nodes you would like to provision and increase the count in variables.tf

The monitoring instances are provisioned with prometheus and will automatically pull in metrics for any nodes deployed in their respective networks. Credentials are provisioned via an instance IAM role. Grafana credentials are admin/Password1 - please login and change this, we suggest using an OAuth mechanism like Google.

Usage

  1. Ensure you have cloud account credentials setup and for the right account, eg: ENV_VARS override ~/.aws/credentials, refer to the precedence here

  2. Install terraform

  3. Enter the platform of choice and change directory to ibft-4-validators

  4. Update variables.tf to suit your needs eg: update node_count, besu_version or provide a besu_download_url link if using a build from circleci or your own custom servers or repos

terraform init && terraform validate && terraform apply
  1. Wait for the nodes to start

  2. Destroy the env with

terraform destroy

About


Languages

Language:HCL 86.1%Language:Shell 13.9%