nimbus-prater-windows: deploy dedicated Geth nodes

https://github.com/status-im/infra-nimbus/issues/125

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-09-06 19:26:25 +02:00
parent 0d7e29b8c3
commit cb448d64f3
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
7 changed files with 98 additions and 5 deletions

View File

@ -19,3 +19,24 @@
- { role: open-ports, tags: open-ports }
- { role: infra-role-geth, tags: infra-role-geth }
- { role: infra-role-geth-exporter, tags: infra-role-geth-exporter }
- name: Deploy prater Geth nodes for Windows
become: true
serial: '{{ serial|default(1) }}'
hosts: nimbus-geth-goerli-windows
roles:
- { role: swap-file, tags: swap-file }
- { role: open-ports, tags: open-ports }
tasks:
- include_role: name=infra-role-geth
tags: [ geth, infra-role-geth ]
with_items: '{{ nodes_layout[hostname] }}'
loop_control:
loop_var: node
index_var: idx
- include_role: name=infra-role-geth-exporter
tags: [ geth-exporter, infra-role-geth-exporter ]
with_items: '{{ nodes_layout[hostname] }}'
loop_control:
loop_var: node
index_var: idx

View File

@ -0,0 +1,41 @@
---
# Geth node
geth_service_name: 'geth-goerli-{{ "%02d"|format(idx|int+1) }}'
geth_service_path: '/docker/{{ geth_service_name }}'
geth_cont_name: '{{ geth_service_name }}-node'
geth_cont_vol: '{{ geth_service_path }}/node'
geth_network_name: 'goerli'
geth_sync_mode: 'full'
geth_log_level_name: info
# Geth auth & JWT token
geth_account_pass: '{{lookup("bitwarden", "nimbus/geth", field="password")}}'
geth_authrpc_jwtsecret: '{{lookup("bitwarden", "nimbus/jwt-token")}}'
# Memory settings
geth_cont_mem_ratio: 0.8
geth_cache_size: '{{ (ansible_memtotal_mb * 0.25|float) | int }}'
# Ports
geth_port: '{{ 30303 + (idx|int) + 1 }}'
geth_rpc_port: '{{ 8545 + (idx|int) + 1 }}'
geth_metrics_port: '{{ 6060 + (idx|int) + 1 }}'
geth_websocket_port: '{{ 9546 + (idx|int) + 1 }}'
geth_authrpc_port: '{{ 8551 + (idx|int) + 1 }}'
geth_authrpc_addr: '0.0.0.0'
# Geth metrics
geth_expo_service_name: '{{ geth_service_name }}'
geth_expo_source_cont_name: '{{ geth_cont_name }}'
geth_expo_source_data_path: '{{ geth_cont_vol }}/data'
geth_expo_cont_port: '{{ 9400 + (idx|int) + 1 }}'
# Open Ports
open_ports_default_comment: 'Geth API'
open_ports_default_chain: 'VPN'
open_ports_list:
- { port: '9400:9404', ipset: 'metrics.hq', comment: 'Geth Metrics' }
- { port: '8551:8554', ipset: 'nimbus.prater' }
nodes_layout:
'windows-goerli-01.he-eu-hel1.nimbus.geth':
- { }
- { }
- { }

View File

@ -1,3 +1,7 @@
---
# Scans affect disk I/O performance.
bootstrap__defender_enabled: false
# HTTP RPC support is unstable
beacon_node_web3_urls: ['http://windows-goerli-01.he-eu-hel1.nimbus.geth.wg:{{ geth_authrpc_port }}']
beacon_node_web3_jwt_secret: '{{ geth_authrpc_jwtsecret }}'

View File

@ -66,7 +66,6 @@ beacon_node_service_user_pass: '{{lookup("bitwarden", "nimbus/windows", field="p
beacon_node_payload_builder_enabled: '{{ node.get("payload_builder", false) }}'
beacon_node_payload_builder_url: 'https://builder-relay-goerli.flashbots.net/'
# HTTP RPC support is unstable
#beacon_node_web3_urls: '{{ beacon_node_web3_urls_all }}'
beacon_node_web3_urls: ['http://localhost:{{ geth_authrpc_port }}']
beacon_node_web3_jwt_secret: '{{ geth_authrpc_jwtsecret }}'

View File

@ -0,0 +1,7 @@
---
# Scans affect disk I/O performance.
bootstrap__defender_enabled: false
# HTTP RPC support is unstable
beacon_node_web3_urls: ['http://windows-goerli-01.he-eu-hel1.nimbus.geth.wg:{{ geth_authrpc_port }}']
beacon_node_web3_jwt_secret: '{{ geth_authrpc_jwtsecret }}'

View File

@ -9,7 +9,7 @@
- local_action: command ./versioncheck.py
changed_when: false
- name: Deploy prater Linux beacon nodes
- name: Deploy prater AWS Linux nodes
become: true
# To avoid clashing/duplicate validators.
any_errors_fatal: true
@ -29,7 +29,7 @@
loop_var: node
index_var: idx
- name: Deploy mainnet linux beacon nodes
- name: Deploy prater Hetzner linux nodes
become: true
serial: '{{ serial|default(1) }}'
hosts: nimbus-prater-metal
@ -56,6 +56,27 @@
loop_var: node
index_var: idx
- name: Deploy prater Geth nodes for Windows
become: true
serial: '{{ serial|default(1) }}'
hosts: nimbus-geth-goerli-windows
roles:
- { role: swap-file, tags: swap-file }
- { role: open-ports, tags: open-ports }
tasks:
- include_role: name=infra-role-geth
tags: [ geth, infra-role-geth ]
with_items: '{{ nodes_layout[hostname] }}'
loop_control:
loop_var: node
index_var: idx
- include_role: name=infra-role-geth-exporter
tags: [ geth-exporter, infra-role-geth-exporter ]
with_items: '{{ nodes_layout[hostname] }}'
loop_control:
loop_var: node
index_var: idx
- name: Deploy prater Windows beacon nodes
become: true
become_user: 'admin'

View File

@ -31,7 +31,7 @@
- name: infra-role-wireguard
src: git@github.com:status-im/infra-role-wireguard.git
version: 9d8c93bc44ec123b81b9912f10e377e9b953ea5a
version: 544b1f0435d5ca47168236c42b6a077c44d5eb4a
scm: git
- name: oauth-proxy
@ -76,7 +76,7 @@
- name: infra-role-rocketpool
src: git@github.com:status-im/infra-role-rocketpool.git
version: 46764e947a5ae6a66d172efc99f07dd62fd9ef81
version: dad93aa3af1103734e0d68fad131644156fef685
scm: git
- name: infra-role-winsw