From 9ebf3cba2d29d3d5cb6a495690de0fed5307dc77 Mon Sep 17 00:00:00 2001 From: Artur Marud <49659297+Marudny@users.noreply.github.com> Date: Wed, 15 Jun 2022 15:03:58 +0200 Subject: [PATCH] Sepolia (#110) * infra-nimbus: new testnet - sepolia Signed-off-by: Artur Marud --- ansible/inventory/test | 3 ++ ansible/kiln.yml | 6 ++++ ansible/sepolia.yml | 29 ++++++++++++++++++ .../nimbus-kiln-metal.yml} | 10 ++----- ansible/vars/nimbus-sepolia-metal.yml | 30 +++++++++++++++++++ 5 files changed, 70 insertions(+), 8 deletions(-) create mode 100644 ansible/sepolia.yml rename ansible/{group_vars/nimbus.kiln.yml => vars/nimbus-kiln-metal.yml} (74%) create mode 100644 ansible/vars/nimbus-sepolia-metal.yml diff --git a/ansible/inventory/test b/ansible/inventory/test index 011fdfc..0d20cd4 100644 --- a/ansible/inventory/test +++ b/ansible/inventory/test @@ -143,6 +143,9 @@ windows-01.he-eu-hel1.nimbus.prater [nimbus-ropsten-metal] metal-01.he-eu-hel1.nimbus.ropsten +[nimbus-sepolia-metal] +metal-01.he-eu-hel1.nimbus.kiln + [nimbus.eth1] metal-01.he-eu-hel1.nimbus.eth1 diff --git a/ansible/kiln.yml b/ansible/kiln.yml index 64321c7..1778ba7 100644 --- a/ansible/kiln.yml +++ b/ansible/kiln.yml @@ -1,3 +1,7 @@ +# Sepolia instances and kiln instances were installed on the same host +# Because of variables precedence and merging in ansible,¬ +# we had to use include_vars directive to load variables properly. +# Otherwise, we would run another 4 kiln instances under sepolia name. --- - name: Verify Ansible versions hosts: all @@ -17,6 +21,8 @@ roles: - { role: redirect-ports, tags: [ redirect-ports ] } tasks: + - include_vars: + file: vars/nimbus-kiln-metal.yml - include_role: name=infra-role-geth tags: [ geth, infra-role-geth ] with_items: '{{ nodes_layout[hostname] }}' diff --git a/ansible/sepolia.yml b/ansible/sepolia.yml new file mode 100644 index 0000000..06c0462 --- /dev/null +++ b/ansible/sepolia.yml @@ -0,0 +1,29 @@ +# Sepolia instances and kiln instances were installed on the same host +# Because of variables precedence and merging in ansible, +# we had to use include_vars directive to load variables properly. +# Otherwise, we would run another 4 kiln instances under sepolia name. +--- +- name: Verify Ansible versions + hosts: all + tags: always + become: false + run_once: true + gather_facts: false + tasks: + - local_action: command ./versioncheck.py + changed_when: false + +- name: Deploy Spolia Testnet nodes + become: true + serial: '{{ serial|default(1) }}' + hosts: + - nimbus-kiln-metal + tasks: + - include_vars: + file: vars/nimbus-sepolia-metal.yml + - include_role: name=infra-role-geth + tags: [ geth, infra-role-geth ] + with_items: '{{ nodes_layout[hostname] }}' + loop_control: + loop_var: node + index_var: idx diff --git a/ansible/group_vars/nimbus.kiln.yml b/ansible/vars/nimbus-kiln-metal.yml similarity index 74% rename from ansible/group_vars/nimbus.kiln.yml rename to ansible/vars/nimbus-kiln-metal.yml index 288ab61..ad74da0 100644 --- a/ansible/group_vars/nimbus.kiln.yml +++ b/ansible/vars/nimbus-kiln-metal.yml @@ -1,11 +1,11 @@ --- # Go-Ethereum geth_service_name: 'geth-kiln-{{ "%02d"|format(idx|int+1) }}' -geth_network_id: 1337802 +geth_network_name: 'kiln' geth_sync_mode: 'snap' geth_log_level_name: info # Container -geth_cont_tag: 'v1.10.17' +geth_cont_tag: 'v1.10.18' # Geth auth geth_account_pass: '{{lookup("bitwarden", "nimbus/geth", field="password")}}' # Memory settings @@ -14,12 +14,6 @@ geth_cont_mem_ratio: 0.3 geth_init_enabled: true geth_init_url: 'https://config.kiln.themerge.dev/el/genesis/geth.json' geth_init_sha256: 'd882fc918533489bc757683e09f9daba4921bdc4cfa80de27f088aa0ccb671ba' -# Bootsrap -geth_bootnodes: - - 'enode://c354db99124f0faf677ff0e75c3cbbd568b2febc186af664e0c51ac435609badedc67a18a63adb64dacc1780a28dcefebfc29b83fd1a3f4aa3c0eb161364cf94@164.92.130.5:30303' - - 'enode://d41af1662434cad0a88fe3c7c92375ec5719f4516ab6d8cb9695e0e2e815382c767038e72c224e04040885157da47422f756c040a9072676c6e35c5b1a383cce@138.68.66.103:30303' - - 'enode://91a745c3fb069f6b99cad10b75c463d527711b106b622756e9ef9f12d2631b6cb885f831d1c8731b9bc7177cae5e1ea1f1be087f86d7d30b590a91f22bc041b0@165.232.180.230:30303' - - 'enode://b74bd2e8a9f0c53f0c93bcce80818f2f19439fd807af5c7fbc3efb10130c6ee08be8f3aaec7dc0a057ad7b2a809c8f34dc62431e9b6954b07a6548cc59867884@164.92.140.200:30303' # Enable engine API geth_rcp_api: 'eth,net,web3,personal,admin,engine' geth_websocket_api: 'eth,net,web3,personal,admin,engine' diff --git a/ansible/vars/nimbus-sepolia-metal.yml b/ansible/vars/nimbus-sepolia-metal.yml new file mode 100644 index 0000000..69d3f19 --- /dev/null +++ b/ansible/vars/nimbus-sepolia-metal.yml @@ -0,0 +1,30 @@ +--- +# Go-Ethereum +geth_service_name: 'geth-sepolia-{{ "%02d"|format(idx|int+1) }}' +geth_network_name: 'sepolia' +geth_sync_mode: 'full' +geth_log_level_name: info +# Container +geth_cont_tag: 'v1.10.18' +# Geth auth +geth_account_pass: '{{lookup("bitwarden", "nimbus/geth", field="password")}}' +# Memory settings +geth_cont_mem_ratio: 0.3 +# Genesis +geth_init_enabled: false +# Ports +geth_port: '{{ 30303 + idx|int + 11 }}' +geth_metrics_port: '{{ 6060 + idx|int + 11 }}' +geth_rpc_enabled: true +geth_rpc_addr: '0.0.0.0' +geth_rpc_port: '{{ 8545 + idx|int + 11 }}' +geth_websocket_enabled: true +geth_websocket_addr: '0.0.0.0' +geth_websocket_port: '{{ 9546 + idx|int + 11 }}' + +nodes_layout: + 'metal-01.he-eu-hel1.nimbus.kiln': + - { } + - { } + - { } + - { }