s_gaurav1091 has asked for the wisdom of the Perl Monks concerning the following question:

hi monks, I have a problem.I am using a installation script in perl to install a particular agent on a AIX machine.Now I am using a similar machine as a backup so that in case the first machine goes down the second machine takes its part.Now what i want is that when i run the installation script on first machine then this script should run on the second node also and the agent should get installed so that i dont have to specifically install on the peer node.I am not able to figure out that what i should do...
  • Comment on Simultaneous execution of installation script

Replies are listed 'Best First'.
Re: Simultaneous execution of installation script
by Joost (Canon) on Aug 23, 2005 at 10:54 UTC
    Erm... why do you want the installer for some single program to do this? Wouldn't it be a lot easier if you just replicated everything that's relevant from one master system to the backup machine(s)? rsync can do this, but there might be more specific programs that might require less work to configure (I am not a system administrator).

Re: Simultaneous execution of installation script
by puploki (Hermit) on Aug 23, 2005 at 10:50 UTC
    I don't really think this is a Perl question per-se, however, I assume that you want to use ssh (probably with keypairs to avoid the need to store logins and password) to execute the same script on the remote server.

    Your initial Perl script could do this for you with system() or fork() depending on whether you want to wait for it to finish or not.

Re: Simultaneous execution of installation script
by newroz (Monk) on Aug 23, 2005 at 10:59 UTC
    Hi,
    Use cfengine It is a bit hard to grasp.

    A perfect introduction is laid out at http://www.debian-administration.org/articles/224 and its precedent article.
    Not: I'm not sure if it works for AIX.
    UPDATE:
    And also this document.
    http://www.iu.hio.no/cfengine/confdir/laptop.html