get-geth-api-urls: allow specifying multiple fleets
More useful than specifying multiple servicer names. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
9fbf61806a
commit
13fa6ea608
|
@ -33,7 +33,7 @@
|
|||
hosts: nimbus-mainnet-metal
|
||||
vars:
|
||||
# FIXME: Use all Geth nodes available in the fleet until we resync.
|
||||
geth_node_api_fleet_name: 'nimbus.{{ beacon_node_network }}'
|
||||
geth_node_api_fleet_names: ['nimbus.get', 'nimbus.{{ beacon_node_network }}']
|
||||
roles:
|
||||
- { role: swap-file, tags: [ swap-file ] }
|
||||
- { role: open-ports, tags: [ open-ports ] }
|
||||
|
|
|
@ -6,7 +6,7 @@ This role assembles the list of Web3 Eth1 URLs used by Nimbus Beacon nodes to sy
|
|||
|
||||
There are only two important configuration keys:
|
||||
```yaml
|
||||
geth_node_api_fleet_name: 'nimbus.geth'
|
||||
geth_node_api_consul_names: ['my-geth-node-rpc']
|
||||
geth_node_api_fleet_names: ['nimbus.geth', 'nimbus.mainnet']
|
||||
geth_node_api_consul_name: 'my-geth-node-rpc'
|
||||
```
|
||||
The Geth node Consul service is expected to have an `url` in metadata.
|
||||
|
|
|
@ -6,8 +6,7 @@ eth2_to_eth1_map:
|
|||
|
||||
eth2_network_name: '{{ beacon_node_network | mandatory }}'
|
||||
eth1_network_name: '{{ eth2_to_eth1_map[eth2_network_name] | mandatory }}'
|
||||
geth_node_api_fleet_name: 'nimbus.geth'
|
||||
geth_node_api_consul_names:
|
||||
- 'geth-{{ eth1_network_name | mandatory }}'
|
||||
geth_node_api_consul_name: 'geth-{{ eth1_network_name | mandatory }}'
|
||||
geth_node_api_fleet_names: ['nimbus.geth']
|
||||
|
||||
consul_catalog_url: 'http://localhost:8500/v1/catalog'
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
- name: Find available Geth API Auth RPC services
|
||||
uri:
|
||||
url: '{{ consul_catalog_url }}/service/{{ service_name }}-authrpc?dc={{ item }}&tag={{ geth_node_api_fleet_name }}'
|
||||
url: '{{ consul_catalog_url }}/service/{{ geth_node_api_consul_name }}-authrpc?dc={{ item }}&tag={{ fleet_name }}'
|
||||
with_items: '{{ data_centers.json }}'
|
||||
register: geth_rpc_services
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
- name: Find available Geth API Auth RPC services
|
||||
win_uri:
|
||||
url: '{{ consul_catalog_url }}/service/{{ service_name }}-authrpc?dc={{ item }}&tag={{ geth_node_api_fleet_name }}'
|
||||
url: '{{ consul_catalog_url }}/service/{{ geth_node_api_consul_name }}-authrpc?dc={{ item }}&tag={{ fleet_name }}'
|
||||
content_type: 'application/json'
|
||||
return_content: true
|
||||
with_items: '{{ data_centers.json }}'
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
- include_tasks: consul/posix.yml
|
||||
when: ansible_system in ['Linux', 'Darwin']
|
||||
loop: '{{ geth_node_api_consul_names }}'
|
||||
loop: '{{ geth_node_api_fleet_names }}'
|
||||
loop_control:
|
||||
loop_var: 'service_name'
|
||||
loop_var: 'fleet_name'
|
||||
|
||||
- include_tasks: consul/windows.yml
|
||||
when: ansible_system == 'Win32NT'
|
||||
loop: '{{ geth_node_api_consul_names }}'
|
||||
loop: '{{ geth_node_api_fleet_names }}'
|
||||
loop_control:
|
||||
loop_var: 'service_name'
|
||||
loop_var: 'fleet_name'
|
||||
|
|
Loading…
Reference in New Issue