infra-nimbus/ansible/mainnet.yml
Jakub Sokołowski c8e3232dff
nimbus-era-files: use --network flag to fix errors
Changes to default runtime config have caused errors like this:
```
FAT Could not load head state, database corrupt? tid=3639597 file=blockchain_dag.nim:920 head=e7d4f3b7:4636671 tail=4d611d5b:0 genesis=4d611d5b:0
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-10-12 09:30:46 +02:00

49 lines
1.7 KiB
YAML

---
- 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
serial: '{{ serial|default(1) }}'
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: swap-file, tags: [ swap-file ] }
- { role: redirect-ports, tags: [ redirect-ports ] }
- { role: get-geth-api-urls, tags: [ get-geth-api-urls ] }
tasks:
- include_role: name=infra-role-beacon-node-linux
tags: [ beacon-node, infra-role-beacon-node-linux ]
with_items: '{{ nodes_layout[hostname] }}'
loop_control:
loop_var: node
index_var: idx
- name: Deploy mainnet linux beacon nodes
become: true
serial: '{{ serial|default(1) }}'
hosts: nimbus-mainnet-metal
roles:
- { role: open-ports, tags: [ open-ports ] }
- { role: redirect-ports, tags: [ redirect-ports ] }
- { role: infra-role-geth, tags: [ infra-role-geth ] }
- { role: infra-role-geth-exporter, tags: [ infra-role-geth-exporter ] }
- { role: get-geth-api-urls, tags: [ get-geth-api-urls ] }
- { role: nimbus-era-files, tags: [ nimbus-era-files ] }
tasks:
- include_role: name=infra-role-beacon-node-linux
tags: [ beacon-node, infra-role-beacon-node-linux ]
with_items: '{{ nodes_layout[hostname] }}'
loop_control:
loop_var: node
index_var: idx