status-im / infra-nimbus

Infrastructure for Nimbus cluster
https://nimbus.team
9 stars 6 forks source link

foreach.sh: easy way to run command across a fleet #170

Closed jakubgs closed 8 months ago

jakubgs commented 8 months ago

Usage example available in the README.

 > ./foreach.sh 

Usage: ./foreach.sh [FLEET] <COMMAND>

Examples:

./foreach.sh nimbus.sepolia 'systemctl start build-beacon-node-sepolia-stable'

echo linux-01.ih-eu-mda1.nimbus.sepolia | ./foreach.sh 'systemctl start build-beacon-node-sepolia-stable'

Available fleets:

all
aws-eu-central-1a
dash.nimbus
he-eu-hel1
ih-eu-mda1
log-dash
logs.nimbus
nimbus-eth1-metal
nimbus-fluffy-metal
nimbus-geth-goerli
...

This certainly can be improved, but it's a start.

yakimant commented 8 months ago

What is the benefit compared to running Ansible ansible FLEET -i ansible/inventory/test -a 'COMMAND'? No need to install and set it up?

jakubgs commented 8 months ago

The benefit is that @arnetheduck will stop whining about having to use Ansible.

jakubgs commented 8 months ago

Merged.