From f0f5f32e8ad7ec5241257bdf8238996a578bbb60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 28 Jun 2021 16:58:19 +0200 Subject: [PATCH] drop group_vars files in favor of generating container tags 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-metal.yml | 8 -------- ansible/group_vars/nimbus-prater-stable.yml | 2 -- ansible/group_vars/nimbus-prater-testing.yml | 2 -- .../nimbus-prater-unstable-libp2p-stable.yml | 2 -- .../nimbus-prater-unstable-libp2p-unstable.yml | 2 -- ansible/group_vars/nimbus-prater-unstable.yml | 2 -- ansible/group_vars/nimbus-prater-windows.yml | 10 ---------- ansible/group_vars/nimbus-pyrmont-stable.yml | 6 ------ ansible/group_vars/nimbus-pyrmont-testing.yml | 9 --------- .../group_vars/nimbus-pyrmont-unstable-libp2p.yml | 5 ----- ansible/group_vars/nimbus-pyrmont-unstable.yml | 10 ---------- .../{nimbus-mainnet-small.yml => nimbus.mainnet.yml} | 0 ansible/group_vars/nimbus.prater.yml | 11 +++++++++++ ansible/group_vars/nimbus.pyrmont.yml | 11 +++++++++++ ansible/inventory/test | 12 ++++++------ pyrmont.tf | 6 +++--- 16 files changed, 31 insertions(+), 67 deletions(-) delete mode 100644 ansible/group_vars/nimbus-prater-metal.yml delete mode 100644 ansible/group_vars/nimbus-prater-stable.yml delete mode 100644 ansible/group_vars/nimbus-prater-testing.yml delete mode 100644 ansible/group_vars/nimbus-prater-unstable-libp2p-stable.yml delete mode 100644 ansible/group_vars/nimbus-prater-unstable-libp2p-unstable.yml delete mode 100644 ansible/group_vars/nimbus-prater-unstable.yml delete mode 100644 ansible/group_vars/nimbus-prater-windows.yml delete mode 100644 ansible/group_vars/nimbus-pyrmont-stable.yml delete mode 100644 ansible/group_vars/nimbus-pyrmont-testing.yml delete mode 100644 ansible/group_vars/nimbus-pyrmont-unstable-libp2p.yml delete mode 100644 ansible/group_vars/nimbus-pyrmont-unstable.yml rename ansible/group_vars/{nimbus-mainnet-small.yml => nimbus.mainnet.yml} (100%) diff --git a/ansible/group_vars/nimbus-prater-metal.yml b/ansible/group_vars/nimbus-prater-metal.yml deleted file mode 100644 index 81271ff..0000000 --- a/ansible/group_vars/nimbus-prater-metal.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -beacon_node_network: 'mainnet' - -# WARNING: Since these are Eth 2 bootnodes we need to keep the keys and IPs unchanged. -#beacon_node_netkey: '{{lookup("passwordstore","services/Nimbus/netkey/"+hostname)}}' - -# Bootnodes should subscribe to all subnets -beacon_node_subscribe_all: true diff --git a/ansible/group_vars/nimbus-prater-stable.yml b/ansible/group_vars/nimbus-prater-stable.yml deleted file mode 100644 index 17bc6bd..0000000 --- a/ansible/group_vars/nimbus-prater-stable.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -beacon_node_cont_tag: 'stable-large' diff --git a/ansible/group_vars/nimbus-prater-testing.yml b/ansible/group_vars/nimbus-prater-testing.yml deleted file mode 100644 index b4dc87a..0000000 --- a/ansible/group_vars/nimbus-prater-testing.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -beacon_node_cont_tag: 'testing-large' diff --git a/ansible/group_vars/nimbus-prater-unstable-libp2p-stable.yml b/ansible/group_vars/nimbus-prater-unstable-libp2p-stable.yml deleted file mode 100644 index e0c732e..0000000 --- a/ansible/group_vars/nimbus-prater-unstable-libp2p-stable.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -beacon_node_cont_tag: 'unstable-libp2p-stable-large' diff --git a/ansible/group_vars/nimbus-prater-unstable-libp2p-unstable.yml b/ansible/group_vars/nimbus-prater-unstable-libp2p-unstable.yml deleted file mode 100644 index badfea3..0000000 --- a/ansible/group_vars/nimbus-prater-unstable-libp2p-unstable.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -beacon_node_cont_tag: 'unstable-libp2p-unstable-large' diff --git a/ansible/group_vars/nimbus-prater-unstable.yml b/ansible/group_vars/nimbus-prater-unstable.yml deleted file mode 100644 index 51c11ec..0000000 --- a/ansible/group_vars/nimbus-prater-unstable.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -beacon_node_cont_tag: 'unstable-large' diff --git a/ansible/group_vars/nimbus-prater-windows.yml b/ansible/group_vars/nimbus-prater-windows.yml deleted file mode 100644 index cfd4f9b..0000000 --- a/ansible/group_vars/nimbus-prater-windows.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -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/group_vars/nimbus-pyrmont-stable.yml b/ansible/group_vars/nimbus-pyrmont-stable.yml deleted file mode 100644 index 613e4be..0000000 --- a/ansible/group_vars/nimbus-pyrmont-stable.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -beacon_node_network: 'pyrmont' -beacon_node_cont_tag: 'stable-{{ (hostname is search("large")) | ternary("large", "small") }}' -dist_validators_layout: - "stable-large-01.aws-eu-central-1a.nimbus.pyrmont": { start: 0, end: 2500 } # 2500 - "stable-small-01.aws-eu-central-1a.nimbus.pyrmont": { start: 2500, end: 4500 } # 2000 diff --git a/ansible/group_vars/nimbus-pyrmont-testing.yml b/ansible/group_vars/nimbus-pyrmont-testing.yml deleted file mode 100644 index 39a6ec8..0000000 --- a/ansible/group_vars/nimbus-pyrmont-testing.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -beacon_node_network: 'pyrmont' -beacon_node_cont_tag: 'testing-{{ (hostname is search("large")) | ternary("large", "small") }}' -dist_validators_layout: - "testing-large-01.aws-eu-central-1a.nimbus.pyrmont": { start: 4500, end: 7750 } # 3250 - "testing-small-01.aws-eu-central-1a.nimbus.pyrmont": { start: 7750, end: 9750 } # 2000 - "testing-small-02.aws-eu-central-1a.nimbus.pyrmont": { start: 9750, end: 10750 } # 1000 - "testing-small-03.aws-eu-central-1a.nimbus.pyrmont": { start: 0, end: 0 } # bootstrap nodes - "testing-small-04.aws-eu-central-1a.nimbus.pyrmont": { start: 0, end: 0 } diff --git a/ansible/group_vars/nimbus-pyrmont-unstable-libp2p.yml b/ansible/group_vars/nimbus-pyrmont-unstable-libp2p.yml deleted file mode 100644 index 896e356..0000000 --- a/ansible/group_vars/nimbus-pyrmont-unstable-libp2p.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -beacon_node_network: 'pyrmont' -beacon_node_cont_tag: 'libp2p-{{ (hostname is search("large")) | ternary("large", "small") }}' -dist_validators_layout: - "unstable-libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont": { start: 19000, end: 20000 } # 1000 diff --git a/ansible/group_vars/nimbus-pyrmont-unstable.yml b/ansible/group_vars/nimbus-pyrmont-unstable.yml deleted file mode 100644 index c671215..0000000 --- a/ansible/group_vars/nimbus-pyrmont-unstable.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -beacon_node_network: 'pyrmont' -beacon_node_cont_tag: 'unstable-{{ (hostname is search("large")) | ternary("large", "small") }}' -dist_validators_layout: - "unstable-large-01.aws-eu-central-1a.nimbus.pyrmont": { start: 10750, end: 14750 } # 4000 - "unstable-large-02.aws-eu-central-1a.nimbus.pyrmont": { start: 14750, end: 16750 } # 2000 - "unstable-small-01.aws-eu-central-1a.nimbus.pyrmont": { start: 16750, end: 18250 } # 1500 - "unstable-small-02.aws-eu-central-1a.nimbus.pyrmont": { start: 18250, end: 18850 } # 600 - "unstable-small-03.aws-eu-central-1a.nimbus.pyrmont": { start: 18850, end: 18999 } # 149 - "unstable-small-04.aws-eu-central-1a.nimbus.pyrmont": { start: 18999, end: 19000 } # single validator diff --git a/ansible/group_vars/nimbus-mainnet-small.yml b/ansible/group_vars/nimbus.mainnet.yml similarity index 100% rename from ansible/group_vars/nimbus-mainnet-small.yml rename to ansible/group_vars/nimbus.mainnet.yml diff --git a/ansible/group_vars/nimbus.prater.yml b/ansible/group_vars/nimbus.prater.yml index 5e77f93..a3ed81e 100644 --- a/ansible/group_vars/nimbus.prater.yml +++ b/ansible/group_vars/nimbus.prater.yml @@ -1,4 +1,15 @@ --- +# 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") + )))))) }} + +beacon_node_cont_tag: '{{ node_branch }}-{{ node_size }}' beacon_node_network: 'prater' # Split by hostname for more central location diff --git a/ansible/group_vars/nimbus.pyrmont.yml b/ansible/group_vars/nimbus.pyrmont.yml index 2ae3d9f..c07095d 100644 --- a/ansible/group_vars/nimbus.pyrmont.yml +++ b/ansible/group_vars/nimbus.pyrmont.yml @@ -1,4 +1,15 @@ --- +# 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") + )))))) }} + +beacon_node_cont_tag: '{{ node_branch }}-{{ node_size }}' beacon_node_network: 'pyrmont' # Split by hostname for more central location diff --git a/ansible/inventory/test b/ansible/inventory/test index f18c559..a0cf508 100644 --- a/ansible/inventory/test +++ b/ansible/inventory/test @@ -2,6 +2,7 @@ # For emergency use when Consul fails [all] goerli-01.aws-eu-central-1a.nimbus.geth hostname=goerli-01.aws-eu-central-1a.nimbus.geth ansible_host=18.194.109.141 env=nimbus stage=geth data_center=aws-eu-central-1a region=eu-central-1a dns_entry=goerli-01.aws-eu-central-1a.nimbus.geth.statusim.net +libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont hostname=libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont ansible_host=18.195.225.101 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont.statusim.net mainnet-01.aws-eu-central-1a.nimbus.geth hostname=mainnet-01.aws-eu-central-1a.nimbus.geth ansible_host=18.196.208.138 env=nimbus stage=geth data_center=aws-eu-central-1a region=eu-central-1a dns_entry=mainnet-01.aws-eu-central-1a.nimbus.geth.statusim.net metal-01.he-eu-hel1.nimbus.prater hostname=metal-01.he-eu-hel1.nimbus.prater ansible_host=65.21.73.183 env=nimbus stage=prater data_center=he-eu-hel1 region=eu-hel1 dns_entry=metal-01.he-eu-hel1.nimbus.prater.statusim.net node-01.aws-eu-central-1a.dash.nimbus hostname=node-01.aws-eu-central-1a.dash.nimbus ansible_host=52.28.100.116 env=dash stage=nimbus data_center=aws-eu-central-1a region=eu-central-1a dns_entry=node-01.aws-eu-central-1a.dash.nimbus.statusim.net @@ -37,7 +38,6 @@ unstable-large-02.aws-eu-central-1a.nimbus.pyrmont hostname=unstable-large-02.aw unstable-large-03.aws-eu-central-1a.nimbus.prater hostname=unstable-large-03.aws-eu-central-1a.nimbus.prater ansible_host=18.198.64.62 env=nimbus stage=prater data_center=aws-eu-central-1a region=eu-central-1a dns_entry=unstable-large-03.aws-eu-central-1a.nimbus.prater.statusim.net unstable-large-04.aws-eu-central-1a.nimbus.prater hostname=unstable-large-04.aws-eu-central-1a.nimbus.prater ansible_host=3.65.231.145 env=nimbus stage=prater data_center=aws-eu-central-1a region=eu-central-1a dns_entry=unstable-large-04.aws-eu-central-1a.nimbus.prater.statusim.net unstable-large-05.aws-eu-central-1a.nimbus.prater hostname=unstable-large-05.aws-eu-central-1a.nimbus.prater ansible_host=3.66.4.227 env=nimbus stage=prater data_center=aws-eu-central-1a region=eu-central-1a dns_entry=unstable-large-05.aws-eu-central-1a.nimbus.prater.statusim.net -unstable-libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont hostname=unstable-libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont ansible_host=18.195.225.101 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=unstable-libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont.statusim.net unstable-small-01.aws-eu-central-1a.nimbus.pyrmont hostname=unstable-small-01.aws-eu-central-1a.nimbus.pyrmont ansible_host=52.57.100.135 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=unstable-small-01.aws-eu-central-1a.nimbus.pyrmont.statusim.net unstable-small-02.aws-eu-central-1a.nimbus.pyrmont hostname=unstable-small-02.aws-eu-central-1a.nimbus.pyrmont ansible_host=18.193.206.240 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=unstable-small-02.aws-eu-central-1a.nimbus.pyrmont.statusim.net unstable-small-03.aws-eu-central-1a.nimbus.pyrmont hostname=unstable-small-03.aws-eu-central-1a.nimbus.pyrmont ansible_host=52.28.209.174 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=unstable-small-03.aws-eu-central-1a.nimbus.pyrmont.statusim.net @@ -46,6 +46,7 @@ windows-01.gc-us-central1-a.nimbus.prater hostname=windows-01.gc-us-central1-a.n [aws-eu-central-1a] goerli-01.aws-eu-central-1a.nimbus.geth +libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont mainnet-01.aws-eu-central-1a.nimbus.geth node-01.aws-eu-central-1a.dash.nimbus node-01.aws-eu-central-1a.log-store.nimbus @@ -80,7 +81,6 @@ unstable-large-02.aws-eu-central-1a.nimbus.pyrmont unstable-large-03.aws-eu-central-1a.nimbus.prater unstable-large-04.aws-eu-central-1a.nimbus.prater unstable-large-05.aws-eu-central-1a.nimbus.prater -unstable-libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont unstable-small-01.aws-eu-central-1a.nimbus.pyrmont unstable-small-02.aws-eu-central-1a.nimbus.pyrmont unstable-small-03.aws-eu-central-1a.nimbus.pyrmont @@ -151,6 +151,9 @@ u-libp2p-u-large-01.aws-eu-central-1a.nimbus.prater [nimbus-prater-windows] windows-01.gc-us-central1-a.nimbus.prater +[nimbus-pyrmont-libp2p] +libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont + [nimbus-pyrmont-stable] stable-large-01.aws-eu-central-1a.nimbus.pyrmont stable-small-01.aws-eu-central-1a.nimbus.pyrmont @@ -170,9 +173,6 @@ unstable-small-02.aws-eu-central-1a.nimbus.pyrmont unstable-small-03.aws-eu-central-1a.nimbus.pyrmont unstable-small-04.aws-eu-central-1a.nimbus.pyrmont -[nimbus-pyrmont-unstable-libp2p] -unstable-libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont - [nimbus-rayonism-qmerge] qmerge-large-01.aws-eu-central-1a.nimbus.rayonism @@ -206,6 +206,7 @@ unstable-large-05.aws-eu-central-1a.nimbus.prater windows-01.gc-us-central1-a.nimbus.prater [nimbus.pyrmont] +libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont stable-large-01.aws-eu-central-1a.nimbus.pyrmont stable-small-01.aws-eu-central-1a.nimbus.pyrmont testing-large-01.aws-eu-central-1a.nimbus.pyrmont @@ -215,7 +216,6 @@ testing-small-03.aws-eu-central-1a.nimbus.pyrmont testing-small-04.aws-eu-central-1a.nimbus.pyrmont unstable-large-01.aws-eu-central-1a.nimbus.pyrmont unstable-large-02.aws-eu-central-1a.nimbus.pyrmont -unstable-libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont unstable-small-01.aws-eu-central-1a.nimbus.pyrmont unstable-small-02.aws-eu-central-1a.nimbus.pyrmont unstable-small-03.aws-eu-central-1a.nimbus.pyrmont diff --git a/pyrmont.tf b/pyrmont.tf index 60b235d..c4a290f 100644 --- a/pyrmont.tf +++ b/pyrmont.tf @@ -174,13 +174,13 @@ module "nimbus_nodes_pyrmont_unstable_small" { keypair_name = aws_key_pair.jakubgs.key_name } -module "nimbus_nodes_pyrmont_unstable_libp2p_small" { +module "nimbus_nodes_pyrmont_libp2p_small" { source = "github.com/status-im/infra-tf-amazon-web-services" - name = "unstable-libp2p-small" + name = "libp2p-small" env = "nimbus" stage = "pyrmont" - group = "nimbus-pyrmont-unstable-libp2p" + group = "nimbus-pyrmont-libp2p" domain = var.domain /* Scaling */