nimbus-geth-goerli: one group_vars file to all hosts

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-07 13:27:18 +02:00
parent 08a744da2f
commit 96a9843b21
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
4 changed files with 27 additions and 68 deletions

View File

@ -12,7 +12,6 @@
- name: Configure geth nodes
become: true
hosts:
- nimbus-geth-goerli
- nimbus-geth-mainnet
roles:
- { role: swap-file, tags: swap-file }
@ -23,7 +22,8 @@
- name: Deploy prater Geth nodes for Windows
become: true
serial: '{{ serial|default(1) }}'
hosts: nimbus-geth-goerli-windows
hosts:
- nimbus-geth-goerli
roles:
- { role: swap-file, tags: swap-file }
- { role: open-ports, tags: open-ports }

View File

@ -1,41 +0,0 @@
---
# 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,45 +1,45 @@
---
# This node is used as replacement for Infura for end-to-end tests. Syncing can use a lot of mamory
swap_file_size_mb: 4096
# Geth node
geth_service_name: 'nimbus-goerli'
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_websocket_enabled: true
# Geth auth & JWT token
geth_account_pass: '{{lookup("bitwarden", "nimbus/geth", field="password")}}'
geth_authrpc_jwtsecret: '{{lookup("bitwarden", "nimbus/jwt-token")}}'
# Allow connections from our VPN
geth_websocket_origins: '*'
# 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'
# Ports
geth_port: 30303
geth_rpc_addr: '0.0.0.0'
geth_rpc_port: 8545
geth_authrpc_addr: '0.0.0.0'
geth_authrpc_port: 8551
geth_websocket_addr: '0.0.0.0'
geth_websocket_port: 8546
geth_expo_cont_port: 9200
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: '{{ geth_expo_cont_port }}', ipset: 'metrics.hq', comment: 'Geth Metrics' }
- { port: '{{ geth_websocket_port }}', ipset: 'nimbus.eth1' }
- { port: '{{ geth_websocket_port }}', ipset: 'nimbus.prater' }
- { port: '{{ geth_rpc_port }}', ipset: 'nimbus.eth1' }
- { port: '{{ geth_rpc_port }}', ipset: 'nimbus.prater' }
- { port: '{{ geth_authrpc_port }}', ipset: 'nimbus.eth1' }
- { port: '{{ geth_authrpc_port }}', ipset: 'nimbus.prater' }
- { port: '9400:9404', ipset: 'metrics.hq', comment: 'Geth Metrics' }
- { port: '8551:8554', ipset: 'nimbus.prater' }
nodes_layout:
# For AWS Prater nodes.
'goerli-01.he-eu-hel1.nimbus.geth': [{}, {}, {}]
# For MacOS Prater nodes.
'goerli-02.he-eu-hel1.nimbus.geth': [{}, {}, {}]
# For Windows prater nodes.
'goerli-03.he-eu-hel1.nimbus.geth': [{}, {}, {}]

View File

@ -111,7 +111,7 @@
- name: infra-role-geth
src: git@github.com:status-im/infra-role-geth.git
version: 773c384dccbe0e8ada5ed4fc2af8f474f69cf944
version: dcc07cdefec77267cf4f52a56489e659cb6d504a
scm: git
- name: infra-role-geth-exporter