Hacker News new | ask | show | jobs
by scriptdevil 2419 days ago
I used clusterssh in the past and it is really good at sending commands to multiple machines. However for any real work, I would strongly recommend keeping the typing to a bare minimum and do all your work inside a well tested script. Better yet, use ansible or something like it to manage multiple servers
3 comments

> I would strongly recommend keeping the typing to a bare minimum

Agreed.

> and do all your work inside a well tested script

At a minimum, with `set -ex` at the top. But I've stopped using (ba|fi||t?c)?sh scripts and switched to standard Makefiles for all my deployments. It requires changing the way you would normally code/script actions or interactions, but you get deterministic results.

Oh... This Makefiles stuff is interesting... mind to share a little more about it (or maybe some links)

I'm a script junkie... So it may be really useful for me to learn about this! =)

While developing such ansible scripts, or prototyping, you usually need to run the commands manually, so this becomes useful.
For that, do you really need to control more than one machine at a time?
Sure if you are prototyping a cluster with various types of nodes.
just run the playbook on a test cluster?
Tmux with sync-panes is similar but, imho, more convenient.
I started playing around with self-hosting some things I use a few months ago and I was thinking about using Ansible but it just seemed way too complex.