polkachu / cosmos-validators Goto Github PK
View Code? Open in Web Editor NEWAnsible Script for Cosmos-based blockchain validators
Ansible Script for Cosmos-based blockchain validators
update apt and upgrade to all latest packages.
install all required build packages with apt.
install latest version of go and set paths.
minimum_gas_price: '0.01ucre,0.01bucre'
should be minimum_gas_price: '0.01ucre,0.01ubcre'
The firewall-related tasks assume the user is running the node on a publicly exposed machine. Some users may use a top-of-rack firewall or other solution and not wish to have UFW installed on the specific machine hosting the node. I understand that supporting alternative firewall solutions is probably out of scope for this project, but UFW should at the very least be opt out for users with special setups.
Hello, Thanks for amazing contribution to #web3.
We can improve from old,new
to key
:value
based
From
cosmos-validators/roles/node_configure/tasks/main.yml
Lines 14 to 39 in 7a2bec2
To
vars:
config_changes:
'laddr = "tcp://0.0.0.0:26656"': 'laddr = "tcp://0.0.0.0:{{ custom_port_prefix }}656"'
...
- name: Adjust config.toml port when needed
lineinfile:
path: '{{ user_dir }}/{{ folder }}/config/config.toml'
regexp: '{{ item.key }}'
line: '{{ item.value }}'
Hello,
What is the license of this project ?
Regards
make the user a variable to be set and modify paths to suit.
The following lines in inventory.sample
if followed too closely will cause bugs when running the main playbook:
[mainnets]
mainnet1 ansible_host=10.0.0.1
Specifically, since a folder in group_vars
is named mainnets
if an end user (me in this case) creates a group named mainnets
like in the sample, all the files in that group_vars/mainnets
folder will be applied, causing unexpected behavior.
TASK [node_initialize : regular genesis download] ***************************************************************************************************************
fatal: [chihuahua]: FAILED! => {"changed": false, "dest": "/home/ubuntu/.chihuahuad/config/genesis.json", "elapsed": 0, "gid": 1000, "group": "ubuntu", "mode": "0644", "msg": "Request failed", "owner": "ubuntu", "response": "HTTP Error 404: Not Found", "size": 5245, "state": "file", "status_code": 404, "uid": 1000, "url": "https://raw.githubusercontent.com/polkachu/validator-guide/main/testnet-genesis/chihuahua/chitestnet-6/genesis.json"}
Thanks for this awesome resource btw ๐
Run ufw command only if prepare is true in node_launch role.
ignore_errors: (prepare is defined) and (prepare|bool is false)
So
cosmos-validators/roles/node_launch/tasks/main.yml
Lines 2 to 8 in 9a4e54e
- name: open prometheus port
become: true
command: 'ufw allow {{ custom_port_prefix }}660/tcp'
ignore_errors: (prepare is defined) and (prepare|bool is false)
- name: open p2p port
become: true
command: 'ufw allow {{ custom_port_prefix }}656/tcp'
ignore_errors: (prepare is defined) and (prepare|bool is false)
If this ansible is meant for a validator, it is best practice to keef the default "false" value for binary download. it is considered a possible security vulnerability and should only be used on nodes.
So, at the very least, it should be made a variable for the ansible that needs to be set by the user and is default "false"
Use ansible git module to avoid manual command. Towards ansible way
cosmos-validators/roles/node_install/tasks/main.yml
Lines 4 to 13 in 5e261eb
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.