mp has asked for the wisdom of the Perl Monks concerning the following question:
Because I may need to bring another server online later to keep up with load or to replace a server that has crashed, and because that server may be running a more recent linux installation, I need a good way to manage old CPAN sources so that I can always rebuild and reinstall all CPAN modules that are being used (for many modules, this will be older versions) from sources with identical version to what are currently being used on the existing servers.
The way I see it, I have two primary problems to solve. One is keeping track of which versions are currently (and should be) installed for a particular server. I think there may be a way to do keep a master list as a bundle file, but I'm not sure exactly how to do that, so any pointers would be appreciated. What I'd like to be able to do is have a bundle that tells what versions of all modules to use, what order to install them in, and what version numbers, then be able to just tell CPAN to install that bundle. Is that possible?
The second problem is creating and maintaining an archive of the CPAN module sources that I'm actually using. I really don't need all of CPAN, just certain modules, so a sparse mirror containing only those modules would be sufficient.
I have also thought of keeping a complete CPAN mirror that I only update when I need the latest copy of something (and then possibly only update that particular module while always keeping old versions), then just use CPAN.pm to install from that as needed. It seems that it should not be too difficult to write something (possibly borrowing from merlyn's mini-cpan-mirror maker) to fetch new modules into the archive on demand without disturbing modules that are already there.
Rather than maintain a full mirror, it seems like what would be ideal would be to maintain a sparse (in the sense that not every module is present) CPAN mirror and have a script that can fetch a module source on-demand to add to that mirror. I could then point CPAN.pm there and use it for installations on all my servers. Has anyone tried this? Any gotchas?
Has anyone else come up with a good solution for all or parts of this? Am I missing something basic that already solves this problem? I'm looking more for general direction that specific code at this point.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Maintaining CPAN sources for later installation across multiple servers
by hsmyers (Canon) on Mar 04, 2003 at 21:04 UTC | |
Re: Maintaining CPAN sources for later installation across multiple servers
by lshatzer (Friar) on Mar 04, 2003 at 21:08 UTC | |
Re: Maintaining CPAN sources for later installation across multiple servers
by demerphq (Chancellor) on Mar 04, 2003 at 23:25 UTC | |
Re: Maintaining CPAN sources for later installation across multiple servers
by valdez (Monsignor) on Mar 04, 2003 at 21:12 UTC | |
Re: Maintaining CPAN sources for later installation across multiple servers
by IlyaM (Parson) on Mar 05, 2003 at 11:45 UTC | |
by mp (Deacon) on Mar 07, 2003 at 16:37 UTC |