Application Deployment

Brian Fahrlander brian at fahrlander.net
Sat Oct 9 16:48:43 UTC 2004


On Sat, 2004-10-09 at 10:50, louis wang wrote:
> Brian Fahrlander
> 
> 	I think even only to run an instruction on each client,it is a time-consuming job is there anyone who can give much more efficient way!?

    Sure; this is *nix:

    Put the nodes names in a file, seperated by a newline (CR for the
newly-converted).  Then something like this:

# Usage: broadcast <command>
# $1 = <command>  = command to issue
#
for i in `cat nodenames`
  do
  echo "ssh root@" $i \"yum install $*\"
  done

    To be sure, you'll want to set up password-less ssh (many howtos are
available) and when you run the program, it'll take the command,
whatever it is, and walk through your nodename file, running the
command.

    Hint: if you end the command with "&" it'll present the command to
all machines at about the same time, without waiting for execution. This
is how supercomputers got started.  Now there are better tools, but this
is the key to that line of work.

    The script above will just "echo" what it'll do to the screen, so
you can cut-n-paste it to see how it'd work.  Removing it will actually
start things going.

    Enjoy!
      
-- 
------------------------------------------------------------------------
Brian Fahrländer                  Christian, Conservative, and Technomad
Evansville, IN                                 http://www.fahrlander.net
ICQ 5119262
AIM: WheelDweller
------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20041009/22677028/attachment-0001.sig>


More information about the fedora-list mailing list