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:
Jakub Sokołowski 2024-05-08 10:20:06 +02:00
parent a844250fe8
commit 931c9f38b7
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
2 changed files with 23 additions and 5 deletions

View File

@ -2,7 +2,16 @@
# Communityu test REST API endpoint.
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:
# beacon-node-mainnet-unstable-01
- { src: 80, dst: 9302, comment: 'Test Beacon API unstable-01 (80->9302/tcp)' }
- src: 80
dst: '{{ test_api_beacon_node_rest_port }}'
comment: 'Public Beacon API ({{ test_api_beacon_node_branch }})'

View File

@ -2,7 +2,16 @@
# Communityu test REST API endpoint.
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.
redirect_ports:
# beacon-node-mainnet-testing-01
- { src: 80, dst: 9301, comment: 'Test Beacon API testing-01 (80->9301/tcp)' }
- src: 80
dst: '{{ test_api_beacon_node_rest_port }}'
comment: 'Public Beacon API ({{ test_api_beacon_node_branch }})'