|
All about the system administration and application development behind a local linux-based company
I’ve recently discovered clusterssh, a tool that opens up many xterm sessions and binds them all to one keyboard input. I use it for updating my servers or reconfiguring them all in the same way. For example, since most of my boxes run the same OS version, they all need package updates at the same time, so after I get a flurry of “Update available” emails I have a quick look at an eratta site to see what problems I’m fixing, and then I fire up clusterssh and run (for example) sudo yum update. Here’s a quick screenshot to show it in action:
![]()
It works with clusters of servers, so you’ll have a configuration file like (~/.csshrc):
clusters = web-servers all-servers special-servers
all-servers = erek@libra.blumenthals.com erek@aquarius.blumenthals.com erek@scorpio.blumenthals.com erek@webserver1.blumenthals.com erek@webserver2.blumenthals.com
web-servers = erek@webserver1.blumenthals.com erek@webserver2.blumenthals.com
special-servers = erek@libra.blumenthals.com erek@aquarius.blumenthals.com erek@scorpio.blumenthals.com
Obviously, it works best if you have ssh keys set up to all of your servers. Then you can just run cssh
January 21st, 2008 at 8:07 pm
You should check out puppet (http://www.reductivelabs.com/projects/puppet/). It’s a different way of solving the same problem, but I find it works better than the ssh-multiplexing method. Plus it scales a lot higher — you can only connect to so many servers before it becomes overwhelming.
January 21st, 2008 at 8:17 pm
Gary, Thanks for the suggestion. I’ll definitely have a look at it. –Erek