Skip to content

Commit

Permalink
chore: update endpoint templates & kilt/hydration configs
Browse files Browse the repository at this point in the history
  • Loading branch information
Catopish committed Dec 26, 2024
1 parent 22f1c7e commit 35713ef
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bkk07
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ routers
polkadot
hydration
cumulus
penumbra
kilt

[prometheus]
Expand Down Expand Up @@ -40,6 +39,7 @@ talosctl0701
bkk50

[hydration]
rpc-hydration-polkadot-02
hdx27

[kilt]
Expand Down
11 changes: 6 additions & 5 deletions group_vars/hydration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ default_group: "{{ service_users['hydration'] }}"
default_log_level: info
default_network: hydration
default_node_type: endpoint
default_p2p_port: 33800
default_p2p_port_ws: 34800
default_p2p_port_wss: 35800
default_prom_port: 7800
default_rpc_port: 9800
default_p2p_port_ws: 30434
default_p2p_port_wss: 30435
default_bootnode_p2p_port_ws: 30434
default_bootnode_p2p_port_wss: 30435
default_prom_port: 7400
default_rpc_port: 9400
default_secure_rpc_port: 42800
default_service: hydration
default_storage: "{{ default_base_path }}/chains"
Expand Down
2 changes: 2 additions & 0 deletions group_vars/kilt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ default_telemetry_url: wss://telemetry-backend.w3f.community/submit/ 1
default_user: "{{ service_users['kilt'] }}"
default_p2p_port_ws: 30434
default_p2p_port_wss: 30435
default_bootnode_p2p_port_ws: 30434
default_bootnode_p2p_port_wss: 30435
default_prom_port: 7400
default_rpc_port: 9400
default_secure_rpc_port: 42400
Expand Down
29 changes: 29 additions & 0 deletions host_vars/bkk07.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1209,3 +1209,32 @@ lxc_nodes:
- from_port: "{{ hostvars['rpc-kilt-polkadot-02']['default_p2p_port'] }}"
to_host: "{{ hostvars['rpc-kilt-polkadot-02']['container_ip'] }}:{{ hostvars['rpc-kilt-polkadot-02']['default_p2p_port'] }}"
protocol: "tcp"
- host: "rpc-hydration-polkadot-02"
proxmox_config:
vmid: "31262"
hostname: "{{ hostvars['rpc-hydration-polkadot-02']['host_name'] }}"
ostemplate: "local:vztmpl/{{ default_container_template }}"
netif: "{{ hostvars['rpc-hydration-polkadot-02']['netif'] }}"
cores: 4
memory: 16384
swap: 8192
password: "{{ default_password }}"
disk: "{{ zfs_storage }}:20"
mounts: '{"mp0":"{{ zfs_storage }}:150,mp={{ hostvars["rpc-hydration-polkadot-02"]["default_database_path"] }}"}'
onboot: True
unprivileged: True
validate_certs: False
description: "{{ hostvars['rpc-hydration-polkadot-02']['default_network'] }} {{ hostvars['rpc-hydration-polkadot-02']['default_node_type'] }}: {{ hostvars['rpc-hydration-polkadot-02']['host_name'] }}"
state: present
features:
- nesting=1
port_forwards:
- from_port: "{{ hostvars['rpc-hydration-polkadot-02']['ansible_port'] }}"
to_host: "{{ hostvars['rpc-hydration-polkadot-02']['container_ip'] }}:{{ ssh_port }}"
protocol: "tcp"
- from_port: "{{ hostvars['rpc-hydration-polkadot-02']['zabbix_ext_port'] }}"
to_host: "{{ hostvars['monitor']['container_ip'] }}:{{ zabbix_port }}"
protocol: "tcp"
- from_port: "{{ hostvars['rpc-hydration-polkadot-02']['default_p2p_port'] }}"
to_host: "{{ hostvars['rpc-hydration-polkadot-02']['container_ip'] }}:{{ hostvars['rpc-hydration-polkadot-02']['default_p2p_port'] }}"
protocol: "tcp"
1 change: 1 addition & 0 deletions host_vars/rpc-hydration-polkadot-01.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ default_rpc_port: 9400
default_prom_port: 7400
default_secure_rpc_port: 42838
zabbix_ext_port: 10838
default_bootnode_domain: "{{ default_network }}.boot.rotko.net"
25 changes: 25 additions & 0 deletions host_vars/rpc-hydration-polkadot-02.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
ansible_host: "160.22.181.181"
container_ip: "192.168.112.36"
ansible_port: 3136
host_name: "rpc-hydration-polkadot-02.ct.rotko.net"
host_timezone: "Asia/Bangkok"
netif: '{"net0":"name=eth0,gw={{ default_nat_network_forward_cidr.split("/")[0] }},ip={{ default_host_ip }}/16,bridge={{ default_nat_device }}"}'
role: "hydration"
pinned_service: True

default_telemetry_name: "Rotko Networks - {{ host_name.split('.')[0] }} {{ default_node_type | capitalize }}"
default_domain: "{{ host_name }}"
default_network: "hydradx"
default_relay_rpc: "ws://{{ hostvars['rpc-polkadot-01']['container_ip'] }}:{{ hostvars['rpc-polkadot-01']['default_rpc_port'] }}"
default_relay_rpc_fallback: "ws://{{ hostvars['rpc-polkadot-02']['container_ip'] }}:{{ hostvars['rpc-polkadot-02']['default_rpc_port'] }}"
default_database: "rocksdb"
default_node_type: "endpoint"
default_p2p_port: 31262
default_p2p_port_ws: 30434
default_p2p_port_wss: 30435
default_rpc_port: 9400
default_prom_port: 7400
default_secure_rpc_port: 42136
zabbix_ext_port: 10136
default_bootnode_domain: "{{ default_network }}.boot.rotko.net"
1 change: 1 addition & 0 deletions host_vars/rpc-kilt-polkadot-01.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ default_database: "rocksdb"
default_node_type: "endpoint"
zabbix_ext_port: 10836
default_p2p_port: 31241
default_bootnode_domain: "kilt.boot.rotko.net"
1 change: 1 addition & 0 deletions host_vars/rpc-kilt-polkadot-02.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ default_database: "rocksdb"
default_node_type: "endpoint"
zabbix_ext_port: 10834
default_p2p_port: 31242
default_bootnode_domain: "kilt.boot.rotko.net"
7 changes: 6 additions & 1 deletion inventory
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ bkk10
bkk20
bkk50

[kilt]
rpc-kilt-polkadot-01
rpc-kilt-polkadot-02

[cumulus]
mint14
pbr13
Expand Down Expand Up @@ -65,7 +69,6 @@ kcore27
kppl27
wppl27
mint27
rpc-kilt-polkadot-01
rpc-asset-hub-polkadot-01
rpc-asset-hub-polkadot-02
rpc-asset-hub-westend-01
Expand Down Expand Up @@ -111,6 +114,8 @@ enc24
enc26

[hydration]
rpc-hydration-polkadot-01
rpc-hydration-polkadot-02
hdx26
hdx27

Expand Down
4 changes: 3 additions & 1 deletion roles/setup_install_hydration/templates/endpoint.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ ExecStart={{ default_base_path }}/hydration \
--public-addr /dns/{{ default_domain }}/tcp/{{ default_p2p_port }} \
--public-addr /dns/{{ default_domain }}/tcp/{{ default_p2p_port_ws }}/ws \
--public-addr /dns/{{ default_domain }}/tcp/{{ default_p2p_port_wss }}/wss \
--rpc-port {{ default_rpc_port }} \
{% if default_bootnode_domain is defined %}--public-addr /dns/{{ default_bootnode_domain }}/tcp/{{ default_p2p_port }} \
--public-addr /dns/{{ default_bootnode_domain }}/tcp/{{ default_bootnode_p2p_port_wss }}/wss \
{% endif %}--rpc-port {{ default_rpc_port }} \
--prometheus-port {{ default_prom_port }} \
--prometheus-external \
--relay-chain-rpc-urls {{ default_relay_rpc }} {{ default_relay_rpc_fallback }} \
Expand Down
7 changes: 3 additions & 4 deletions roles/setup_install_kilt/templates/endpoint.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ ExecStart={{ default_base_path }}/kilt \
--sync full \
--listen-addr /ip4/0.0.0.0/tcp/{{ default_p2p_port }} \
--listen-addr /ip4/0.0.0.0/tcp/{{ default_p2p_port_ws }}/ws \
--public-addr /ip4/{{ ansible_host }}/tcp/{{ default_p2p_port }} \
--public-addr /ip4/{{ ansible_host }}/tcp/{{ default_p2p_port_ws }}/ws \
--public-addr /dns/{{ default_domain }}/tcp/{{ default_p2p_port }} \
--public-addr /dns/{{ default_domain }}/tcp/{{ default_p2p_port_ws }}/ws \
--public-addr /dns/{{ default_domain }}/tcp/{{ default_p2p_port_wss }}/wss \
--rpc-port {{ default_rpc_port }} \
{% if default_bootnode_domain is defined %}--public-addr /dns/{{ default_bootnode_domain }}/tcp/{{ default_p2p_port }} \
--public-addr /dns/{{ default_bootnode_domain }}/tcp/{{ default_bootnode_p2p_port_wss }}/wss \
{% endif %}--rpc-port {{ default_rpc_port }} \
--prometheus-port {{ default_prom_port }} \
--prometheus-external \
--relay-chain-rpc-urls {{ default_relay_rpc }} {{ default_relay_rpc_fallback }} \
Expand Down

0 comments on commit 35713ef

Please sign in to comment.