Aug 07

The key to working with a large compute farm is to setup it up to run as single machine or a few classes of machine.

‘gsh’ is a tool that lets you send a command to multiple machines:
http://outflux.net/unix/software/gsh/download/gsh-1.0.2.tar.gz

Here’s the gsh command line to setup the nagios clients on a class of machines at the same time (see nagios client post):

gsh cluster+cf01 “ln -s /bin/bash /bin/rbash ; mkdir -p /usr/local/nagios/libexec ; useradd -d /usr/local/nagios/libexec -s /bin/rbash nagios ; chown root.nagios /usr/local/nagios/libexec ;chmod 750 /usr/local/nagios/libexec”

To use gsh effectively you need to use ssh-agent or open ssh keys. I use ssh-agent and am comfortable with its security implications. If your site doesn’t allow any kind of auto-login process you’ll be stuck entering each passwd, however gsh assures exactly the same command is executed on each machine.

written by admin