Discussion:
managing CPAN across the network
(too old to reply)
Alan McKay
2010-04-21 13:53:01 UTC
Permalink
Hey folks,

I've asked this recently on the CentOS list and got pointed at a few
options, then went looking around and found you guys and figured I'd
ask here. I found a thread in the archives about it, from about a
year ago.

The basic problem is this : how to keep numerous machines with the
same CPAN installation? i.e. same modules installed across all boxes.
Seems like a simple thing to ask for, but something that CPAN just is
not designed to do very well from what I can find.

I've tried autobundle, and then applying the bundle, but you end up
going through 10s of minutes of the whole build process answering
questions and so forth, as there does not seem to be a way to tell
CPAN to just use all the defaults.

Someoen on the CentOS list pointed me at this article
http://www.developertutorials.com/tutorials/cgi-perl/automate-perl-module-deployment-050426/page1.html

which looked good at first, but ends up being a little too simplistic.
I like the idea that you do it in several phases and break down the
build process into its steps - do the "perl Makefile.PL" once, where
you answer all the questions - then on each host go through and do the
"make", "make install" and so forth. But this does not explain how I
am supposed to deal with modules that want to install other modules
and so forth, and I'm not savvy enough to figure it out myself.

I see from your archives someone talking about
http://perl.arix.com/cpan2rpm/ which appears to have promise as well.
I guess I'll start playing with it to see where I get. I'm wondering
how it deals with modules that require other modules.

My other option is of course to go through my list of CPAN modules
(about 170) and see if there are appropriate RPMs for them all at
rpmforge or one of those places, and switch over to use those. From
what I can see so far, yum/RPM is just a better way to do this as it
was designed with this in mind. It is really easy to install what you
need in an automated fashion without having to babysit the process for
10s of minutes.

What are you all doing for this?

thanks,
-Alan
--
“Don't eat anything you've ever seen advertised on TV”
- Michael Pollan, author of "In Defense of Food"
Tim Bunce
2010-04-21 16:27:12 UTC
Permalink
Post by Alan McKay
The basic problem is this : how to keep numerous machines with the
same CPAN installation? i.e. same modules installed across all boxes.
What are you all doing for this?
We use something like local::lib to keep all our cpan modules in a
directory tree that's kept in subversion (currently, git soon)
along with our code.

That allows branches to branch both our code and which versions of cpan
modules are installed.

Tim.
Steffen Schwigon
2010-04-22 11:57:21 UTC
Permalink
Post by Alan McKay
The basic problem is this : how to keep numerous machines with the
same CPAN installation? i.e. same modules installed across all boxes.
[…]
What are you all doing for this?
I am using

- a local CPAN::Mini mirror on NFS
- CPAN.pm
- CPAN.pm's distroprefs-feature which automates even most insistently
written dialogs via Expect
- PERL_AUTOINSTALL=--defaultdeps

It still has the problem of finetuning until everything works
everywhere for different versions of Perl, different architectures,
different Perl-Config (like thread support), etc., but it is the best
base principle I had for the last years.

The most stressful thing there is “bootstrapping” CPAN.pm itself
generically for old and newer Perls (5.8..5.12), i.e., installing the
latest Bundle::CPANxxl, copy the distroprefs subdir from it's tgz
somewhere and configuring it.

For the last issue, my “bootstrap” script has lots of lines like this:

echo "o conf auto_commit 1 ; o conf commit" | $PERL -MCPAN -e shell
echo "o conf ftp_passive 1 " | $PERL -MCPAN -e shell
echo "o conf prefs_dir '$HOME/.cpan/prefs'" | $PERL -MCPAN -e shell
echo "o conf urllist unshift file:///nfs/MINICPAN " | $PERL -MCPAN -e shell

etc.

Good luck.

Kind regards,
Steffen
--
Steffen Schwigon <***@renormalist.net>
Dresden Perl Mongers <http://dresden-pm.org/>
Alan McKay
2010-04-22 12:12:39 UTC
Permalink
Post by Steffen Schwigon
I am using
Ohhh, das siet gut aus! That looks really good Steffen.

Is this approach documented anywhere that you can recommend?
--
“Don't eat anything you've ever seen advertised on TV”
- Michael Pollan, author of "In Defense of Food"
Steffen Schwigon
2010-04-22 15:11:18 UTC
Permalink
Post by Alan McKay
Post by Steffen Schwigon
I am using
Ohhh, das siet gut aus! That looks really good Steffen.
Is this approach documented anywhere that you can recommend?
Not really, it's the result of hybrid stuff that accumulated over the
years. But I can send you my scripts as starting point. Give me some
minutes…

Kind regards,
Steffen
--
Steffen Schwigon <***@renormalist.net>
Loading...