Let's say you have 24 computers. They all have the same Linux or Unix distro on them, with the exact same configuration, but with different users. Is there a way to be able to do the exact same thing on all of them with one command? For example I'm running Lubuntu 14.04 and 14.10 comes out and I want to upgrade all of them while only running sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
once? Is there a software that would allow me to do that?
Asked
Active
Viewed 1,591 times
2

psimon
- 1,212

toxemicsquire
- 241
-
4Puppet, Chef, Ansible, Salt, etc... – jasonwryan Jun 21 '14 at 21:13
-
possibly a duplicate of http://serverfault.com/questions/17931/what-is-a-good-modern-parallel-ssh-tool which is a duplicate of others.. – Dani_l Jul 18 '14 at 09:47
-
@jasonwryan, what, no love for CFEngine? – Wildcard Jun 04 '16 at 01:46
-
@Wildcard I just thought I'd mention those people are likely to encounter in real life... :p – jasonwryan Jun 04 '16 at 02:18
-
@jasonwryan I guess JP Morgan/Chase, LinkedIn, DirecTV, and Chevron are all fantasy land in your book. ;) I think the pull model (and declarative approach) is the future of IT administration...much more scalable and secure. But then, I use CFEngine every day. – Wildcard Jun 04 '16 at 02:23
-
1@Wildcard don't get your panties in a knot. It was a joke... I wasn't creating an encyclopedic list, just making the point there are plenty of options. – jasonwryan Jun 04 '16 at 02:33
2 Answers
2
I use ClusterSSH. I also use it to administer groups of machines, not just all of them at the same time. That is, I set up shell aliases to open, for example, just the name servers, or just the mail servers, or just the Web servers, etc. Careful! This tool will give you an appreciation for configuration management. There's a nice article on Linux.com.

Christopher
- 15,911
0
I would write a small BASH
script for that manually. A simple for
loop can do it for you:
#!/bin/bash
for $host in IPs OF REMOTE HOSTS SPACE SEPARATED
do
ssh root@$host 'remote command eg. apt-get upgrade'
done

psimon
- 1,212
-
That is highly inefficient in large scale deployment, as the commands are done serially. Personally I like psh but that's xcat specific. Basically any concurrent ssh will do and see http://serverfault.com/questions/17931/what-is-a-good-modern-parallel-ssh-tool – Dani_l Jul 18 '14 at 09:45
-
-
-
might work, but no easy control of sliding window - how many parallel tunnels would you like to run at any given time? most parallel execution shells allow for easy setting of this value. It can be done in shell (I wrote something similar years ago) but really not worth the headache. You have to monitor the connections, and start a new one for each one that finishes... – Dani_l Jul 21 '14 at 21:41