2020-11-25 14:58:44 +00:00
|
|
|
---
|
2021-04-09 06:18:59 +00:00
|
|
|
- name: 'Verify Ansible versions'
|
|
|
|
hosts: all
|
|
|
|
tags: always
|
2021-05-10 13:29:38 +00:00
|
|
|
become: false
|
|
|
|
run_once: true
|
2021-04-09 06:18:59 +00:00
|
|
|
gather_facts: false
|
2020-11-25 14:58:44 +00:00
|
|
|
tasks:
|
2024-06-13 15:19:32 +00:00
|
|
|
- local_action: command ./roles.py --check
|
2021-04-09 06:18:59 +00:00
|
|
|
changed_when: false
|
2020-11-25 14:58:44 +00:00
|
|
|
|
2021-06-22 09:49:48 +00:00
|
|
|
- name: Configure network mainnet bootnodes
|
2021-05-19 10:04:12 +00:00
|
|
|
become: true
|
2022-06-14 09:40:18 +00:00
|
|
|
serial: '{{ serial|default(1) }}'
|
2021-06-22 09:49:48 +00:00
|
|
|
hosts: 'nimbus-mainnet-small'
|
2024-03-04 17:11:51 +00:00
|
|
|
vars_files: layout/mainnet.yml
|
2021-10-04 10:07:32 +00:00
|
|
|
vars:
|
|
|
|
# WARNING: Since these are Eth 2 bootnodes we need to keep the keys and IPs unchanged.
|
2024-11-04 07:45:14 +00:00
|
|
|
beacon_node_netkey: '{{lookup("vault", "beacon-node/netkey", field=hostname)}}'
|
2021-05-19 10:04:12 +00:00
|
|
|
roles:
|
2024-03-10 12:26:14 +00:00
|
|
|
- { role: infra-role-swap-file, tags: [ swap-file ] }
|
2024-10-08 13:57:57 +00:00
|
|
|
- { role: infra-role-open-ports, tags: [ open-ports ] }
|
2024-03-20 12:44:34 +00:00
|
|
|
- { role: redirect-ports, tags: [ redirect-ports ] }
|
2024-06-20 14:01:14 +00:00
|
|
|
- { role: get-geth-api-urls, tags: [ get-geth-api-urls, beacon-node ] }
|
2021-10-05 15:48:01 +00:00
|
|
|
tasks:
|
2024-06-20 14:01:14 +00:00
|
|
|
- include_role:
|
|
|
|
name: infra-role-beacon-node-linux
|
|
|
|
apply: { tags: always }
|
|
|
|
tags: [ beacon-node ]
|
2024-09-16 06:10:36 +00:00
|
|
|
with_items: '{{ nodes_layout[inventory_hostname] }}'
|
2021-10-05 15:48:01 +00:00
|
|
|
loop_control:
|
|
|
|
loop_var: node
|
2022-08-10 14:54:21 +00:00
|
|
|
index_var: idx
|
2021-10-04 10:07:32 +00:00
|
|
|
|
|
|
|
- name: Deploy mainnet linux beacon nodes
|
|
|
|
become: true
|
2022-06-14 09:40:18 +00:00
|
|
|
serial: '{{ serial|default(1) }}'
|
2024-10-08 13:57:57 +00:00
|
|
|
hosts:
|
|
|
|
- nimbus-mainnet-geth
|
|
|
|
- nimbus-mainnet-erigon
|
2024-11-01 15:27:59 +00:00
|
|
|
- nimbus-mainnet-nec
|
2024-03-04 17:11:51 +00:00
|
|
|
vars_files: layout/mainnet.yml
|
2024-01-09 08:40:14 +00:00
|
|
|
vars:
|
|
|
|
# FIXME: Use all Geth nodes available in the fleet until we resync.
|
2024-01-11 13:32:39 +00:00
|
|
|
geth_node_api_fleet_names: ['nimbus.geth']
|
2021-10-04 10:07:32 +00:00
|
|
|
roles:
|
2024-03-20 12:44:34 +00:00
|
|
|
- { role: update-netplan, tags: [ update-netplan ], when: ansible_system == 'Linux' }
|
2024-03-10 12:26:14 +00:00
|
|
|
- { role: infra-role-swap-file, tags: [ swap-file ] }
|
|
|
|
- { role: infra-role-open-ports, tags: [ open-ports ] }
|
|
|
|
- { role: infra-role-smart-metrics, tags: [ smart-metrics ] }
|
2021-10-04 11:42:33 +00:00
|
|
|
- { role: redirect-ports, tags: [ redirect-ports ] }
|
2024-06-20 14:01:14 +00:00
|
|
|
- { role: get-geth-api-urls, tags: [ get-geth-api-urls, beacon-node ] }
|
2022-10-12 07:30:46 +00:00
|
|
|
- { role: nimbus-era-files, tags: [ nimbus-era-files ] }
|
2021-10-04 10:07:32 +00:00
|
|
|
tasks:
|
2024-06-20 14:01:14 +00:00
|
|
|
- include_role:
|
|
|
|
name: infra-role-beacon-node-linux
|
|
|
|
apply: { tags: always }
|
|
|
|
tags: [ beacon-node ]
|
2024-09-16 06:10:36 +00:00
|
|
|
with_items: '{{ nodes_layout[inventory_hostname] }}'
|
2021-10-04 10:07:32 +00:00
|
|
|
loop_control:
|
|
|
|
loop_var: node
|
2022-08-10 14:54:21 +00:00
|
|
|
index_var: idx
|
2024-10-08 13:57:57 +00:00
|
|
|
|
|
|
|
- name: Deploy Mainnet Geth Nodes
|
|
|
|
become: true
|
|
|
|
serial: '{{ serial|default(1) }}'
|
|
|
|
hosts: nimbus-mainnet-geth
|
|
|
|
vars_files: layout/mainnet.yml
|
|
|
|
tasks:
|
|
|
|
- include_role:
|
|
|
|
name: infra-role-geth
|
|
|
|
apply:
|
|
|
|
tags: always
|
|
|
|
tags: [ geth ]
|
|
|
|
when:
|
|
|
|
- "'el' in node"
|
|
|
|
- node.el == "geth"
|
|
|
|
with_items: '{{ nodes_layout[inventory_hostname] }}'
|
|
|
|
loop_control: { loop_var: node, index_var: idx }
|
|
|
|
|
|
|
|
- include_role:
|
|
|
|
name: infra-role-geth-exporter
|
|
|
|
apply:
|
|
|
|
tags: always
|
|
|
|
tags: [ geth-exporter ]
|
|
|
|
when:
|
|
|
|
- "'el' in node"
|
|
|
|
- node.el == "geth"
|
|
|
|
with_items: '{{ nodes_layout[inventory_hostname] }}'
|
|
|
|
loop_control: { loop_var: node, index_var: idx }
|
|
|
|
|
|
|
|
- name: Deploy Mainnet Erigon Nodes
|
|
|
|
become: true
|
|
|
|
serial: '{{ serial|default(1) }}'
|
|
|
|
hosts: nimbus-mainnet-erigon
|
|
|
|
vars_files: layout/mainnet.yml
|
|
|
|
tasks:
|
|
|
|
- include_role:
|
|
|
|
name: infra-role-erigon
|
|
|
|
apply:
|
|
|
|
tags: always
|
|
|
|
tags: [ erigon ]
|
|
|
|
when:
|
|
|
|
- "'el' in node"
|
|
|
|
- node.el == "erigon"
|
|
|
|
with_items: '{{ nodes_layout[inventory_hostname] }}'
|
|
|
|
loop_control: { loop_var: node, index_var: idx }
|
|
|
|
|
|
|
|
- name: Deploy Mainnet Nimbus ETH1 Nodes
|
|
|
|
become: true
|
|
|
|
serial: '{{ serial|default(1) }}'
|
2024-11-01 15:27:59 +00:00
|
|
|
hosts: nimbus-mainnet-nec
|
2024-10-08 13:57:57 +00:00
|
|
|
vars_files: layout/mainnet.yml
|
|
|
|
tasks:
|
|
|
|
- include_role:
|
|
|
|
name: infra-role-nimbus-eth1
|
|
|
|
apply:
|
|
|
|
tags: always
|
|
|
|
tags: [ nimbus-eth1 ]
|
|
|
|
when:
|
|
|
|
- "'el' in node"
|
2024-11-01 15:27:59 +00:00
|
|
|
- node.el == "nec"
|
2024-10-08 13:57:57 +00:00
|
|
|
with_items: '{{ nodes_layout[inventory_hostname] }}'
|
|
|
|
loop_control: { loop_var: node, index_var: idx }
|