diff --git a/ansible/group_vars/nimbus.sepolia.yml b/ansible/group_vars/nimbus.sepolia.yml index 4272bc4..0da58aa 100644 --- a/ansible/group_vars/nimbus.sepolia.yml +++ b/ansible/group_vars/nimbus.sepolia.yml @@ -48,13 +48,14 @@ beacon_node_exec_layer_jwt_secret: '{{ geth_authrpc_jwtsecret | mandatory }}' beacon_node_suggested_fee_recipient: '{{lookup("bitwarden", "nimbus/wallet/testnets", field="address")}}' # Validators from nimbus-private repo¬ beacon_node_dist_validators_enabled: '{{ node.start is defined and node.end is defined }}' -beacon_node_dist_validators_start: '{{ node.validator_client | ternary(0, node.start) | mandatory }}' -beacon_node_dist_validators_end: '{{ node.validator_client | ternary(0, node.end) | mandatory }}' +beacon_node_dist_validators_start: '{{ node.vc | ternary(0, node.start) | mandatory }}' +beacon_node_dist_validators_end: '{{ node.vc | ternary(0, node.end) | mandatory }}' # Ports +beacon_node_rest_port_base: 9300 beacon_node_discovery_port: '{{ 9000 + idx|int + 11 }}' beacon_node_listening_port: '{{ 9000 + idx|int + 11 }}' beacon_node_metrics_port: '{{ 9200 + idx|int + 11 }}' -beacon_node_rest_port: '{{ 9300 + idx|int + 11 }}' +beacon_node_rest_port: '{{ beacon_node_rest_port_base + idx|int + 11 }}' beacon_node_rest_address: '0.0.0.0' # Reduce Consul alerts sensitivity beacon_node_consul_check_interval: '60s' @@ -65,7 +66,7 @@ beacon_node_consul_failures_before_critical: 720 # 12h # Validator Client validator_client_service_name: 'validator-client-{{ validator_client_network }}-{{ node.branch }}' -validator_client_service_enabled: '{{ node.validator_client }}' +validator_client_service_enabled: '{{ node.vc }}' validator_client_network: '{{ beacon_node_network }}' validator_client_log_level: 'INFO' validator_client_beacon_node_url: 'http://127.0.0.1:{{ beacon_node_rest_port }}' @@ -84,8 +85,8 @@ validator_client_keymanager_enabled: true validator_client_keymanager_token: '{{lookup("bitwarden", "nimbus/keymanager", field="token")}}' # Validators Distribution validator_client_dist_validators_enabled: '{{ node.start is defined and node.end is defined }}' -validator_client_dist_validators_start: '{{ (not node.validator_client) | ternary(0, node.start) | mandatory }}' -validator_client_dist_validators_end: '{{ (not node.validator_client) | ternary(0, node.end) | mandatory }}' +validator_client_dist_validators_start: '{{ (not node.vc) | ternary(0, node.start) | mandatory }}' +validator_client_dist_validators_end: '{{ (not node.vc) | ternary(0, node.end) | mandatory }}' # ERA files geneartion. nimbus_era_files_timer_enabled: '{{ (nodes_layout[hostname]|length) > 1 }}' diff --git a/ansible/host_vars/linux-01.ih-eu-mda1.nimbus.sepolia.yml b/ansible/host_vars/linux-01.ih-eu-mda1.nimbus.sepolia.yml index 3de8e9d..c810bf8 100644 --- a/ansible/host_vars/linux-01.ih-eu-mda1.nimbus.sepolia.yml +++ b/ansible/host_vars/linux-01.ih-eu-mda1.nimbus.sepolia.yml @@ -2,10 +2,20 @@ # Community test REST API endpoint. beacon_node_rest_address: '0.0.0.0' +# Extract dynamically port form layout. +test_api_beacon_node_rest_index: |- + {{ nodes_layout[hostname] + | ansible.utils.index_of(test='eq', key='public_api', value=True) }} +test_api_beacon_node_rest_port: |- + {{ beacon_node_rest_port_base + test_api_beacon_node_rest_index|int + 11 }} +test_api_beacon_node_branch: |- + {{ nodes_layout[hostname][test_api_beacon_node_rest_index|int].branch }} + # WARNING: This will change if number of nodes changes. redirect_ports: - # beacon-node-sepolia-unstable-01 - - { src: 80, dst: 9311, comment: 'Test Beacon API (80->9311/tcp)' } + - src: 80 + dst: '{{ test_api_beacon_node_rest_port }}' + comment: 'Public Beacon API ({{ test_api_beacon_node_branch }}-{{ test_api_beacon_node_rest_index }})' # Era files hosting era_files_domain: 'sepolia.era.nimbus.team' diff --git a/ansible/vars/layout/sepolia.yml b/ansible/vars/layout/sepolia.yml index 4485a32..6f331b1 100644 --- a/ansible/vars/layout/sepolia.yml +++ b/ansible/vars/layout/sepolia.yml @@ -5,5 +5,5 @@ nodes_layout: 'linux-01.ih-eu-mda1.nimbus.sepolia': - { branch: 'stable', start: 0, end: 25, vc: true, payload_builder: true } - { branch: 'testing', start: 25, end: 50, vc: false, payload_builder: true } - - { branch: 'unstable', start: 50, end: 75, vc: false } + - { branch: 'unstable', start: 50, end: 75, vc: false, public_api: true } - { branch: 'libp2p', start: 75, end: 100, vc: false, payload_builder: true }