nimbus.mainnet: dynamically derive public API node ports
Fixes: https://github.com/status-im/nimbus-eth2/issues/6271 Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
a844250fe8
commit
931c9f38b7
|
@ -2,7 +2,16 @@
|
||||||
# Communityu test REST API endpoint.
|
# Communityu test REST API endpoint.
|
||||||
beacon_node_rest_address: '0.0.0.0'
|
beacon_node_rest_address: '0.0.0.0'
|
||||||
|
|
||||||
# WARNING: This will change if number of nodes changes.
|
# Extract dynamically port form layout.
|
||||||
|
test_api_beacon_node_branch: 'unstable'
|
||||||
|
test_api_beacon_node_rest_index: |-
|
||||||
|
{{ nodes_layout[hostname]
|
||||||
|
| ansible.utils.index_of(test='eq', key='branch', value=test_api_beacon_node_branch)
|
||||||
|
| first }}
|
||||||
|
test_api_beacon_node_rest_port: |-
|
||||||
|
{{ beacon_node_rest_port_base + test_api_beacon_node_rest_index|int }}
|
||||||
|
|
||||||
redirect_ports:
|
redirect_ports:
|
||||||
# beacon-node-mainnet-unstable-01
|
- src: 80
|
||||||
- { src: 80, dst: 9302, comment: 'Test Beacon API unstable-01 (80->9302/tcp)' }
|
dst: '{{ test_api_beacon_node_rest_port }}'
|
||||||
|
comment: 'Public Beacon API ({{ test_api_beacon_node_branch }})'
|
||||||
|
|
|
@ -2,7 +2,16 @@
|
||||||
# Communityu test REST API endpoint.
|
# Communityu test REST API endpoint.
|
||||||
beacon_node_rest_address: '0.0.0.0'
|
beacon_node_rest_address: '0.0.0.0'
|
||||||
|
|
||||||
|
# Extract dynamically port form layout.
|
||||||
|
test_api_beacon_node_branch: 'testing'
|
||||||
|
test_api_beacon_node_rest_index: |-
|
||||||
|
{{ nodes_layout[hostname]
|
||||||
|
| ansible.utils.index_of(test='eq', key='branch', value=test_api_beacon_node_branch) }}
|
||||||
|
test_api_beacon_node_rest_port: |-
|
||||||
|
{{ beacon_node_rest_port_base + test_api_beacon_node_rest_index|int }}
|
||||||
|
|
||||||
# WARNING: This will change if number of nodes changes.
|
# WARNING: This will change if number of nodes changes.
|
||||||
redirect_ports:
|
redirect_ports:
|
||||||
# beacon-node-mainnet-testing-01
|
- src: 80
|
||||||
- { src: 80, dst: 9301, comment: 'Test Beacon API testing-01 (80->9301/tcp)' }
|
dst: '{{ test_api_beacon_node_rest_port }}'
|
||||||
|
comment: 'Public Beacon API ({{ test_api_beacon_node_branch }})'
|
||||||
|
|
Loading…
Reference in New Issue