Skip to content

Commit

Permalink
chore: deployed penumbra-01 and updated systemd .service for penumbra
Browse files Browse the repository at this point in the history
  • Loading branch information
Catopish committed Jan 28, 2025
1 parent 343a803 commit 69da440
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 25 deletions.
4 changes: 4 additions & 0 deletions bkk06
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ajuna
polimec
unique
bifrost
penumbra

[routers]
bkk50
Expand All @@ -27,6 +28,9 @@ haproxy-bkk06
[ajuna]
rpc-ajuna-polkadot-01

[penumbra]
penumbra-01

[unique]
rpc-unique-polkadot-01

Expand Down
3 changes: 0 additions & 3 deletions bkk07
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ rpc-hydration-polkadot-02
[kilt]
rpc-kilt-polkadot-02

[penumbra]
penumbra-02

[kilt]
rpc-kilt-polkadot-02

Expand Down
2 changes: 1 addition & 1 deletion group_vars/penumbra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
penumbra_version: "0.81.2"
penumbra_chain_id: ""
cometbft_version: "0.37.14"
polkachu_version: "2681688"
polkachu_version: "3245417"

# dl locations
default_git_repo: "https://github.com/penumbra-zone/penumbra"
Expand Down
26 changes: 26 additions & 0 deletions host_vars/bkk06.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2188,3 +2188,29 @@ lxc_nodes:
- from_port: "{{ hostvars['rpc-bifrost-polkadot-01']['default_p2p_port'] }}"
to_host: "{{ hostvars['rpc-bifrost-polkadot-01']['container_ip'] }}:{{ hostvars['rpc-bifrost-polkadot-01']['default_p2p_port'] }}"
protocol: "tcp"
- host: "penumbra-01"
proxmox_config:
vmid: "1101"
hostname: "{{ hostvars['penumbra-01']['host_name'] }}"
ostemplate: "local:vztmpl/{{ default_container_template }}"
netif: "{{ hostvars['penumbra-01']['netif'] }}"
cores: 4
memory: 8192
swap: 8192
password: "{{ default_password }}"
disk: "{{ zfs_storage }}:20"
mounts: '{"mp0":"{{ zfs_storage }}:250,mp={{ hostvars["penumbra-01"]["default_database_path"] }}"}'
onboot: True
unprivileged: True
validate_certs: False
description: "{{ hostvars['penumbra-01']['default_network'] }} {{ hostvars['penumbra-01']['default_node_type'] }}: {{ hostvars['penumbra-01']['host_name'] }}"
state: present
features:
- nesting=1
port_forwards:
- from_port: "{{ hostvars['penumbra-01']['ansible_port'] }}"
to_host: "{{ hostvars['penumbra-01']['container_ip'] }}:{{ ssh_port }}"
protocol: "tcp"
- from_port: "{{ hostvars['penumbra-01']['default_cometbft_p2p_port'] }}"
to_host: "{{ hostvars['penumbra-01']['container_ip'] }}:{{ hostvars['penumbra-01']['default_cometbft_p2p_port'] }}"
protocol: "tcp"
27 changes: 27 additions & 0 deletions host_vars/penumbra-01.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
ansible_host: "160.22.181.181"
container_ip: "192.168.77.81"
ansible_port: 2481
host_name: "penumbra-01.ct.rotko.net"
host_timezone: "Asia/Bangkok"
netif: '{"net0":"name=eth0,gw={{ default_nat_network_forward_cidr.split("/")[0] }},ip={{ default_host_ip }}/8,bridge={{ default_nat_device }}"}'
role: "penumbra"
pinned_service: True

default_network: "penumbra"
default_node_type: "validator"
#need to be uniqued
default_cometbft_p2p_port: 26681

default_penumbra_metric_port: 9600
default_cometbft_rpc_port: 26657
default_acbi_port: 26658
default_grpc_port: 8080
default_cometbft_database: "goleveldb"
# 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
5 changes: 4 additions & 1 deletion host_vars/penumbra-02.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ pinned_service: True

default_network: "penumbra"
default_node_type: "validator"
default_penumbra_metric_port: 9600
#need to be uniqued
default_cometbft_p2p_port: 26682

default_penumbra_metric_port: 9600
default_cometbft_rpc_port: 26657
default_acbi_port: 26658
default_grpc_port: 8080
default_cometbft_database: "goleveldb"
# default_p2p_port: 33691
# default_p2p_port_ws: 34691
Expand Down
1 change: 1 addition & 0 deletions inventory
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ rpc-kilt-polkadot-01
rpc-kilt-polkadot-02

[penumbra]
penumbra-01
penumbra-02

[cumulus]
Expand Down
53 changes: 34 additions & 19 deletions roles/setup_install_penumbra/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,28 +136,43 @@
group: "{{ default_user }}"
when: not cometbft_dir.stat.exists

#NOTE: i dont know if this will work, but the wget cmd that commented out below will be working
# NOTE: havent tested it
# - name: Download Polkachu Cometbft snapshot
# ansible.builtin.uri:
# url: "https://snapshots.polkachu.com/snapshots/penumbra/penumbra_{{ polkachu_version }}.tar.lz4"
# dest: "{{ default_database_path }}/node0/penumbra_{{ polkachu_version }}.tar.lz4"
# method: GET
# force: true
# follow_redirects: safe
# use_proxy: true
# validate_certs: true
# mode: "0640"
# owner: "{{ default_user }}"
# group: "{{ default_user }}"
# force_basic_auth: true
# timeout: 3600
# url_username: ""
# url_password: ""
# creates: "{{ default_database_path }}/node0/penumbra_{{ polkachu_version }}.tar.lz4"
# http_agent: "Mozilla/5.0"
# force_ipv4: true
# become: true
# become_user: "{{ default_user }}"
# when: not cometbft_dir.stat.exists
# register: download_result
# until: download_result is succeeded
# retries: 3
# delay: 5

- name: Download Polkachu Cometbft snapshot
ansible.builtin.get_url:
url: "https://snapshots.polkachu.com/snapshots/penumbra/penumbra_{{ polkachu_version }}.tar.lz4"
dest: "{{ default_database_path }}/node0/penumbra_{{ polkachu_version }}.tar.lz4"
owner: "{{ default_user }}"
group: "{{ default_user }}"
mode: "0640"
force: True
ansible.builtin.shell:
cmd: "wget -O {{ default_database_path }}/node0/penumbra_{{ polkachu_version }}.tar.lz4 https://snapshots.polkachu.com/snapshots/penumbra/penumbra_{{ polkachu_version }}.tar.lz4 --inet4-only"
become: True
become_user: "{{ default_user }}"
when: not cometbft_dir.stat.exists

# - name: Download Polkachu Cometbft snapshot
# ansible.builtin.shell:
# cmd: "wget -O {{ default_database_path }}/node0/penumbra_{{ polkachu_version }}.tar.lz4 https://snapshots.polkachu.com/snapshots/penumbra/penumbra_{{ polkachu_version }}.tar.lz4 --inet4-only"
# become: True
# become_user: "{{ default_user }}"
# when: not cometbft_dir.stat.exists
# # when: ansible_local['noderole']['node']['version'] != penumbra_version
# args:
# executable: /bin/bash
# when: ansible_local['noderole']['node']['version'] != penumbra_version
args:
executable: /bin/bash

- name: Extract and decompress Polkachu snapshot
ansible.builtin.shell:
Expand All @@ -169,7 +184,7 @@
become_user: "{{ default_user }}"
when: not cometbft_dir.stat.exists

# NOTE: i still commented this out cause its58GB file and still for experimenting in case something wrong
# NOTE: i still commented this out cause its 71GB file and still for experimenting in case something wrong
# - name: Remove lz4 archive after decompression
# ansible.builtin.file:
# path: "{{ default_database_path }}/node0/penumbra_{{ polkachu_version }}.tar.lz4"
Expand Down
3 changes: 2 additions & 1 deletion roles/setup_install_penumbra/templates/validator.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ ExecStart={{ default_home_path }}/pd start \
--home {{ default_database_path }}/node0/pd \
--metrics-bind 0.0.0.0:{{ default_penumbra_metric_port }} \
--cometbft-addr http://127.0.0.1:{{ default_cometbft_rpc_port }} \
--abci-bind 127.0.0.1:{{ default_acbi_port }}
--abci-bind 127.0.0.1:{{ default_acbi_port }} \
--grpc-bind 127.0.0.1:{{ default_grpc_port }}

# Consider adding an HTTPS URL if you have DNS set up:
# ExecStart=/usr/local/bin/pd start --grpc-auto-https www.example.com
Expand Down

0 comments on commit 69da440

Please sign in to comment.