Skip to content

Commit

Permalink
feat: added basic template for penumbra & cometbft download_url
Browse files Browse the repository at this point in the history
  • Loading branch information
Catopish committed Dec 23, 2024
1 parent 7183c78 commit 0fb7eb1
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 33 deletions.
30 changes: 0 additions & 30 deletions bkk06
Original file line number Diff line number Diff line change
Expand Up @@ -31,55 +31,25 @@ rpc-kusama-01

[cumulus]
; rpc
boot-asset-hub-paseo
kbr13
kbr26
kcore16
kcore26
kppl16
kppl26
mine14
mine26
mint26
pbr13
pbr26
pch16
pch26

rpc-asset-hub-polkadot-01
rpc-asset-hub-kusama-01
rpc-asset-hub-westend-01
rpc-asset-hub-paseo-01

rpc-bridge-hub-polkadot-01
rpc-bridge-hub-kusama-01
rpc-bridge-hub-westend-01
rpc-bridge-hub-paseo-01

rpc-coretime-paseo-01
rpc-coretime-polkadot-01
rpc-coretime-kusama-01
rpc-coretime-westend-01

rpc-collectives-polkadot-01
rpc-collectives-westend-01

rpc-people-paseo-01
rpc-people-polkadot-01
rpc-people-kusama-01
rpc-people-westend-01

wbr13
wbr26
wch13
wch26
wcore16
wcore26
wmint14
wmint26
wppl16
wppl26

[kilt]
rpc-kilt-polkadot-01

Expand Down
8 changes: 8 additions & 0 deletions bkk07
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ bkk07
bkk07

[referrence_nodes]
rpc-kusama-02
rpc-paseo-02
rpc-polkadot-02
rpc-westend-02
rpc-kusama-01
rpc-paseo-01
rpc-polkadot-01
rpc-westend-01
dot14
ksm14
wnd14
Expand Down
5 changes: 3 additions & 2 deletions group_vars/penumbra.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
# penumbra version
penumbra_version: "0.73.1"
penumbra_version: "0.81.0"
penumbra_chain_id: ""
cometbft_version: "0.37.14"

# 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"

cometbft_download_url: "https://github.com/cometbft/cometbft/releases/download/v{{ cometbft_version }}/cometbft_{{ cometbft_version }}_linux_amd64.tar.gz"
default_git_repo: "https://github.com/penumbra-zone/penumbra"

# service/user
Expand Down
16 changes: 15 additions & 1 deletion roles/setup_install_penumbra/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
path: "{{ item }}"
owner: "{{ default_user }}"
group: "{{ default_user }}"
mode: '0750'
mode: "0750"
state: directory
loop:
- "{{ default_base_path }}"
Expand Down Expand Up @@ -61,3 +61,17 @@
args:
warn: False
executable: /bin/bash

- name: Download and install cometbft
ansible.builtin.get_url:
url: "{{ cometbft_download_url }}"
dest: "{{ default_home_path }}"
mode: "u+r+x"
owner: "{{ default_user }}"
group: "{{ default_user }}"
when: ansible_local['noderole']['node']['version'] != default_client_version

- name: Generate network config
ansible.builtin.command:
cmd: "./polkadot key generate-node-key --file {{ default_base_path }}/chains/{{ default_chains_name }}/network/secret_ed25519"
chdir: "{{ default_base_path }}"
12 changes: 12 additions & 0 deletions roles/setup_install_penumbra/templates/cometbft.service.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=CometBFT for Penumbra

[Service]
ExecStart={{ default_home_path }}/cometbft start --home /home/penumbra/.penumbra/network_data/node0/cometbft
Restart=no
User=penumbra
# Raise filehandle limit for RPC and P2P connections.
LimitNOFILE=65536

[Install]
WantedBy=default.target
27 changes: 27 additions & 0 deletions roles/setup_install_penumbra/templates/validator.service.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[Unit]
Description=Penumbra pd
Wants=cometbft.service

[Service]
# Support binding to 443/TCP for HTTPS.
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE

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

# Disable automatic restart, since governance votes can intentionally halt the chain.
# If you're running a validator, you should configure uptime monitoring.
Restart=no

# Assumes that the `penumbra` user exists.
User=penumbra

# Raise filehandle limit for tower-abci.
LimitNOFILE=65536
# Consider configuring logrotate if using debug logs
# Environment=RUST_LOG=info,pd=debug,penumbra=debug,jmt=debug

[Install]
WantedBy=default.target

0 comments on commit 0fb7eb1

Please sign in to comment.