AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
Expand all | Collapse all

Perl module management across multiple machines

  • 1.  Perl module management across multiple machines

    Posted Tue February 13, 2007 12:42 PM

    Originally posted by: KentPerrier


    I want to install a series of perl modules on all of my AIX machines. I do not want to manually install them on each machine. Has anyone had any luck in building RPMs of perl modules? The version of RPM that comes with AIX now is so old that it makes any web sites that have information on building RPMs worthless as they all assume are using rpm v4.

    Or, perhaps you use something else to manage perl modules/other software on AIX.

    Thanks!
    #AIX-Forum


  • 2.  Re: Perl module management across multiple machines

    Posted Tue February 13, 2007 04:16 PM

    Originally posted by: eJones



    Have you considered to setup a local CPAN archive?
    Maybe not a full mirror, but at least those modules + dependents you use often.

    We have the same issues here, more and more systems needing perl modules installed.
    After tracking down all the dependencies, we finally have a working system.
    Then 2 weeks later another system needs those modules too...

    We have space on a central NIM server that all clients have NFS rights to.
    Now just have to find time to collect all the modules and setup a local mirror.

    http://sial.org/howto/perl/life-with-cpan/

    Eric
    #AIX-Forum


  • 3.  Re: Perl module management across multiple machines

    Posted Tue February 13, 2007 05:24 PM

    Originally posted by: KentPerrier


    The problem with this method is that it still requires us to have a C compiler on each machines that we want to push these perl modules to. The modules we want to push out have chuncks of C code in them. The SSL module comes to mind.

    This is not something we want to do. We would prefer to build the RPMs on one server, then push them to all of our machines and install them that way.

    Thanks for the reply! I work for a university so we have a fat pipe to the internet and I have done this on some systems to get the immediate needs satisified. But I do not see this as a long term solution. I don't think it scales very well either.
    #AIX-Forum


  • 4.  Re: Perl module management across multiple machines

    Posted Wed February 14, 2007 07:32 AM

    Originally posted by: SystemAdmin


    If you have or can establish shared access to the directory where you build the modules you can run the full procedure once, then sign on to each AIX system and just run "make install". If the library configurations of all your systems are equivalent this should work properly for you.

    HTH

    Jim Lane
    #AIX-Forum


  • 5.  Re: Perl module management across multiple machines

    Posted Wed February 14, 2007 08:51 AM

    Originally posted by: KentPerrier


    That too does not scale. With varying versions of AIX we have varying version of perl installed. On our 5.2 systems Convert::ASN1, for example, wants to put its files in /usr/opt/perl5/lib/site_perl/5.8.0/aix-thread-multi/auto, while in AIX 5.3 these files want to go into /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto A single make install from a shared NFS will not work, nor to I want to go out and touch 30+ machines to do it.

    RPM fits the bill as I can build it once on a 5.2 and a 5.3 system, then deploy it through our configuration management environment. Then it is a very simple operation to ask the system "What version of foo do you have installed?" and then take actions to upgrade it if necessary.
    #AIX-Forum


  • 6.  Re: Perl module management across multiple machines

    Posted Thu February 15, 2007 07:46 AM

    Originally posted by: SystemAdmin


    Kent: at the risk of raining on your parade I think you're chasing a phantom here. I'm no expert on RPM but as far as I know it has the same problem as would be faced by other packaging solutions. The files in an RPM package install into a given location the same way that AIX filesets in a bff file do when processed by installp. If your AIX systems require different pathnames then you need different RPMs at which point you're not much further ahead than doing things by hand.

    Looking for shortcuts as you're doing here is something that eventually will come back to bite you on the ass. Installing packages individually, especially from source, takes longer but that way you know what you have. Leave the install directories around and you can always go back to see how things got to be the way they are. "Sin in haste, repent at leisure" as my mother used to say.

    In any event, installing CPAN modules is really simple:

    tar zxvf .....
    perl Makefile.PL
    make
    make test
    make install

    You could even script it up to save your fingers. Even better yet running

    perl -MCPAN -e shell

    will handle all the dependencies for you.

    FWIW

    Jim Lane
    #AIX-Forum


  • 7.  Re: Perl module management across multiple machines

    Posted Thu February 15, 2007 09:04 AM

    Originally posted by: KentPerrier


    You have the time to go out an install 10 perl packages on 100 machines, manually? You have more time on your hands than I do. The only pathing dependancies that exist are, in this case, the installation path of perl, which is AIX version dependent.

    This is the exact kind of problem packaging was designed to solve. I cannot be the only person out there who thinks it is totally unreasonable go out and install packages manually on all of the machines I maintain. Please tell me that Linux is not better than AIX in this respect? I guess it is as it is stupid easy to create a yum repository, install yum on my RHEL machines use that to install the same software on the 100+ images we have running.
    #AIX-Forum


  • 8.  Re: Perl module management across multiple machines

    Posted Thu February 15, 2007 12:47 PM

    Originally posted by: SystemAdmin


    Have you looked at the File Hierarchy Standard v2.2,
    http://www.pathname.com/fhs/2.2/?

    You can nfs-mount /usr/share/perl/..., /opt/share/perl/..., or
    /opt/<architecture>/share/perl/... from a disk shared by all the
    hosts of a given configuration.

    You need then only administer the shared disk to support all the
    hosts that mount it.

    I recommend using the more flexible fhs-2.2 standard.
    fhs-2.3 seems to have proven too narrow of application for wide adoption.
    #AIX-Forum


  • 9.  Re: Perl module management across multiple machines

    Posted Mon April 02, 2007 01:29 PM

    Originally posted by: SystemAdmin


    Day Late and Dollar short w/ this reply, but...

    Why not create a tarball of the directories you need for each version (5.2 and another for 5.3), then have a ssh script that bounces between all your servers and does an install (just extracts them)?

    I'm new to AIX, so if I'm missing something, I apologize ahead of time.
    #AIX-Forum


  • 10.  Re: Perl module management across multiple machines

    Posted Thu April 05, 2007 07:16 AM

    Originally posted by: adejoux


    You can try mkinstallp. It's a standard AIX command which permit to create your own package. It's not at rpm format but it's really easy to use. You can post and pre install/removal scripts and dependency too. The package name is bos.adt.insttools .
    #AIX-Forum


  • 11.  Re: Perl module management across multiple machines

    Posted Thu April 12, 2007 02:13 AM

    Originally posted by: niella


    Depending on what you want to do, you could use the PAR CPAN module (Perl Archiver).

    Using PAR, you would have the added benefit of leaving the O/S perl installation untouched/isolated, and bundle all the modules you require neatly together in a AIX executable. As soon as you run the executable for the first time, your perl program/modules all gets extracted once-off.

    As an example, if I had a perl program myprog.pl that requires Package::Foo, and any other modules I do not want to install everywhere, I would simply:

    1. create AIX binary, automatically include all used modules.
    $ pp -o myprog.exe myprog.pl

    Now simply copy and run myprog.exe on all your target servers.

    cheers
    Niel
    #AIX-Forum