Re: Re: Application Deployment

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

 



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
------------------------------------------------------------------------

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux