[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to build Debian Linux cluster?

On Thu, 7 May 1998, Alexander Kushnirenko wrote:

> > component in the cluster within 2 hours.  I have since found out
> > listening to this list that the dpkg utility helps to make this
> > chore a lot simpler, if you learn to use the command line interface
> > (silly me).
> Could you please give more details about that.  Imagine I need to
> update some package (perl for example) on 6 nodes simultaneously, what
> do I do?

i don't know if this has been answered yet or not, but try this:

1. have one of the machines mirror the debian archives, including the
   non-US crypto-related stuff (secure shell - "ssh" - is essential).
   set up /etc/exports so that all local machines can NFS mount them.

2. set up all machines so that they NFS mount the debian main archive as
   /debian, and the debian non-US archive as /debian-non-US.

3. install ssh on all machines, and set them up to allow one machine to 
   have password-less root access to all of the others.

4. when you need to install/upgrade a package, write a little script like

    #! /bin/bash

    # list of hosts to execute commands on
    hosts='host1 host2 host3 host4 .....'

    # command(s) to run.  can be multiline command if needed
    cmd='dpkg -iBE /debian/path/to/package.deb'

    for i in $hosts ; do
        ssh $i $cmd

if you need to do more complex things on each machine in turn, then
start by write a shell or perl script to do the job, then copy it to
each machine (using scp) and execute it on each machine.  e.g. if you have
written a script called "fix-stuff.sh" which understands the command line
options "foo" and "bar", then a little wrapper script like the following
would copy it to all machines and execute it:

    #! /bin/bash

    # list of hosts to execute script on
    hosts='host1 host2 host3 host4 .....'

    for i in $hosts ; do
        scp fix-stuff.sh $i:/tmp
        ssh $i "/tmp/fix-stuff.sh foo bar"

these samples could easily be made generic so that they got $cmd or the
name of the script to copy&exec from the command line.


craig sanders

To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: