[CentOS] best parallel / cluster SSH

Les Mikesell lesmikesell at gmail.com
Thu Feb 4 19:03:47 UTC 2010


On 2/4/2010 12:45 PM, nate wrote:
> Alan McKay wrote:
>
>> I was actually going to start another "configuration management redux"
>> thread as a follow up to a thread I started a few months ago.
>
> As Les mentioned, it's far more common in that situation to use
> ssh key authentication and a for loop, if your ssh key has a pass
> phrase use a ssh agent.
>
> I still use it quite often even though I do have a fairly extensive
> cfengine setup, sometimes I need something done right now such
> as a mass restart and can't wait for cfengine to run on each host.
>
> If you have servers say
>
> web01 ->  web30
>
> sample script to restart apache -
>
> for i in `seq -w 1 30`; do ssh root at web${i} "/etc/init.d/httpd restart"; done

Or keep the lists of servers in files so you can apply something like:

for i in `cat web-hosts`
to any ssh command loop

There's a big gray area between strict automation and manually logging 
in to every machine for maintenance and I find it helpful to layer the 
simple tools and steps you already know.

But, if someone ever gets cross-platform config management right or at 
least close enough that it is worth learning yet another description 
language I'd be very interested.  Cfengine v3 might be getting there but 
the windows version seems to be only available in the commercial build.

-- 
   Les Mikesell
    lesmikesell at gmail.com



More information about the CentOS mailing list