diff --git a/ansible/group_vars/nimbus.pyrmont.yml b/ansible/group_vars/nimbus.pyrmont.yml index 022616b..3f3f8cc 100644 --- a/ansible/group_vars/nimbus.pyrmont.yml +++ b/ansible/group_vars/nimbus.pyrmont.yml @@ -1,43 +1,46 @@ --- -# Not pretty but avoids useless files -node_size: |- - {{ (hostname is search("large")) | ternary("large", "small") }} -node_branch: |- - {{ (hostname is search("unstable")) | ternary("unstable", ( - (hostname is search("testing")) | ternary("testing", ( - (hostname is search("stable")) | ternary("stable", ( - (hostname is search("libp2p")) | ternary("libp2p", "UNKNOWN") - )))))) }} - # TEMPORARY switch for Prater Altair transition -beacon_node_cont_image: 'statusteam/nimbus_beacon_node:unstable-{{ node_size }}' -beacon_node_cont_tag: '{{ node_branch }}-{{ node_size }}' +beacon_node_repo_branch: 'unstable' +# TODO Simplify this, maybe change branch name. +#beacon_node_repo_branch: '{{ node.branch is search("libp2p") | ternary("nim-libp2p-auto-bump-unstable", node.branch) }}' beacon_node_network: 'pyrmont' beacon_node_log_level: 'INFO' -beacon_node_dist_validators_enabled: true - -# Peers +beacon_node_service_name: 'beacon-node-{{ beacon_node_network }}-{{ node.branch }}' +# Ports +beacon_node_discovery_port: '{{ 9000 + port_offset }}' +beacon_node_listening_port: '{{ 9000 + port_offset }}' +beacon_node_metrics_port: '{{ 9200 + port_offset }}' +beacon_node_rest_port: '{{ 9300 + port_offset }}' +beacon_node_rpc_port: '{{ 9900 + port_offset }}' +# Tuning beacon_node_max_peers: 250 +beacon_node_threads: '{{ (node.branch == "testing") | ternary(4, 1) }}' +# Builds +beacon_node_build_frequency: '{{ node.build_frequency }}' +# 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.start | mandatory }}' +beacon_node_dist_validators_end: '{{ node.end | mandatory }}' # Split by hostname and branch for more central location. -validators_layout: - "metal-01.he-eu-hel1.nimbus.pyrmont": # 4000 validators each - "stable": { start: 0, end: 4000 } - "unstable": { start: 4000, end: 8000 } - "testing": { start: 8000, end: 12000 } - "libp2p": { start: 12000, end: 16000 } - "metal-02.he-eu-hel1.nimbus.pyrmont": # 989 validators each - "stable": { start: 16000, end: 16989 } - "unstable": { start: 16989, end: 17978 } - "testing": { start: 17978, end: 18967 } - "libp2p": { start: 18967, end: 19956 } - "metal-03.he-eu-hel1.nimbus.pyrmont": # 10 validators each - "stable": { start: 19956, end: 19966 } - "unstable": { start: 19966, end: 19976 } - "testing": { start: 19976, end: 19986 } - "libp2p": { start: 19986, end: 19996 } - "metal-04.he-eu-hel1.nimbus.pyrmont": # 2 validators each - "stable": { start: 19996, end: 19997 } - "unstable": { start: 19997, end: 19998 } - "testing": { start: 19998, end: 19999 } - "libp2p": { start: 19999, end: 20000 } +nodes_layout: + 'metal-01.he-eu-hel1.nimbus.pyrmont': # 4000 validators each + - { branch: 'stable', start: 0, end: 4000, build_frequency: '*-*-* 11:00:00' } + - { branch: 'unstable', start: 4000, end: 8000, build_frequency: '*-*-* 13:00:00' } + - { branch: 'testing', start: 8000, end: 12000, build_frequency: '*-*-* 15:00:00' } + - { branch: 'libp2p', start: 12000, end: 16000, build_frequency: '*-*-* 17:00:00' } + 'metal-02.he-eu-hel1.nimbus.pyrmont': # 989 validators each + - { branch: 'stable', start: 16000, end: 16989, build_frequency: '*-*-* 11:00:00' } + - { branch: 'unstable', start: 16989, end: 17978, build_frequency: '*-*-* 13:00:00' } + - { branch: 'testing', start: 17978, end: 18967, build_frequency: '*-*-* 15:00:00' } + - { branch: 'libp2p', start: 18967, end: 19956, build_frequency: '*-*-* 17:00:00' } + 'metal-03.he-eu-hel1.nimbus.pyrmont': # 10 validators each + - { branch: 'stable', start: 19956, end: 19966, build_frequency: '*-*-* 11:00:00' } + - { branch: 'unstable', start: 19966, end: 19976, build_frequency: '*-*-* 13:00:00' } + - { branch: 'testing', start: 19976, end: 19986, build_frequency: '*-*-* 15:00:00' } + - { branch: 'libp2p', start: 19986, end: 19996, build_frequency: '*-*-* 17:00:00' } + 'metal-04.he-eu-hel1.nimbus.pyrmont': # 2 validators each + - { branch: 'stable', start: 19996, end: 19997, build_frequency: '*-*-* 11:00:00' } + - { branch: 'unstable', start: 19997, end: 19998, build_frequency: '*-*-* 13:00:00' } + - { branch: 'testing', start: 19998, end: 19999, build_frequency: '*-*-* 15:00:00' } + - { branch: 'libp2p', start: 19999, end: 20000, build_frequency: '*-*-* 17:00:00' } diff --git a/ansible/pyrmont.yml b/ansible/pyrmont.yml index 852acba..a4d79f2 100644 --- a/ansible/pyrmont.yml +++ b/ansible/pyrmont.yml @@ -15,30 +15,11 @@ hosts: - nimbus-pyrmont-metal roles: - - role: get-geth-web3-urls - tags: get-geth-web3-urls + - { role: get-geth-web3-urls, tags: get-geth-web3-urls } tasks: - include_role: name=infra-role-beacon-node-linux - tags: beacon-node - vars: - # Using whole libp2p branch name would be far too long. - beacon_node_service_name: 'beacon-node-{{ beacon_node_network }}-{{ node.name }}' - beacon_node_build_frequency: '{{ node.build_frequency }}' - # TEMPORARY switch for Prater Altair transition - beacon_node_repo_branch: 'unstable' - beacon_node_threads: '{{ (node.branch == "testing") | ternary(4, 1) }}' - beacon_node_discovery_port: '{{ 9000 + port_offset }}' - beacon_node_listening_port: '{{ 9000 + port_offset }}' - beacon_node_metrics_port: '{{ 9200 + port_offset }}' - beacon_node_rest_port: '{{ 9300 + port_offset }}' - beacon_node_rpc_port: '{{ 9900 + port_offset }}' - beacon_node_dist_validators_start: '{{ validators_layout[hostname][node.name]["start"] | mandatory }}' - beacon_node_dist_validators_end: '{{ validators_layout[hostname][node.name]["end"] | mandatory }}' - with_items: - - { name: 'stable', branch: 'stable', build_frequency: '*-*-* 11:00:00' } - - { name: 'unstable', branch: 'unstable', build_frequency: '*-*-* 13:00:00' } - - { name: 'testing', branch: 'testing', build_frequency: '*-*-* 15:00:00' } - - { name: 'libp2p', branch: 'nim-libp2p-auto-bump-unstable', build_frequency: '*-*-* 17:00:00' } + tags: [ beacon-node, infra-role-beacon-node-linux ] + with_items: '{{ nodes_layout[hostname] }}' loop_control: loop_var: node index_var: port_offset