Deployment scripts for OpenWeaver.
6 node types:
- Monitoring - Elasticsearch instance which aggregates logs from other nodes.
- Beacon - Acts as a bootstrap node to discover other nodes in the network
- Master, Relay - Form the propagation network
- Bridge - Acts as a gateway between Eth network and our propagation network. Needs to be added as a peer to the Eth full node.
- Eth - Eth full node which is the only publicly exposed component, prevents spam
Bridge and Eth are usually deployed in a single instance.
The repo has a lot of legacy scripts. Current ones are in the provisioning, deployment and stacks folders.
- Navigate to stacks/katara.
- Provision instances using
pulumi up
. Can change numbers/regions/config inindex.ts
. - Configure ansible inventory. An example is given in
inv.gcp.yml.example
to automatically configure inventory from running instances on GCP. It needs an env varGCP_SERVICE_ACCOUNT_FILE
pointing to a service account file path (Ref: https://docs.ansible.com/ansible/latest/scenario_guides/guide_gce.html). - Configure ansible variables needed for various playbooks. An example is given in
ansiblevars.yml.example
. - Key scan instances to mark them as known hosts.
ansible-playbook -i inv.gcp.yml -e "@ansiblevars.yml" monitoring/monitoring.yml --tags=keyscan
ansible-playbook -i inv.gcp.yml -e "@ansiblevars.yml" beacon/beacon.yml --tags=keyscan
ansible-playbook -i inv.gcp.yml -e "@ansiblevars.yml" master/master.yml --tags=keyscan
ansible-playbook -i inv.gcp.yml -e "@ansiblevars.yml" relay/relay.yml --tags=keyscan
ansible-playbook -i inv.gcp.yml -e "@ansiblevars.yml" msggen/msggen.yml --tags=keyscan
- Gather monitoring and beacon IPs which are used in other playbooks.
ansible-playbook -i inv.gcp.yml -e "@ansiblevars.yml" monitoring/monitoring.yml --tags=gather
ansible-playbook -i inv.gcp.yml -e "@ansiblevars.yml" beacon/beacon.yml --tags=gather
- Deploy the various nodes
ansible-playbook -i inv.gcp.yml -e "@ansiblevars.yml" monitoring/monitoring.yml
ansible-playbook -i inv.gcp.yml -e "@ansiblevars.yml" beacon/beacon.yml
ansible-playbook -i inv.gcp.yml -e "@ansiblevars.yml" master/master.yml
ansible-playbook -i inv.gcp.yml -e "@ansiblevars.yml" relay/relay.yml
ansible-playbook -i inv.gcp.yml -e "@ansiblevars.yml" msggen/msggen.yml
Notes:
- monitoring.yml has a task to automatically provision a HTTPS certificate for the given domain. This needs DNS to be preconfigured to point to the monitoring instance before running.
- msggen.yml has a task tagged with
chaindata
which downloads chaindata from an existing GCS bucket to save sync time. It can be run (while geth isn't running) using
ansible-playbook -i inv.gcp.yml -e "@ansiblevars.yml" msggen/msggen.yml --tags=chaindata