I guess I will chime in on this since we have dealt with this very same issue.
The problem that we have is that there are a handful of production boxes, a
handful of staging boxes (testing release candidates etc), and a handful of
developer boxes.
Our goal was to make it as easy as possible to get the machines in a state
containing the exact versions of the required CPAN packages, perl, mod_perl,
apache, system libraries etc.
One idea that has been mentioned here was to use CPAN shell to create a Bundle
of the modules you need. My personal experience was that this just didnt work
quite right :). CPAN bundles only appear to care tha tyou have *at least* a
particular version of a package installed. But if your system depends on a
previous version than the latest and greatest of a particular package, you are
pretty much out of luck there as far as I can tell. YMMV :).
We also needed the ability to apply minor patches to a few modules / packages.
CPAN shell didnt seem to be able to help us here. Also, CPAN shell requires a
certain degree of user interaction to install all of the modules we need.
The other problem was that several machines in the rotation get "loaned out" to
other projects, and when we get them back, we dont know what state things are
in on the machine. So we needed to be able to (relatively) quickly re-install
all of the packages we needed on the machines if needed.
What we finally settle on was to use RPMs to do it all. This allowed us to get
exact versions of everything we needed, and we could blast new bits onto
machines with a very simple one-liner:
rpm -Uvh --force ftp://somehost/pub/proj/\*.rpm
This was much faster than searching CPAN, and requires no human interaction.
The only caveat here is that you need to maintain a set of RPMS. Luckily this
is not to terribly difficult. We already had RPMS of apache+mod_perl, perl,
etc. The tricky part is how can we make RPMS easily out of all of those CPAN
modules we were using? Luckily someone has already done this :). On CPAN,
Jochen Wiedmann has a script called "makerpm.pl". You can download this file
from CPAN, copy it to /usr/src/redhat/SOURCES, cd to that directory, and make a
new RPM/SRPM pair like this:
makerpm.pl --specs --source Apache-AuthTicket-0.20.tar.gz
Then, build the rpm/srpm from the .spec file you just made:
rpm -ba -v Apache-AuthTicket.spec
And thats it. Pretty simple.
Of course you are limited to machines that can use .rpm here, but you can
probably adopt a similar strategy for other package management systems.
Anyways, this is how we solved this problem. Now with this in place, I just
run the rpm install from ftp, then load our sorce tree for the particular
project on the machine straight from CVS, and start working. Total setup of a
new machine takes about 5-10 minutes tops :).
Mike