From 13b27db54d675dcd33e29c151196bb5c899fb29e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 16 Jun 2021 15:41:50 +0200 Subject: [PATCH] windows: configure running multiple beacon nodes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- ansible/group_vars/nimbus-prater-windows.yml | 9 ++++- ansible/prater.yml | 42 +++++++++++++++----- ansible/pyrmont.yml | 7 ++-- ansible/requirements.yml | 6 +-- 4 files changed, 46 insertions(+), 18 deletions(-) diff --git a/ansible/group_vars/nimbus-prater-windows.yml b/ansible/group_vars/nimbus-prater-windows.yml index 68172cd..cfd4f9b 100644 --- a/ansible/group_vars/nimbus-prater-windows.yml +++ b/ansible/group_vars/nimbus-prater-windows.yml @@ -1,3 +1,10 @@ --- -beacon_node_cont_tag: 'stable-windows' beacon_node_service_user_pass: '{{lookup("passwordstore", "services/Nimbus/windows-pass")}}' +beacon_node_network: 'prater' +beacon_node_service_name: 'beacon-node-{{ beacon_node_network }}-{{ beacon_node_repo_branch }}' +beacon_node_repo_branch: '{{ item.branch }}' +# Offset using index from list of branches +beacon_node_discovery_port: '{{ 9000 + port_offset }}' +beacon_node_listening_port: '{{ 9000 + port_offset }}' +beacon_node_metrics_port: '{{ 9200 + port_offset }}' +beacon_node_rpc_port: '{{ 9900 + port_offset }}' diff --git a/ansible/prater.yml b/ansible/prater.yml index ee4157e..0607a06 100644 --- a/ansible/prater.yml +++ b/ansible/prater.yml @@ -9,15 +9,17 @@ - local_action: command ./versioncheck.py changed_when: false -- name: Configure build nodes +- name: Deploy beacon node build nodes become: true hosts: - testing-large-01.aws-eu-central-1a.nimbus.pyrmont roles: - - { role: swap, tags: swap } - - { role: beacon-node-builds, tags: beacon-node-builds } + - role: swap-file + tags: swap-file + - role: beacon-node-builds + tags: beacon-node-builds -- name: Configure network prater +- name: Deploy prater Linux beacon nodes become: true # To avoid clashing/duplicate validators. any_errors_fatal: true @@ -26,12 +28,30 @@ - nimbus-prater-testing - nimbus-prater-unstable roles: - - { role: distribute-validators, tags: [ distribute-validators ] } - - { role: get-geth-web3-urls, tags: [ get-geth-web3-urls ] } - - { role: infra-role-beacon-node, tags: [ infra-role-beacon-node, beacon-node ] } + - role: distribute-validators + tags: distribute-validators + - role: get-geth-web3-urls + tags: get-geth-web3-urls + - role: infra-role-beacon-node + tags: [ infra-role-beacon-node, beacon-node ] -- name: Configure network prater Windows host +- name: Deploy prater Windows beacon nodes become: true - hosts: 'nimbus-prater-windows' - roles: - - { role: infra-role-beacon-node-windows, tags: [ infra-role-beacon-node-windows, beacon-node ] } + hosts: + - nimbus-prater-windows + tasks: + - include_role: name=infra-role-beacon-node-windows + tags: [ infra-role-beacon-node-windows, beacon-node ] + vars: + beacon_node_repo_branch: '{{ node.branch }}' + beacon_node_discovery_port: '{{ 9000 + port_offset }}' + beacon_node_listening_port: '{{ 9000 + port_offset }}' + beacon_node_metrics_port: '{{ 9200 + port_offset }}' + beacon_node_rpc_port: '{{ 9900 + port_offset }}' + with_items: + - { branch: 'stable' } + - { branch: 'unstable' } + - { branch: 'testing' } + loop_control: + loop_var: node + index_var: port_offset diff --git a/ansible/pyrmont.yml b/ansible/pyrmont.yml index 27de030..350c64e 100644 --- a/ansible/pyrmont.yml +++ b/ansible/pyrmont.yml @@ -15,9 +15,10 @@ - testing-large-01.aws-eu-central-1a.nimbus.pyrmont - testing-small-01.aws-eu-central-1a.nimbus.pyrmont roles: - - { role: swap, tags: swap } - - { role: beacon-node-builds, tags: beacon-node-builds } - + - role: swap-file + tags: swap-file + - role: beacon-node-builds + tags: beacon-node-builds - name: Configure network pyrmont become: true diff --git a/ansible/requirements.yml b/ansible/requirements.yml index b55db3e..f60d337 100644 --- a/ansible/requirements.yml +++ b/ansible/requirements.yml @@ -16,12 +16,12 @@ - name: infra-role-bootstrap src: git@github.com:status-im/infra-role-bootstrap.git - version: 0aca5b6927373c04b9713408e9d6b9284a906d75 + version: 58149fee4be9fed7b22cc610430aedc5906531ac scm: git - name: infra-role-bootstrap-windows src: git@github.com:status-im/infra-role-bootstrap.git - version: 9f82c62a4164041b9c87b9cb0807eb1657bf9277 + version: 55c1d494f7722b67b2c2f07abfcfbecd74779d17 scm: git - name: oauth-proxy @@ -71,7 +71,7 @@ - name: systemd-timer src: git@github.com:status-im/infra-role-systemd-timer.git - version: 945920327a6c9cd0bfd752dd48ad28f167025660 + version: 5eafd38e4374f56a3439232b72ec077d569e0f5c scm: git - name: swap-file