infra-nimbus/ansible/mainnet.yml

53 lines
2.2 KiB
YAML
Raw Normal View History

---
- name: 'Verify Ansible versions'
hosts: all
tags: always
become: false
run_once: true
gather_facts: false
tasks:
- local_action: command ./versioncheck.py
changed_when: false
- name: Configure network mainnet bootnodes
become: true
hosts: 'nimbus-mainnet-small'
vars:
# WARNING: Since these are Eth 2 bootnodes we need to keep the keys and IPs unchanged.
beacon_node_netkey: '{{lookup("bitwarden", "nimbus/netkey", field=hostname)}}'
roles:
- { role: get-geth-web3-urls, tags: [ get-geth-web3-urls ] }
- { role: infra-role-beacon-node-linux, tags: [ beacon-node ] }
- name: Deploy mainnet linux beacon nodes
become: true
hosts: nimbus-mainnet-metal
roles:
- { role: redirect-ports, tags: [ redirect-ports ] }
- { role: get-geth-web3-urls, tags: [ get-geth-web3-urls ] }
tasks:
- include_role: name=infra-role-beacon-node-linux
tags: beacon-node
vars:
# TEMPORARY switch for Mainnet Altair transition
beacon_node_service_name: 'beacon-node-{{ beacon_node_network }}-{{ node.branch }}-{{ "%02d"|format(node.idx) }}'
beacon_node_repo_branch: 'unstable'
beacon_node_threads: '{{ (node.branch == "testing") | ternary(4, 1) }}'
beacon_node_build_frequency: '{{ node.build_frequency }}'
beacon_node_open_firewall: '{{ node.open_firewall | default(true) }}'
beacon_node_discovery_port: '{{ 9000 + port_offset }}'
beacon_node_listening_port: '{{ 9000 + port_offset }}'
beacon_node_metrics_port: '{{ 9200 + port_offset }}'
beacon_node_rest_port: '{{ 9300 + port_offset }}'
beacon_node_rpc_port: '{{ 9900 + port_offset }}'
with_items:
- { branch: 'stable', idx: 1, build_frequency: '*-*-* 12:00:00' }
- { branch: 'stable', idx: 2, build_frequency: '*-*-* 13:00:00' }
- { branch: 'testing', idx: 1, build_frequency: '*-*-* 14:00:00' }
- { branch: 'testing', idx: 2, build_frequency: '*-*-* 15:00:00' }
- { branch: 'unstable', idx: 1, build_frequency: '*-*-* 16:00:00' }
- { branch: 'unstable', idx: 2, build_frequency: '*-*-* 17:00:00' }
loop_control:
loop_var: node
index_var: port_offset