scripts/cluster
Matteo Cypriani 044f120fcc [cluster] deploy: add -P option
The -P option allows to transfer the files in parallel rather than one
by one.
2013-05-02 11:18:55 -04:00
..
README [cluster] deploy: add -P option 2013-05-02 11:18:55 -04:00
cluster-deploy.sh [cluster] deploy: add -P option 2013-05-02 11:18:55 -04:00
cluster-ping.sh Add cluster utilities 2013-04-29 16:43:41 -04:00
cluster-run.sh [cluster] Give up using getopt 2013-05-02 10:56:28 -04:00
cluster-ssh.sh [cluster] Give up using getopt 2013-05-02 10:56:28 -04:00

README

The cluster utilities are script allowing to work in parallel with a
number of remote hosts, using utilities such as Parallel SSH (pssh) or
fping. They all take as first and mandatory positional argument a host
list name “NAME”; the list will be searched according to the following
pattern:

```  $HOME/.config/cluster/NAME.lst

For example, one can call the cluster-ping.sh script typing:

```  cluster-ping my_hosts

to use the hosts' file $HOME/.config/cluster/my_hosts.lst

The format of such a .lst file is one line per host name or IP address,
for example:

```
192.168.42.1
192.168.42.3
priam
```

The scrits based on SSH use the local user's login name as remote login;
this can be changed using the ``-l`` option, that must appear before the
hosts' list on the command line, for example:

``` cluster-run -l root openwrt_machines opkg install screen

The provided scripts are detailed in the sequel.


= cluster-ping.sh =

Test the connectivity with the hosts of the list by sending them a ICMP
echo packet.

Dependency: fping


= cluster-ssh.sh =

Open a GNU Screen tab with an interactive SSH session for each host of
the hosts' list. Must be run inside of an existing Screen.

Dependencies: screen, ssh


= cluster-run.sh =

Run the same command on every host of the hosts' list.

Dependency: parallel-ssh (pssh)


= cluster-deploy.sh =

Deploy one or more files in parallel on every host of the hosts' list.
By default, the files are transfered one by one, to be sure to notice
the errors for each file (bad permissions, out of space, etc.), but the
-P option allows to transfer them all together.

Dependency: parallel-scp (pscp)