Nethence Documentation Lab Webmail Your IP BBDock  


Those documents are obsolete, please use the Nethence Documentation instead.

HomeUnixWindowsOracleObsoleteHardwareDIYMechanicsScriptsConfigsPrivate

Clusterit / Distributed Shell
 
Preparation
Make sure you've enabled SSH without password from the cluster it machine against the target hosts,
ssh-keygen
cat ~/.ssh/id_rsa.pub
(copy)
to target hosts,
vi ~/.ssh/authorized_keys
(paste)
 
Configuration
Create a file listing all node,
vi /etc/clusterit.conf
e.g.,
GROUP:linux
host1
host2
GROUP:solaris
host3
LUMP:unix
linux
solaris
Note hostnames must be in the short form, not fully qualified domain name.
 
Then setup those variables,
export RCMD_CMD=ssh
export RCP_CMD=scp
export CLUSTER=/etc/clusterit.conf
Note if you need special arguments to ssh or scp, just add them,
export RCMD_CMD="ssh -p portnum"
export RCP_CMD="scp -o Port=portnum"
 
Usage
Display the hosts and groups,
dsh -q
 
Check that a generic command works on every target,
dsh -e
echo check ok
 
Execute defined hosts only,
dsh -e -w node1,node2
 
Then choose a specific group to proceed with more specific system commands,
dsh -e -g group
 
To upload and execute a script,
dsh -e -g group -s scriptname.sh
Note. better use /bin/sh not /bin/ksh which is not necessary available everywhere.
 
References
Homepage
Manuals
On FreeBSD tutorial
 

Last update: Mar 10, 2016