diff --git a/filter_plugins/pveumfilters.py b/filter_plugins/pveumfilters.py old mode 100755 new mode 100644 diff --git a/group_vars/cumulus.yaml b/group_vars/cumulus.yaml index 2883b47..d0a6f21 100644 --- a/group_vars/cumulus.yaml +++ b/group_vars/cumulus.yaml @@ -1,11 +1,11 @@ default_base_path: /opt/cumulus default_chain_spec_dl_url: https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/cumulus/parachains/chain-specs/{{ default_network }}.json -default_client_version: 1.14.0 +default_client_version: polkadot-stable2407 default_database: paritydb default_database_path: '{{ default_base_path }}/chains' default_download_base_url: https://github.com/paritytech/polkadot-sdk/releases/download/ -default_download_url: '{{ default_download_base_url }}polkadot-v{{ default_client_version +default_download_url: '{{ default_download_base_url }}{{ default_client_version }}/polkadot-parachain' default_group: '{{ service_users[''cumulus''] }}' default_log_level: info diff --git a/group_vars/hydradx.yaml b/group_vars/hydradx.yaml index 639ed90..472ad99 100644 --- a/group_vars/hydradx.yaml +++ b/group_vars/hydradx.yaml @@ -1,6 +1,6 @@ --- default_base_path: /opt/hydradx -default_client_version: v24.0.1 +default_client_version: v28.0.0 default_database: paritydb default_database_path: '{{ default_base_path }}/chains' default_download_base_url: https://github.com/galacticcouncil/HydraDX-node/releases/download/ diff --git a/group_vars/penumbra.yaml b/group_vars/penumbra.yaml new file mode 100644 index 0000000..0811af2 --- /dev/null +++ b/group_vars/penumbra.yaml @@ -0,0 +1,33 @@ +--- +# penumbra version +penumbra_version: "0.73.1" +penumbra_chain_id: "" + +# dl locations +penumbra_download_pcli_url: "https://github.com/penumbra-zone/penumbra/releases/download/v{{ penumbra_version }}/pcli-installer.sh" +penumbra_download_pd_url: "https://github.com/penumbra-zone/penumbra/releases/download/v{{ penumbra_version }}/pd-installer.sh" +penumbra_download_pclientd_url: "https://github.com/penumbra-zone/penumbra/releases/download/v{{ penumbra_version }}/pclientd-installer.sh" + +default_git_repo: "https://github.com/penumbra-zone/penumbra" + +# service/user +penumbra_service: "penumbra" +penumbra_user: "{{ service_users['penumbra'] }}" + +# paths +default_home_path: "/opt/penumbra" +default_src_path: "{{ default_home_path }}/src" +default_storage_path: "{{ default_home_path }}/data" +default_config_path: "{{ default_home_path }}/config" +default_log_path: "{{ default_home_path }}/logs" +default_script_path: "{{ default_home_path }}/scripts" + +default_network: "penumbra" +default_node_type: "validator" +default_p2p_port: 33691 +default_p2p_port_ws: 34691 +default_p2p_port_wss: 35691 +default_rpc_port: 9691 +default_secure_rpc_port: 42691 +default_prom_port: 7691 +zabbix_ext_port: 10691 diff --git a/group_vars/polkadot.yaml b/group_vars/polkadot.yaml index 54a5c72..884ab50 100644 --- a/group_vars/polkadot.yaml +++ b/group_vars/polkadot.yaml @@ -3,11 +3,11 @@ default_base_path: /opt/polkadot default_chain_spec: '{{ default_base_path }}/{{ default_network }}.json' default_chain_spec_dl_url: https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/polkadot/node/service/chain-specs/{{ default_network }}.json -default_client_version: 1.14.0 +default_client_version: polkadot-stable2407 default_database: paritydb default_database_path: /opt/polkadot/chains default_download_base_url: https://github.com/paritytech/polkadot-sdk/releases/download/ -default_download_url: '{{ default_download_base_url }}polkadot-v{{ default_client_version +default_download_url: '{{ default_download_base_url }}{{ default_client_version }}/polkadot' default_download_url_execute: '{{ default_download_base_url }}polkadot-v{{ default_client_version }}/polkadot-execute-worker' diff --git a/host_vars/ansible.yaml b/host_vars/ansible.yaml index 3ccf404..825c73a 100644 --- a/host_vars/ansible.yaml +++ b/host_vars/ansible.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.99" ansible_port: "2999" host_name: "ansible.rotko.net" diff --git a/host_vars/bkk00.yaml b/host_vars/bkk00.yaml index 8b3ca77..5a054e4 100644 --- a/host_vars/bkk00.yaml +++ b/host_vars/bkk00.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" ansible_port: 20780 host_name: "bkk00.rotko.net" # host_name: "gw.rotko.net" diff --git a/host_vars/bkk01.yaml b/host_vars/bkk01.yaml index 40aff9d..71a6c12 100644 --- a/host_vars/bkk01.yaml +++ b/host_vars/bkk01.yaml @@ -1,7 +1,7 @@ --- host_name: "bkk01.rotko.net" host_timezone: "Asia/Bangkok" -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" ansible_port: "20781" role: "proxmox" diff --git a/host_vars/bkk02.yaml b/host_vars/bkk02.yaml index dfe932a..a444203 100644 --- a/host_vars/bkk02.yaml +++ b/host_vars/bkk02.yaml @@ -1,7 +1,7 @@ --- host_name: "bkk02.rotko.net" host_timezone: "Asia/Bangkok" -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" ansible_port: "20782" role: "proxmox" diff --git a/host_vars/bkk03.yaml b/host_vars/bkk03.yaml index 959f611..dc6a007 100644 --- a/host_vars/bkk03.yaml +++ b/host_vars/bkk03.yaml @@ -1,7 +1,7 @@ --- host_name: "bkk03.rotko.net" host_timezone: "Asia/Bangkok" -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" ansible_port: "20783" role: "proxmox" diff --git a/host_vars/bkk04.yaml b/host_vars/bkk04.yaml index 10d4d8e..692dd2c 100644 --- a/host_vars/bkk04.yaml +++ b/host_vars/bkk04.yaml @@ -1,7 +1,7 @@ --- host_name: "bkk04.rotko.net" host_timezone: "Asia/Bangkok" -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" ansible_port: "20784" role: "proxmox" diff --git a/host_vars/bkk05.yaml b/host_vars/bkk05.yaml index 53c912e..e6eeea4 100644 --- a/host_vars/bkk05.yaml +++ b/host_vars/bkk05.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.105" ansible_port: "20785" host_name: "bkk05.rotko.net" diff --git a/host_vars/bkk06.yaml b/host_vars/bkk06.yaml index 6fae622..4411d64 100644 --- a/host_vars/bkk06.yaml +++ b/host_vars/bkk06.yaml @@ -1,7 +1,7 @@ --- host_name: "bkk06.rotko.net" host_timezone: "Asia/Bangkok" -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" ansible_port: "20786" role: "proxmox" diff --git a/host_vars/bkk07.yaml b/host_vars/bkk07.yaml index f050594..928122c 100644 --- a/host_vars/bkk07.yaml +++ b/host_vars/bkk07.yaml @@ -1,7 +1,7 @@ --- host_name: "bkk07.rotko.net" host_timezone: "Asia/Bangkok" -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" ansible_port: "20787" role: "proxmox" diff --git a/host_vars/bkk10.yaml b/host_vars/bkk10.yaml new file mode 100644 index 0000000..8fe7805 --- /dev/null +++ b/host_vars/bkk10.yaml @@ -0,0 +1,12 @@ +--- +ansible_host: "160.22.181.10" +ansible_port: 22 +host_name: "bkk10.rotko.net" +host_timezone: "Asia/Bangkok" +ansible_connection: ansible.netcommon.network_cli +ansible_network_os: community.network.routeros +ansible_user: ansible +ansible_private_key_file: ~/.ssh/unlabored/ansible_mikrotik +# ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bkk01"' + +default_gw_device: "bridge_local" diff --git a/host_vars/bkk20.yaml b/host_vars/bkk20.yaml new file mode 100644 index 0000000..6a01993 --- /dev/null +++ b/host_vars/bkk20.yaml @@ -0,0 +1,12 @@ +--- +ansible_host: "160.22.181.20" +ansible_port: 22 +host_name: "bkk20.rotko.net" +host_timezone: "Asia/Bangkok" +ansible_connection: ansible.netcommon.network_cli +ansible_network_os: community.network.routeros +ansible_user: ansible +ansible_private_key_file: ~/.ssh/unlabored/ansible_mikrotik +# ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bkk01"' + +default_gw_device: "bridge_local" diff --git a/host_vars/dot01.yaml b/host_vars/dot01.yaml index 39da8be..83bd544 100644 --- a/host_vars/dot01.yaml +++ b/host_vars/dot01.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.111" ansible_port: "2111" host_name: "dot01.rotko.net" diff --git a/host_vars/dot02.yaml b/host_vars/dot02.yaml index b08ab74..faef74b 100644 --- a/host_vars/dot02.yaml +++ b/host_vars/dot02.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.112" ansible_port: "2112" host_name: "dot02.rotko.net" diff --git a/host_vars/dot03.yaml b/host_vars/dot03.yaml index b3f49c4..b76f36e 100644 --- a/host_vars/dot03.yaml +++ b/host_vars/dot03.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.113" ansible_port: "2113" host_name: "dot03.rotko.net" diff --git a/host_vars/dot04.yaml b/host_vars/dot04.yaml index 3c74792..11e18fc 100644 --- a/host_vars/dot04.yaml +++ b/host_vars/dot04.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.114" ansible_port: "2114" host_name: "dot04.rotko.net" diff --git a/host_vars/dot14.yaml b/host_vars/dot14.yaml index 8ea0798..2fbea4c 100644 --- a/host_vars/dot14.yaml +++ b/host_vars/dot14.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.216" ansible_port: "2216" host_name: "dot14.rotko.net" diff --git a/host_vars/dot23.yaml b/host_vars/dot23.yaml index 945ab0c..7a80ee7 100644 --- a/host_vars/dot23.yaml +++ b/host_vars/dot23.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.13" ansible_port: "2313" host_name: "dot23.rotko.net" diff --git a/host_vars/dot26.yaml b/host_vars/dot26.yaml index fdb12a7..b5ada5d 100644 --- a/host_vars/dot26.yaml +++ b/host_vars/dot26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.16" ansible_port: "2316" host_name: "dot26.rotko.net" diff --git a/host_vars/enc14.yaml b/host_vars/enc14.yaml index 21e9a01..fbbcef4 100644 --- a/host_vars/enc14.yaml +++ b/host_vars/enc14.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.240" ansible_port: "2506" host_name: "enc14.rotko.net" diff --git a/host_vars/enc24.yaml b/host_vars/enc24.yaml index f8462af..c5abcab 100644 --- a/host_vars/enc24.yaml +++ b/host_vars/enc24.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.40" ansible_port: "2604" host_name: "enc24.rotko.net" diff --git a/host_vars/enc26.yaml b/host_vars/enc26.yaml index f165c5f..a7127d7 100644 --- a/host_vars/enc26.yaml +++ b/host_vars/enc26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.40" ansible_port: "2606" host_name: "enc26.rotko.net" diff --git a/host_vars/hdx26.yaml b/host_vars/hdx26.yaml index 63bf235..6d188db 100644 --- a/host_vars/hdx26.yaml +++ b/host_vars/hdx26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.83" ansible_port: "2836" host_name: "hdx26.rotko.net" diff --git a/host_vars/hdx27.yaml b/host_vars/hdx27.yaml index bb84c69..efb6f72 100644 --- a/host_vars/hdx27.yaml +++ b/host_vars/hdx27.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.77.83" ansible_port: "2837" host_name: "hdx27.rotko.net" diff --git a/host_vars/ibp.yaml b/host_vars/ibp.yaml index c81c894..8212005 100644 --- a/host_vars/ibp.yaml +++ b/host_vars/ibp.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.97" ansible_port: "2997" host_name: "ibp.rotko.net" diff --git a/host_vars/kbr13.yaml b/host_vars/kbr13.yaml index 5b257dc..bffd74f 100644 --- a/host_vars/kbr13.yaml +++ b/host_vars/kbr13.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.245" ansible_port: "2556" host_name: "kbr13.rotko.net" diff --git a/host_vars/kbr24.yaml b/host_vars/kbr24.yaml index 6a11459..cc1e2ae 100644 --- a/host_vars/kbr24.yaml +++ b/host_vars/kbr24.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.45" ansible_port: "2654" host_name: "kbr24.rotko.net" diff --git a/host_vars/kbr26.yaml b/host_vars/kbr26.yaml index afe56d9..915ac01 100644 --- a/host_vars/kbr26.yaml +++ b/host_vars/kbr26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.45" ansible_port: "2656" host_name: "kbr26.rotko.net" diff --git a/host_vars/kcore16.yaml b/host_vars/kcore16.yaml index b924516..832b3a2 100644 --- a/host_vars/kcore16.yaml +++ b/host_vars/kcore16.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.227" # 27 for coretime-kusama ansible_port: "2726" host_name: "kcore16.rotko.net" diff --git a/host_vars/kcore26.yaml b/host_vars/kcore26.yaml index 9339a66..902f120 100644 --- a/host_vars/kcore26.yaml +++ b/host_vars/kcore26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.27" # 37 for coretime-kusama ansible_port: "2826" host_name: "kcore26.rotko.net" diff --git a/host_vars/kcore27.yaml b/host_vars/kcore27.yaml index d08eeca..82ff644 100644 --- a/host_vars/kcore27.yaml +++ b/host_vars/kcore27.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.77.27" # 27 for coretime-kusama ansible_port: "2827" host_name: "kcore27.rotko.net" diff --git a/host_vars/kppl16.yaml b/host_vars/kppl16.yaml index 4b06e34..d972c0d 100644 --- a/host_vars/kppl16.yaml +++ b/host_vars/kppl16.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.228" # people kusama 28 ansible_port: "2756" host_name: "kppl16.rotko.net" diff --git a/host_vars/kppl26.yaml b/host_vars/kppl26.yaml index f19a61d..e39e084 100644 --- a/host_vars/kppl26.yaml +++ b/host_vars/kppl26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.28" # people kusama 28 ansible_port: "2856" host_name: "kppl26.rotko.net" diff --git a/host_vars/kppl27.yaml b/host_vars/kppl27.yaml index 8709953..cd0ed28 100644 --- a/host_vars/kppl27.yaml +++ b/host_vars/kppl27.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.77.28" # people kusama 28 ansible_port: "2857" host_name: "kppl27.rotko.net" diff --git a/host_vars/ksm01.yaml b/host_vars/ksm01.yaml index 8a93ce8..304a20d 100644 --- a/host_vars/ksm01.yaml +++ b/host_vars/ksm01.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.121" ansible_port: "2121" host_name: "ksm01.rotko.net" diff --git a/host_vars/ksm02.yaml b/host_vars/ksm02.yaml index 610be3e..e8fefdd 100644 --- a/host_vars/ksm02.yaml +++ b/host_vars/ksm02.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.122" ansible_port: "2122" host_name: "ksm02.rotko.net" diff --git a/host_vars/ksm03.yaml b/host_vars/ksm03.yaml index a700a96..e28c6c8 100644 --- a/host_vars/ksm03.yaml +++ b/host_vars/ksm03.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.123" ansible_port: "2123" host_name: "ksm03.rotko.net" diff --git a/host_vars/ksm04.yaml b/host_vars/ksm04.yaml index 1482e56..36b3947 100644 --- a/host_vars/ksm04.yaml +++ b/host_vars/ksm04.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.124" ansible_port: "2124" host_name: "ksm04.rotko.net" diff --git a/host_vars/ksm14.yaml b/host_vars/ksm14.yaml index febc37d..19d37bb 100644 --- a/host_vars/ksm14.yaml +++ b/host_vars/ksm14.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.226" ansible_port: "2226" host_name: "ksm14.rotko.net" diff --git a/host_vars/ksm24.yaml b/host_vars/ksm24.yaml index b2b2e4e..2020a5f 100644 --- a/host_vars/ksm24.yaml +++ b/host_vars/ksm24.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.24" ansible_port: "2324" host_name: "ksm24.rotko.net" diff --git a/host_vars/ksm26.yaml b/host_vars/ksm26.yaml index a65fff9..8f55bf6 100644 --- a/host_vars/ksm26.yaml +++ b/host_vars/ksm26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.26" ansible_port: "2326" host_name: "ksm26.rotko.net" diff --git a/host_vars/kvm07.yaml b/host_vars/kvm07.yaml index 823f982..5f2d166 100644 --- a/host_vars/kvm07.yaml +++ b/host_vars/kvm07.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.77.10" ansible_port: "20787" host_name: "kvm07.rotko.net" diff --git a/host_vars/matrix.yaml b/host_vars/matrix.yaml index 170436c..e57b715 100644 --- a/host_vars/matrix.yaml +++ b/host_vars/matrix.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.69" ansible_port: "2969" host_name: "matrix.rotko.net" diff --git a/host_vars/mine14.yaml b/host_vars/mine14.yaml index 6814301..d2efb7a 100644 --- a/host_vars/mine14.yaml +++ b/host_vars/mine14.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.242" ansible_port: "2526" host_name: "mine14.rotko.net" diff --git a/host_vars/mine24.yaml b/host_vars/mine24.yaml index 6849a0a..61cab49 100644 --- a/host_vars/mine24.yaml +++ b/host_vars/mine24.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.42" ansible_port: "2624" host_name: "mine24.rotko.net" diff --git a/host_vars/mine26.yaml b/host_vars/mine26.yaml index d58099a..a32a4de 100644 --- a/host_vars/mine26.yaml +++ b/host_vars/mine26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.42" ansible_port: "2626" host_name: "mine26.rotko.net" diff --git a/host_vars/mint14.yaml b/host_vars/mint14.yaml index 1a51b15..6f174e1 100644 --- a/host_vars/mint14.yaml +++ b/host_vars/mint14.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.241" ansible_port: "2516" host_name: "mint14.rotko.net" diff --git a/host_vars/mint23.yaml b/host_vars/mint23.yaml index e904b89..e683d1a 100644 --- a/host_vars/mint23.yaml +++ b/host_vars/mint23.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.41" ansible_port: "2613" host_name: "mint23.rotko.net" diff --git a/host_vars/mint26.yaml b/host_vars/mint26.yaml index 8a29e50..3541283 100644 --- a/host_vars/mint26.yaml +++ b/host_vars/mint26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.41" ansible_port: "2616" host_name: "mint26.rotko.net" diff --git a/host_vars/mint27.yaml b/host_vars/mint27.yaml index fd37799..60c9aaa 100644 --- a/host_vars/mint27.yaml +++ b/host_vars/mint27.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.77.41" ansible_port: "2617" host_name: "mint27.rotko.net" diff --git a/host_vars/monitor.yaml b/host_vars/monitor.yaml index 60a7d7c..4569fac 100644 --- a/host_vars/monitor.yaml +++ b/host_vars/monitor.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.98" ansible_port: "2998" host_name: "monitor.rotko.net" diff --git a/host_vars/pbr13.yaml b/host_vars/pbr13.yaml index 4d79b1a..1c97a62 100644 --- a/host_vars/pbr13.yaml +++ b/host_vars/pbr13.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.244" ansible_port: "2546" host_name: "pbr13.rotko.net" diff --git a/host_vars/pbr23.yaml b/host_vars/pbr23.yaml index 80022c6..95914f0 100644 --- a/host_vars/pbr23.yaml +++ b/host_vars/pbr23.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.44" ansible_port: "2643" host_name: "pbr23.rotko.net" diff --git a/host_vars/pbr26.yaml b/host_vars/pbr26.yaml index 477da81..c2780f2 100644 --- a/host_vars/pbr26.yaml +++ b/host_vars/pbr26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.44" ansible_port: "2646" host_name: "pbr26.rotko.net" diff --git a/host_vars/pch16.yaml b/host_vars/pch16.yaml index a31df34..ff2fba3 100644 --- a/host_vars/pch16.yaml +++ b/host_vars/pch16.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.247" ansible_port: "2576" host_name: "pch16.rotko.net" diff --git a/host_vars/pch23.yaml b/host_vars/pch23.yaml index e9d7974..2c0d088 100644 --- a/host_vars/pch23.yaml +++ b/host_vars/pch23.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.47" ansible_port: "2673" host_name: "pch23.rotko.net" diff --git a/host_vars/pch26.yaml b/host_vars/pch26.yaml index d629cae..d88e85c 100644 --- a/host_vars/pch26.yaml +++ b/host_vars/pch26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.47" ansible_port: "2676" host_name: "pch26.rotko.net" diff --git a/host_vars/pmint16.yaml b/host_vars/pmint16.yaml index de837fa..753dc1d 100644 --- a/host_vars/pmint16.yaml +++ b/host_vars/pmint16.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.250" ansible_port: "2946" host_name: "pmint16.rotko.net" diff --git a/host_vars/pmint26.yaml b/host_vars/pmint26.yaml index c91977d..7fab5e1 100644 --- a/host_vars/pmint26.yaml +++ b/host_vars/pmint26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.50" ansible_port: "2956" host_name: "pmint26.rotko.net" diff --git a/host_vars/pmint27.yaml b/host_vars/pmint27.yaml index 63d0958..d0bb151 100644 --- a/host_vars/pmint27.yaml +++ b/host_vars/pmint27.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.77.50" ansible_port: "2957" host_name: "pmint27.rotko.net" diff --git a/host_vars/pso03.yaml b/host_vars/pso03.yaml index 2737449..4db8d64 100644 --- a/host_vars/pso03.yaml +++ b/host_vars/pso03.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.73.103" ansible_port: "2103" host_name: "pso03.rotko.net" diff --git a/host_vars/pso06.yaml b/host_vars/pso06.yaml index b7f039b..4c50c9d 100644 --- a/host_vars/pso06.yaml +++ b/host_vars/pso06.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.146" ansible_port: "2146" host_name: "pso06.rotko.net" diff --git a/host_vars/pso07.yaml b/host_vars/pso07.yaml index 6f84248..503e56e 100644 --- a/host_vars/pso07.yaml +++ b/host_vars/pso07.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.77.107" ansible_port: "2107" host_name: "pso07.rotko.net" diff --git a/host_vars/pso16.yaml b/host_vars/pso16.yaml index e93b172..11f2230 100644 --- a/host_vars/pso16.yaml +++ b/host_vars/pso16.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.246" ansible_port: "2246" host_name: "pso16.rotko.net" diff --git a/host_vars/pso24.yaml b/host_vars/pso24.yaml index c8810df..b39c836 100644 --- a/host_vars/pso24.yaml +++ b/host_vars/pso24.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.48" ansible_port: "2348" host_name: "pso24.rotko.net" diff --git a/host_vars/pso26.yaml b/host_vars/pso26.yaml index 06497bd..8180bc1 100644 --- a/host_vars/pso26.yaml +++ b/host_vars/pso26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.46" ansible_port: "2346" host_name: "pso26.rotko.net" diff --git a/host_vars/wbr13.yaml b/host_vars/wbr13.yaml index 3eae553..494b3ac 100644 --- a/host_vars/wbr13.yaml +++ b/host_vars/wbr13.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.248" ansible_port: "2566" host_name: "wbr13.rotko.net" diff --git a/host_vars/wbr23.yaml b/host_vars/wbr23.yaml index 0a843d4..924a5de 100644 --- a/host_vars/wbr23.yaml +++ b/host_vars/wbr23.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.46" ansible_port: "2663" host_name: "wbr23.rotko.net" diff --git a/host_vars/wbr26.yaml b/host_vars/wbr26.yaml index 7223f17..22abec9 100644 --- a/host_vars/wbr26.yaml +++ b/host_vars/wbr26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.48" ansible_port: "2666" host_name: "wbr26.rotko.net" diff --git a/host_vars/wch13.yaml b/host_vars/wch13.yaml index 3a90aa9..e7e0035 100644 --- a/host_vars/wch13.yaml +++ b/host_vars/wch13.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.249" ansible_port: "2596" host_name: "wch13.rotko.net" diff --git a/host_vars/wch23.yaml b/host_vars/wch23.yaml index 4eda84e..2a0425c 100644 --- a/host_vars/wch23.yaml +++ b/host_vars/wch23.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.49" ansible_port: "2693" host_name: "wch23.rotko.net" diff --git a/host_vars/wch26.yaml b/host_vars/wch26.yaml index 31af3a7..d6b2ba8 100644 --- a/host_vars/wch26.yaml +++ b/host_vars/wch26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.49" ansible_port: "2696" host_name: "wch26.rotko.net" diff --git a/host_vars/wcore16.yaml b/host_vars/wcore16.yaml index 8168e74..a3c92f2 100644 --- a/host_vars/wcore16.yaml +++ b/host_vars/wcore16.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.237" # 37 for coretime-westend ansible_port: "2736" host_name: "wcore16.rotko.net" diff --git a/host_vars/wcore26.yaml b/host_vars/wcore26.yaml index 3a451b9..dfa0645 100644 --- a/host_vars/wcore26.yaml +++ b/host_vars/wcore26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.37" # 37 for coretime-westend ansible_port: "2936" host_name: "wcore26.rotko.net" diff --git a/host_vars/wcore27.yaml b/host_vars/wcore27.yaml index b643c6a..62e8459 100644 --- a/host_vars/wcore27.yaml +++ b/host_vars/wcore27.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.77.37" # 37 for coretime-westend ansible_port: "2937" host_name: "wcore27.rotko.net" diff --git a/host_vars/wglu16.yaml b/host_vars/wglu16.yaml index 7beb331..dc81246 100644 --- a/host_vars/wglu16.yaml +++ b/host_vars/wglu16.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.239" # 39 westend glutton ansible_port: "2796" host_name: "wglu16.rotko.net" diff --git a/host_vars/wglu26.yaml b/host_vars/wglu26.yaml index b0b3d6e..fabf5ed 100644 --- a/host_vars/wglu26.yaml +++ b/host_vars/wglu26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.39" # glutton westend 39 ansible_port: "2896" host_name: "wglu26.rotko.net" diff --git a/host_vars/wglu27.yaml b/host_vars/wglu27.yaml index e24bef9..18d2093 100644 --- a/host_vars/wglu27.yaml +++ b/host_vars/wglu27.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.77.39" # glutton westend 39 ansible_port: "2897" host_name: "wglu27.rotko.net" diff --git a/host_vars/wmint14.yaml b/host_vars/wmint14.yaml index 0f03cf6..dcdb28c 100644 --- a/host_vars/wmint14.yaml +++ b/host_vars/wmint14.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.243" ansible_port: "2536" host_name: "wmint14.rotko.net" diff --git a/host_vars/wmint23.yaml b/host_vars/wmint23.yaml index ef6562d..2b8deea 100644 --- a/host_vars/wmint23.yaml +++ b/host_vars/wmint23.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.43" ansible_port: "2633" host_name: "wmint13.rotko.net" diff --git a/host_vars/wmint26.yaml b/host_vars/wmint26.yaml index 46450ef..6428dc2 100644 --- a/host_vars/wmint26.yaml +++ b/host_vars/wmint26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.43" ansible_port: "2636" host_name: "wmint26.rotko.net" diff --git a/host_vars/wnd14.yaml b/host_vars/wnd14.yaml index 2d7f9d7..a9b3b2b 100644 --- a/host_vars/wnd14.yaml +++ b/host_vars/wnd14.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.236" ansible_port: "2236" host_name: "wnd14.rotko.net" diff --git a/host_vars/wnd23.yaml b/host_vars/wnd23.yaml index cd0bd22..f6d5ace 100644 --- a/host_vars/wnd23.yaml +++ b/host_vars/wnd23.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.69.33" ansible_port: "2333" host_name: "wnd23.rotko.net" diff --git a/host_vars/wnd26.yaml b/host_vars/wnd26.yaml index 3b6cce5..a4db15c 100644 --- a/host_vars/wnd26.yaml +++ b/host_vars/wnd26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.36" ansible_port: "2336" host_name: "wnd26.rotko.net" diff --git a/host_vars/wppl16.yaml b/host_vars/wppl16.yaml index b779767..e614ecb 100644 --- a/host_vars/wppl16.yaml +++ b/host_vars/wppl16.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.238" # people westend 38 ansible_port: "2766" host_name: "wppl16.rotko.net" diff --git a/host_vars/wppl26.yaml b/host_vars/wppl26.yaml index 2c8260c..d8bd5dd 100644 --- a/host_vars/wppl26.yaml +++ b/host_vars/wppl26.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.76.38" # people westend 38 ansible_port: "2866" host_name: "wppl26.rotko.net" diff --git a/host_vars/wppl27.yaml b/host_vars/wppl27.yaml index 4fd7d01..57b1832 100644 --- a/host_vars/wppl27.yaml +++ b/host_vars/wppl27.yaml @@ -1,5 +1,5 @@ --- -ansible_host: "27.131.160.106" +ansible_host: "160.22.181.181" container_ip: "192.168.77.38" # people westend 38 ansible_port: "2867" host_name: "wppl27.rotko.net" diff --git a/install_unlabored b/install_unlabored old mode 100755 new mode 100644 diff --git a/inventory b/inventory index 31b28ee..bee43e8 100644 --- a/inventory +++ b/inventory @@ -4,6 +4,7 @@ rotko [rotko:children] proxmox_hosts proxmox_nodes +proxmox_vms routers [proxmox_nodes:children] @@ -12,11 +13,22 @@ encointer hydradx polkadot +[proxmox_vms:children] +taloswrkr +talosctl + [proxmox_nodes] ansible matrix ibp +[taloswrkr] +taloswrkr0701 +taloswrkr0702 + +[talosctl] +talosctl0701 + [routers] bkk00 @@ -77,10 +89,14 @@ hdx27 [polkadot] dot01 dot02 +dot03 +dot04 ksm01 ksm02 +ksm03 ksm04 pso03 +pso04 pso06 pso07 dot14 @@ -129,4 +145,5 @@ bkk07 [access_management:children] hardware proxmox_nodes +proxmox_vms unmanaged diff --git a/pin.sh b/pin.sh new file mode 100755 index 0000000..374073e --- /dev/null +++ b/pin.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +# Define the lists of hosts with updated entries +polkadot_primary_hosts=( + "pso06" "pso07" "dot14" "pso16" "pso24" "pso26" "wnd14" "wnd23" + "ksm04" "ksm14" "dot23" "ksm24" +) +cumulus_primary_hosts=( + "kbr13" "kbr24" "mine24" "mine26" "mint14" "mint23" "pbr13" + "pbr23" "pbr26" "pch13" "pch23" "pmint27" "wbr13" "wbr23" + "wch13" "wch23" "wmint14" "wmint23" "wmint26" "wbr13" "wbr23" + "wch13" "wch23" "wmint14" "wmint23" +) + +polkadot_secondary_hosts=( + "dot01" "dot02" "dot26" "ksm01" "ksm02" "ksm26" "wnd26" +) + +cumulus_secondary_hosts=( + "kbr26" "mine14" "mint26" "mint27" "pch26" + "pmint16" "pmint26" "wcore16" "wcore26" "wcore27" + "wglu16" "wglu26" "wglu27" "wmint26" "wppl16" + "wppl26" "wppl27" "wbr26" "wch26" "wcore16" "wcore26" "wcore27" + "wglu16" "wglu26" "wglu27" "wmint26" "wppl16" + "wppl26" "wppl27" +) + +# Function to pin a single host +pin_host() { + local host="$1" + echo "pinning ${host}..." + inv pin "${host}" +} + +# Function to concurrently pin hosts +pin_hosts_concurrently() { + for host in "${@}"; do + pin_host "${host}" & + done + wait # Wait for all background jobs to finish +} + +# Check for input argument +if [ "$#" -ne 1 ]; then + echo "Usage: $0 " + echo "1: polkadot primary, 2: polkadot secondary, 3: cumulus primary, 4: cumulus secondary" + exit 1 +fi + +# Process the input argument +case "$1" in + 1) + pin_hosts_concurrently "${polkadot_primary_hosts[@]}" + ;; + 2) + pin_hosts_concurrently "${polkadot_secondary_hosts[@]}" + ;; + 3) + pin_hosts_concurrently "${cumulus_primary_hosts[@]}" + ;; + 4) + pin_hosts_concurrently "${cumulus_secondary_hosts[@]}" + ;; + *) + echo "Invalid list number: $1" + echo "1: Unfailed Hosts, 2: Failed Hosts" + exit 2 + ;; +esac diff --git a/playbooks/networkid_pk_backup.yaml b/playbooks/networkid_pk_backup.yaml index 3ec40a5..4993ace 100644 --- a/playbooks/networkid_pk_backup.yaml +++ b/playbooks/networkid_pk_backup.yaml @@ -77,12 +77,12 @@ pause: false - name: Fetch secret file to local machine + when: peerid.results | map(attribute='stdout') | list | length > 0 ansible.builtin.fetch: src: "{{ item.item.path }}" dest: "{{ local_backup_dir }}/{{ ansible_hostname }}_{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}_{{ peerid.results | map(attribute='stdout') | join('_') }}.secret_ed25519" flat: yes loop: "{{ peerid.results }}" - when: peerid.results | map(attribute='stdout') | list | length > 0 loop_control: label: "{{ item.item.path }}" pause: false diff --git a/playbooks/proxmox_install_nodes_tools.yaml b/playbooks/proxmox_install_nodes_tools.yaml new file mode 100644 index 0000000..cd3184c --- /dev/null +++ b/playbooks/proxmox_install_nodes_tools.yaml @@ -0,0 +1,15 @@ +# Standards: 0.2 +--- +- name: Default tools and configurations + hosts: proxmox_nodes + gather_facts: True + vars: + ansible_python_interpreter: /usr/bin/python3 + roles: + - setup_install_basic_tools + - setup_set_default_locale + - setup_set_timezone + - setup_ansible_facts + - setup_add_node_role + - setup_user_management + - setup_log_rotation diff --git a/playbooks/proxmox_install_vms.yaml b/playbooks/proxmox_install_vms.yaml new file mode 100644 index 0000000..b287524 --- /dev/null +++ b/playbooks/proxmox_install_vms.yaml @@ -0,0 +1,47 @@ +# Standards: 0.2 +--- +- name: Proxmox node setup + hosts: proxmox_hosts + gather_facts: True + roles: + - role: setup_networking_iptables + when: default_need_iptables_port_forwarding + +- name: RouterOS setup + hosts: proxmox_hosts + gather_facts: True + roles: + - role: setup_networking_routeros + when: default_need_routeros_port_forwarding + +- name: Proxmox setup nodes + hosts: proxmox_hosts + gather_facts: True + roles: + - role: proxmox_setup_vms + +- name: Default tools and configurations + hosts: proxmox_vms + gather_facts: True + roles: + - setup_set_default_locale + - setup_set_timezone + - setup_install_basic_tools + - setup_ansible_facts + - setup_add_node_role + - setup_user_management + - setup_log_rotation + +- name: Talos Worker setup + hosts: taloswrkr + gather_facts: True + roles: + - role: setup_talos_worker + when: default_need_talos_worker_setup + +- name: Talos Control Plane setup + hosts: talosctl + gather_facts: True + roles: + - role: setup_talos_control_plane + when: default_need_talos_control_plane_setup diff --git a/playbooks/update_sshd.yaml b/playbooks/update_sshd.yaml new file mode 100644 index 0000000..2986121 --- /dev/null +++ b/playbooks/update_sshd.yaml @@ -0,0 +1,14 @@ +--- +- name: Update sshd to latest version + hosts: proxmox_nodes, proxmox_hosts + gather_facts: False + become: true + tasks: + - name: Ensure package lists are up to date + ansible.builtin.apt: + update_cache: yes + + - name: Upgrade openssh-server to latest version + ansible.builtin.apt: + name: openssh-server + state: latest diff --git a/playbooks/version.yaml b/playbooks/version.yaml new file mode 100644 index 0000000..ecc7a06 --- /dev/null +++ b/playbooks/version.yaml @@ -0,0 +1,9 @@ +--- +- name: Unvault Proxmox Admin Token + hosts: proxmox_hosts + tasks: + - name: Decrypt and Print Proxmox Admin Token + ansible.builtin.debug: + var: api_token_secret + vars: + api_token_secret: "{{ ansible_local.proxmox.api.token | unvault(default_passphrase) }}" diff --git a/requirements-dev.txt b/requirements-dev.txt index 434487e..363256d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -10,4 +10,5 @@ black invoke wheel jmespath +setuptools -r requirements.txt diff --git a/roles/setup_install_cumulus/templates/cumulus_endpoint.service.j2 b/roles/setup_install_cumulus/templates/cumulus_endpoint.service.j2 index ad7e2f5..b61e86c 100644 --- a/roles/setup_install_cumulus/templates/cumulus_endpoint.service.j2 +++ b/roles/setup_install_cumulus/templates/cumulus_endpoint.service.j2 @@ -30,7 +30,7 @@ ExecStart={{ default_base_path }}/cumulus \ --max-runtime-instances 32 \ --rpc-max-request-size 16 \ --rpc-max-response-size 16 \ - --rpc-max-subscriptions-per-connection 512 \ + --rpc-max-subscriptions-per-connection 1024 \ --rpc-max-connections 10000 \ --rpc-external \ --rpc-methods safe \ diff --git a/roles/setup_install_encointer/templates/encointer_endpoint.service.j2 b/roles/setup_install_encointer/templates/encointer_endpoint.service.j2 index c8bab28..68a2b2c 100644 --- a/roles/setup_install_encointer/templates/encointer_endpoint.service.j2 +++ b/roles/setup_install_encointer/templates/encointer_endpoint.service.j2 @@ -34,7 +34,7 @@ ExecStart={{ default_base_path }}/encointer \ --max-runtime-instances 32 \ --rpc-max-request-size 16 \ --rpc-max-response-size 16 \ - --rpc-max-subscriptions-per-connection 512 \ + --rpc-max-subscriptions-per-connection 1024 \ --rpc-max-connections 10000 \ --allow-private-ipv4 diff --git a/roles/setup_install_polkadot/templates/polkadot_endpoint.service.j2 b/roles/setup_install_polkadot/templates/polkadot_endpoint.service.j2 index 4044ab5..ba2fd7f 100644 --- a/roles/setup_install_polkadot/templates/polkadot_endpoint.service.j2 +++ b/roles/setup_install_polkadot/templates/polkadot_endpoint.service.j2 @@ -34,7 +34,7 @@ ExecStart={{ default_base_path }}/polkadot \ --max-runtime-instances 32 \ --rpc-max-request-size 16 \ --rpc-max-response-size 16 \ - --rpc-max-subscriptions-per-connection 512 \ + --rpc-max-subscriptions-per-connection 1024 \ --rpc-max-connections 10000 \ --allow-private-ipv4 diff --git a/scripts/bootnode_backup.sh b/scripts/backup_peerid.sh similarity index 100% rename from scripts/bootnode_backup.sh rename to scripts/backup_peerid.sh diff --git a/scripts/lvmthin_autoresize.sh b/scripts/lvmthin_autoresize.sh old mode 100644 new mode 100755 diff --git a/scripts/regdo b/scripts/regdo deleted file mode 100755 index fa9741a..0000000 --- a/scripts/regdo +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# Function to check if a domain is already registered -is_domain_registered() { - local domain=$1 - if grep -q "$domain" <<< "$existing_dns_records"; then - return 0 # Domain is registered - else - return 1 # Domain is not registered - fi -} - -get_dns_record_id() { - local hostname=$1 - echo "$existing_dns_records" | grep "$hostname" | awk -F'ID: ' '{print $2}' | awk -F', ' '{print $1}' -} - -# Check if the argument is provided -if [ $# -ne 1 ]; then - echo "Usage: $0 sshconfigname" - exit 1 -fi - -ssh_details=$1 -# IP address for the DNS record -ip_address="27.131.160.106" - -# Fetch existing DNS records -existing_dns_records=$(porkctl dns list rotko.net) - -# SSH into the host and get the list of VMs -ssh_output=$(ssh "$ssh_details" 'pct list') - -# Parse the ssh_output to extract hostnames -# Adjusting the parsing logic based on your `pct list` output -hostnames=$(echo "$ssh_output" | awk '/rotko.net/{print $3}') - -# Debug: Echo hostnames after they are defined -echo "Hostnames found: $hostnames" - -# Loop through each hostname and register if not already done -for hostname in $hostnames; do - if ! is_domain_registered "$hostname"; then - # Register the domain - porkctl dns create --name "$hostname" --type A --data "$ip_address" - echo "Registered $hostname with IP $ip_address" - else - echo "$hostname is already registered." - # Extract the record ID - record_id=$(get_dns_record_id "$hostname") - if [ -n "$record_id" ]; then - # Update the existing DNS record - # porkctl dns update --record_id "$record_id" --name "$hostname" --type A --data "$ip_address" - # echo "Updated $hostname with IP $ip_address" - echo "skip update" - else - echo "Failed to find DNS record ID for $hostname" - fi - fi -done diff --git a/scripts/restore_peerid.sh b/scripts/restore_peerid.sh new file mode 100755 index 0000000..83be4d8 --- /dev/null +++ b/scripts/restore_peerid.sh @@ -0,0 +1,88 @@ +#!/bin/bash + +if [ $# -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +# The hostname of the remote machine +machine=$1 + +# Local backup directory +backup_dir="./bootnode_backup/" + +# Ensure the required tools are installed +check_dependencies() { + for cmd in ansible-inventory jq; do + if ! command -v $cmd &> /dev/null; then + echo "$cmd is required but not installed. Please install it." + exit 1 + fi + done +} + +# Extract hostnames and networks from the inventory file +get_proxmox_nodes_and_networks() { + local inventory_file=$1 + ansible-inventory -i "$inventory_file" --list | jq -r ' + .proxmox_nodes.children[] as $group | + .[$group].hosts[] as $host | + "\($host):\($group)" + ' +} + +# Function to restore a secret key file +restore_secret_key() { + local remote_path=$1 + local backup_filename=$2 + + # Check if the remote secret key file exists + if ssh "$machine" "[ -f $remote_path ]"; then + # Backup the existing secret key file + ssh "$machine" "mv $remote_path ${remote_path}.bak" + echo "Existing secret key file backed up to ${remote_path}.bak on $machine." + fi + + # Copy the new secret key file to the remote machine + scp "$backup_dir/$backup_filename" "$machine:$remote_path" + echo "Secret key file restored from $backup_filename to $remote_path on $machine." +} + +# Main function to process each node and network +process_node() { + local inventory_file="../inventory" + local nodes_and_networks + nodes_and_networks=$(get_proxmox_nodes_and_networks "$inventory_file") + + for node_network in $nodes_and_networks; do + IFS=':' read -r node network <<< "$node_network" + if [ "$node" == "$machine" ]; then + echo "Processing $machine for network $network..." + local base_path="/opt/$network/chains" + local sub_networks + sub_networks=$(ssh "$machine" "ls $base_path") + + for sub_network in $sub_networks; do + local secret_key_path="$base_path/$sub_network/network/secret_ed25519" + for backup_file in "$backup_dir"/*; do + IFS='_' read -r remote_hostname network peer_id <<< "$(basename "$backup_file" .secret_ed25519)" + if [ "$remote_hostname" == "$node" ]; then + restore_secret_key "$secret_key_path" "$(basename "$backup_file")" + fi + done + done + fi + done +} + +main() { + check_dependencies + + local inventory_file="../inventory" + process_node + + echo "All restore operations completed." +} + +main + diff --git a/unpin.sh b/unpin.sh index 348a17b..d42fd6b 100755 --- a/unpin.sh +++ b/unpin.sh @@ -9,7 +9,7 @@ cumulus_primary_hosts=( "kbr13" "kbr24" "mine24" "mine26" "mint14" "mint23" "pbr13" "pbr23" "pbr26" "pch13" "pch23" "pmint27" "wbr13" "wbr23" "wch13" "wch23" "wmint14" "wmint23" "wmint26" "wbr13" "wbr23" - "wch13" "wch23" "wmint14" "wmint23" + "wch13" "wch23" "wmint23" "kppl16" "kppl26" ) polkadot_secondary_hosts=( @@ -22,7 +22,7 @@ cumulus_secondary_hosts=( "wglu16" "wglu26" "wglu27" "wmint26" "wppl16" "wppl26" "wppl27" "wbr26" "wch26" "wcore16" "wcore26" "wcore27" "wglu16" "wglu26" "wglu27" "wmint26" "wppl16" - "wppl26" "wppl27" + "wppl26" "wppl27" "kppl26" ) # Function to unpin a single host