From de1ae7b873b3d4be90191e5fa889784a894fdb9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 4 Mar 2024 18:11:51 +0100 Subject: [PATCH] nimbus.mainnet: rename nodes to include bootstrap word MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is additional precaution to avoid accidental destruction of these hosts as they are used by Ethereum clients to connect to the network. Signed-off-by: Jakub SokoĊ‚owski --- README.md | 13 +++++ ansible/group_vars/nimbus.mainnet.yml | 53 +------------------ ...ap-01.aws-eu-central-1a.nimbus.mainnet.yml | 9 ++++ ...ap-02.aws-eu-central-1a.nimbus.mainnet.yml | 9 ++++ ...ll-01.aws-eu-central-1a.nimbus.mainnet.yml | 6 --- ...ll-02.aws-eu-central-1a.nimbus.mainnet.yml | 6 --- ansible/inventory/test | 16 +++--- ansible/mainnet.yml | 2 + ansible/vars/layout/mainnet.yml | 53 +++++++++++++++++++ mainnet.tf | 2 +- 10 files changed, 96 insertions(+), 73 deletions(-) create mode 100644 ansible/host_vars/bootstrap-01.aws-eu-central-1a.nimbus.mainnet.yml create mode 100644 ansible/host_vars/bootstrap-02.aws-eu-central-1a.nimbus.mainnet.yml delete mode 100644 ansible/host_vars/stable-small-01.aws-eu-central-1a.nimbus.mainnet.yml delete mode 100644 ansible/host_vars/stable-small-02.aws-eu-central-1a.nimbus.mainnet.yml create mode 100644 ansible/vars/layout/mainnet.yml diff --git a/README.md b/README.md index a6b28f9..be2d168 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,19 @@ The fleet layout configuration used by Ansible can be found in [`ansible/vars/la But for finding which host holds which validator use TSV files in [`ansible/files/layout`](ansible/files/layout). +# Bootstrap Nodes + +Some nodes in this repo are used as [bootstrap nodes](https://ethereum.org/en/developers/docs/nodes-and-clients/bootnodes/) for testnets and mainnet. + +Currently this includes: + +| Host | IP | +|-------------------------------------------------|----------------| +| `bootstrap-01.aws-eu-central-1a.nimbus.mainnet` | `3.120.104.18` | +| `bootstrap-02.aws-eu-central-1a.nimbus.mainnet` | `3.64.117.223` | + +They are recorded in the [`eth2-networks`](https://github.com/eth-clients/eth2-networks/blob/934c948e69205dcf2deb87e4ae6cc140c335f94d/shared/mainnet/bootstrap_nodes.txt#L28-L30) repository. + # Repo Usage Simplest way to run commands on fleets if you have SSH access: diff --git a/ansible/group_vars/nimbus.mainnet.yml b/ansible/group_vars/nimbus.mainnet.yml index 5278d44..bff0d54 100644 --- a/ansible/group_vars/nimbus.mainnet.yml +++ b/ansible/group_vars/nimbus.mainnet.yml @@ -118,55 +118,4 @@ open_ports_list: - { port: '{{ smart_metrics_listen_port }}', ipset: 'metrics.hq', comment: 'SMART Metrics' } - { port: '{{ geth_authrpc_port }}', ipset: 'nimbus.mainnet', comment: 'Geth RPC' } -# Split by hostname for more central location -nodes_layout: - # AWS -------------------------------------------------------------- - 'stable-small-01.aws-eu-central-1a.nimbus.mainnet': - - { branch: 'stable', history: 'archive' } - - 'stable-small-02.aws-eu-central-1a.nimbus.mainnet': - - { branch: 'stable', history: 'archive' } - - # Innova Hosting --------------------------------------------------- - 'linux-01.ih-eu-mda1.nimbus.mainnet': # Frankenstein host, all nodes use one Geth. - - { branch: 'stable', num: 1 } - - { branch: 'testing', num: 1, open_libp2p_ports: false } - - { branch: 'unstable', num: 1, public_api: true } - - { branch: 'unstable', num: 2 } - - 'linux-02.ih-eu-mda1.nimbus.mainnet': - - { branch: 'stable', num: 1 } - - { branch: 'testing', num: 1, public_api: true } - - { branch: 'unstable', num: 1, open_libp2p_ports: false } - - { branch: 'unstable', num: 2 } - - 'linux-03.ih-eu-mda1.nimbus.mainnet': - - { branch: 'stable', num: 1, max_peers: 10000 } - - { branch: 'testing', num: 1 } - - { branch: 'unstable', num: 1 } - - { branch: 'unstable', num: 2 } - - 'linux-04.ih-eu-mda1.nimbus.mainnet': - - { branch: 'stable', num: 1 } - - { branch: 'testing', num: 1 } - - { branch: 'unstable', num: 1 } - - { branch: 'unstable', num: 2 } - - 'linux-05.ih-eu-mda1.nimbus.mainnet': - - { branch: 'stable', num: 1 } - - { branch: 'testing', num: 1 } - - { branch: 'unstable', num: 1 } - - { branch: 'unstable', num: 2 } - - 'linux-06.ih-eu-mda1.nimbus.mainnet': - - { branch: 'stable', num: 1 } - - { branch: 'testing', num: 1 } - - { branch: 'unstable', num: 1 } - - { branch: 'unstable', num: 2 } - - 'linux-07.ih-eu-mda1.nimbus.mainnet': - - { branch: 'stable', num: 1 } - - { branch: 'libp2p', num: 1 } - - { branch: 'libp2p', num: 2 } - - { branch: 'libp2p', num: 3, extra_flags: ['--enable-yamux=true'] } - - { branch: 'libp2p', num: 4, extra_flags: ['--enable-yamux=true'] } +# Fleet layout can be found in: ansible/vars/layout/mainnet.yml diff --git a/ansible/host_vars/bootstrap-01.aws-eu-central-1a.nimbus.mainnet.yml b/ansible/host_vars/bootstrap-01.aws-eu-central-1a.nimbus.mainnet.yml new file mode 100644 index 0000000..9f23e0f --- /dev/null +++ b/ansible/host_vars/bootstrap-01.aws-eu-central-1a.nimbus.mainnet.yml @@ -0,0 +1,9 @@ +--- +swap_file_path: '/main.swap' + +# WARNING: Since these are Eth 2 bootnodes we need to keep the keys and IPs unchanged. +beacon_node_netkey: '{{lookup("bitwarden", "nimbus/netkey", field=hostname)}}' + +# These bootstrap nodes were published with these ports. +beacon_node_discovery_port: 9100 +beacon_node_listening_port: 9100 diff --git a/ansible/host_vars/bootstrap-02.aws-eu-central-1a.nimbus.mainnet.yml b/ansible/host_vars/bootstrap-02.aws-eu-central-1a.nimbus.mainnet.yml new file mode 100644 index 0000000..9f23e0f --- /dev/null +++ b/ansible/host_vars/bootstrap-02.aws-eu-central-1a.nimbus.mainnet.yml @@ -0,0 +1,9 @@ +--- +swap_file_path: '/main.swap' + +# WARNING: Since these are Eth 2 bootnodes we need to keep the keys and IPs unchanged. +beacon_node_netkey: '{{lookup("bitwarden", "nimbus/netkey", field=hostname)}}' + +# These bootstrap nodes were published with these ports. +beacon_node_discovery_port: 9100 +beacon_node_listening_port: 9100 diff --git a/ansible/host_vars/stable-small-01.aws-eu-central-1a.nimbus.mainnet.yml b/ansible/host_vars/stable-small-01.aws-eu-central-1a.nimbus.mainnet.yml deleted file mode 100644 index 205f233..0000000 --- a/ansible/host_vars/stable-small-01.aws-eu-central-1a.nimbus.mainnet.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -swap_file_path: '/main.swap' - -# These bootstrap nodes were published with these ports. -beacon_node_discovery_port: 9100 -beacon_node_listening_port: 9100 diff --git a/ansible/host_vars/stable-small-02.aws-eu-central-1a.nimbus.mainnet.yml b/ansible/host_vars/stable-small-02.aws-eu-central-1a.nimbus.mainnet.yml deleted file mode 100644 index 205f233..0000000 --- a/ansible/host_vars/stable-small-02.aws-eu-central-1a.nimbus.mainnet.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -swap_file_path: '/main.swap' - -# These bootstrap nodes were published with these ports. -beacon_node_discovery_port: 9100 -beacon_node_listening_port: 9100 diff --git a/ansible/inventory/test b/ansible/inventory/test index 1eb1f0c..02965b7 100644 --- a/ansible/inventory/test +++ b/ansible/inventory/test @@ -1,6 +1,8 @@ # NOTE: This file is generated by terraform.py # For emergency use when Consul fails [all] +bootstrap-01.aws-eu-central-1a.nimbus.mainnet hostname=bootstrap-01.aws-eu-central-1a.nimbus.mainnet ansible_host=3.120.104.18 env=nimbus stage=mainnet data_center=aws-eu-central-1a region=eu-central-1a dns_entry=bootstrap-01.aws-eu-central-1a.nimbus.mainnet.statusim.net +bootstrap-02.aws-eu-central-1a.nimbus.mainnet hostname=bootstrap-02.aws-eu-central-1a.nimbus.mainnet ansible_host=3.64.117.223 env=nimbus stage=mainnet data_center=aws-eu-central-1a region=eu-central-1a dns_entry=bootstrap-02.aws-eu-central-1a.nimbus.mainnet.statusim.net erigon-01.ih-eu-mda1.nimbus.holesky hostname=erigon-01.ih-eu-mda1.nimbus.holesky ansible_host=194.33.40.148 env=nimbus stage=holesky data_center=ih-eu-mda1 region=eu-mda1 dns_entry=erigon-01.ih-eu-mda1.nimbus.holesky.statusim.net erigon-02.ih-eu-mda1.nimbus.holesky hostname=erigon-02.ih-eu-mda1.nimbus.holesky ansible_host=194.33.40.149 env=nimbus stage=holesky data_center=ih-eu-mda1 region=eu-mda1 dns_entry=erigon-02.ih-eu-mda1.nimbus.holesky.statusim.net erigon-03.ih-eu-mda1.nimbus.holesky hostname=erigon-03.ih-eu-mda1.nimbus.holesky ansible_host=194.33.40.151 env=nimbus stage=holesky data_center=ih-eu-mda1 region=eu-mda1 dns_entry=erigon-03.ih-eu-mda1.nimbus.holesky.statusim.net @@ -47,17 +49,15 @@ neth-08.ih-eu-mda1.nimbus.holesky hostname=neth-08.ih-eu-mda1.nimbus.holesky ans neth-09.ih-eu-mda1.nimbus.holesky hostname=neth-09.ih-eu-mda1.nimbus.holesky ansible_host=185.181.229.100 env=nimbus stage=holesky data_center=ih-eu-mda1 region=eu-mda1 dns_entry=neth-09.ih-eu-mda1.nimbus.holesky.statusim.net neth-10.ih-eu-mda1.nimbus.holesky hostname=neth-10.ih-eu-mda1.nimbus.holesky ansible_host=185.181.229.103 env=nimbus stage=holesky data_center=ih-eu-mda1 region=eu-mda1 dns_entry=neth-10.ih-eu-mda1.nimbus.holesky.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 -stable-small-01.aws-eu-central-1a.nimbus.mainnet hostname=stable-small-01.aws-eu-central-1a.nimbus.mainnet ansible_host=3.120.104.18 env=nimbus stage=mainnet data_center=aws-eu-central-1a region=eu-central-1a dns_entry=stable-small-01.aws-eu-central-1a.nimbus.mainnet.statusim.net -stable-small-02.aws-eu-central-1a.nimbus.mainnet hostname=stable-small-02.aws-eu-central-1a.nimbus.mainnet ansible_host=3.64.117.223 env=nimbus stage=mainnet data_center=aws-eu-central-1a region=eu-central-1a dns_entry=stable-small-02.aws-eu-central-1a.nimbus.mainnet.statusim.net store-01.he-eu-hel1.logs.nimbus hostname=store-01.he-eu-hel1.logs.nimbus ansible_host=65.108.226.62 env=logs stage=nimbus data_center=he-eu-hel1 region=eu-hel1 dns_entry=store-01.he-eu-hel1.logs.nimbus.statusim.net store-02.he-eu-hel1.logs.nimbus hostname=store-02.he-eu-hel1.logs.nimbus ansible_host=65.109.62.247 env=logs stage=nimbus data_center=he-eu-hel1 region=eu-hel1 dns_entry=store-02.he-eu-hel1.logs.nimbus.statusim.net store-03.he-eu-hel1.logs.nimbus hostname=store-03.he-eu-hel1.logs.nimbus ansible_host=65.109.49.101 env=logs stage=nimbus data_center=he-eu-hel1 region=eu-hel1 dns_entry=store-03.he-eu-hel1.logs.nimbus.statusim.net [aws-eu-central-1a] +bootstrap-01.aws-eu-central-1a.nimbus.mainnet +bootstrap-02.aws-eu-central-1a.nimbus.mainnet mainnet-01.aws-eu-central-1a.nimbus.geth node-01.aws-eu-central-1a.dash.nimbus -stable-small-01.aws-eu-central-1a.nimbus.mainnet -stable-small-02.aws-eu-central-1a.nimbus.mainnet [dash.nimbus] node-01.aws-eu-central-1a.dash.nimbus @@ -180,8 +180,8 @@ linux-06.ih-eu-mda1.nimbus.mainnet linux-07.ih-eu-mda1.nimbus.mainnet [nimbus-mainnet-small] -stable-small-01.aws-eu-central-1a.nimbus.mainnet -stable-small-02.aws-eu-central-1a.nimbus.mainnet +bootstrap-01.aws-eu-central-1a.nimbus.mainnet +bootstrap-02.aws-eu-central-1a.nimbus.mainnet [nimbus-prater-metal] linux-01.ih-eu-mda1.nimbus.prater @@ -234,6 +234,8 @@ neth-09.ih-eu-mda1.nimbus.holesky neth-10.ih-eu-mda1.nimbus.holesky [nimbus.mainnet] +bootstrap-01.aws-eu-central-1a.nimbus.mainnet +bootstrap-02.aws-eu-central-1a.nimbus.mainnet linux-01.ih-eu-mda1.nimbus.mainnet linux-02.ih-eu-mda1.nimbus.mainnet linux-03.ih-eu-mda1.nimbus.mainnet @@ -241,8 +243,6 @@ linux-04.ih-eu-mda1.nimbus.mainnet linux-05.ih-eu-mda1.nimbus.mainnet linux-06.ih-eu-mda1.nimbus.mainnet linux-07.ih-eu-mda1.nimbus.mainnet -stable-small-01.aws-eu-central-1a.nimbus.mainnet -stable-small-02.aws-eu-central-1a.nimbus.mainnet [nimbus.prater] linux-01.ih-eu-mda1.nimbus.prater diff --git a/ansible/mainnet.yml b/ansible/mainnet.yml index 5004680..07eed55 100644 --- a/ansible/mainnet.yml +++ b/ansible/mainnet.yml @@ -13,6 +13,7 @@ become: true serial: '{{ serial|default(1) }}' hosts: 'nimbus-mainnet-small' + vars_files: layout/mainnet.yml vars: # WARNING: Since these are Eth 2 bootnodes we need to keep the keys and IPs unchanged. beacon_node_netkey: '{{lookup("bitwarden", "nimbus/netkey", field=hostname)}}' @@ -31,6 +32,7 @@ become: true serial: '{{ serial|default(1) }}' hosts: nimbus-mainnet-metal + vars_files: layout/mainnet.yml vars: # FIXME: Use all Geth nodes available in the fleet until we resync. geth_node_api_fleet_names: ['nimbus.geth'] diff --git a/ansible/vars/layout/mainnet.yml b/ansible/vars/layout/mainnet.yml new file mode 100644 index 0000000..6b8d93a --- /dev/null +++ b/ansible/vars/layout/mainnet.yml @@ -0,0 +1,53 @@ +--- +# This is data for infra-role-dist-validators. +nodes_layout: + # AWS -------------------------------------------------------------- + 'bootstrap-01.aws-eu-central-1a.nimbus.mainnet': + - { branch: 'stable', history: 'archive' } + + 'bootstrap-02.aws-eu-central-1a.nimbus.mainnet': + - { branch: 'stable', history: 'archive' } + + # Innova Hosting --------------------------------------------------- + 'linux-01.ih-eu-mda1.nimbus.mainnet': # Frankenstein host, all nodes use one Geth. + - { branch: 'stable', num: 1 } + - { branch: 'testing', num: 1, open_libp2p_ports: false } + - { branch: 'unstable', num: 1, public_api: true } + - { branch: 'unstable', num: 2 } + + 'linux-02.ih-eu-mda1.nimbus.mainnet': + - { branch: 'stable', num: 1 } + - { branch: 'testing', num: 1, public_api: true } + - { branch: 'unstable', num: 1, open_libp2p_ports: false } + - { branch: 'unstable', num: 2 } + + 'linux-03.ih-eu-mda1.nimbus.mainnet': + - { branch: 'stable', num: 1, max_peers: 10000 } + - { branch: 'testing', num: 1 } + - { branch: 'unstable', num: 1 } + - { branch: 'unstable', num: 2 } + + 'linux-04.ih-eu-mda1.nimbus.mainnet': + - { branch: 'stable', num: 1 } + - { branch: 'testing', num: 1 } + - { branch: 'unstable', num: 1 } + - { branch: 'unstable', num: 2 } + + 'linux-05.ih-eu-mda1.nimbus.mainnet': + - { branch: 'stable', num: 1 } + - { branch: 'testing', num: 1 } + - { branch: 'unstable', num: 1 } + - { branch: 'unstable', num: 2 } + + 'linux-06.ih-eu-mda1.nimbus.mainnet': + - { branch: 'stable', num: 1 } + - { branch: 'testing', num: 1 } + - { branch: 'unstable', num: 1 } + - { branch: 'unstable', num: 2 } + + 'linux-07.ih-eu-mda1.nimbus.mainnet': + - { branch: 'stable', num: 1 } + - { branch: 'libp2p', num: 1 } + - { branch: 'libp2p', num: 2 } + - { branch: 'libp2p', num: 3, extra_flags: ['--enable-yamux=true'] } + - { branch: 'libp2p', num: 4, extra_flags: ['--enable-yamux=true'] } diff --git a/mainnet.tf b/mainnet.tf index f167258..55ff8a5 100644 --- a/mainnet.tf +++ b/mainnet.tf @@ -54,7 +54,7 @@ resource "cloudflare_record" "era_mainnet" { module "nimbus_nodes_mainnet_stable_small" { source = "github.com/status-im/infra-tf-amazon-web-services" - name = "stable-small" + name = "bootstrap" env = "nimbus" stage = "mainnet" group = "nimbus-mainnet-small"