Difference between revisions of "Managing Perl libraries across nodes"
|Line 85:||Line 85:|
=== Build BioPerl ===
=== Build BioPerl ===
Revision as of 19:14, 2 October 2007
Standardizing modules across nodes
To standardize modules across nodes (and avoid the headache of having to update each node separately with new libraries), I am now including required perl modules with the WormBase software. This includes modules for both different versions of Perl and different architectures.
Configuring the primary build environment
Brie3 acts as the primary staging environment. At the end of this configuration, we will be left with a new directory at /usr/local/wormbase/extlib containing all necessray Perl modules for a WormBase installation. This directory is automatically mirrored into the staging directory (/usr/local/wormbase-production), and from there distributed to production nodes as necessary.
The intial configuration of the system followed these steps:
The first time you launch CPAN, you will be prompted to configure it. Specially, we need to configure CPAN to install modules in our special WormBase directory.
$ perl -MCPAN -e shell (note: we do NOT need to be a privileged user) cpan> o conf init (only necessary if not prompted)
For the Makefile.PL arguments, enter
PREFIX=/usr/local/wormbase/extlib \ LIB=/usr/local/wormbase/extlib/lib \ INSTALLMAN1DIR=/usr/local/wormbase/extlib/man/man1 \ INSTALLMAN3DIR=/usr/local/wormbase/extlib/man/man3 \
TH - Note to self: It might be cleaner to just flatten this whole structure into a single directory using something like...
PREFIX=/usr/local/wormbase/extlib \ INSTALLPRIVLIB=... INSTALLSCRIPT=... INSTALLSITELIB=... INSTALLBIN=... INSTALLMAN1DIR=... INSTALLMAN3DIR=...
Intiial module list
Some of the following commands may be redundant depending on module dependencies
Note: Some of these modules may be architecture-dependent. For the most part, most of the WormBase servers are i686. If you encounter problems with the included modules and you are working on a non i686 system, try installing these modules first. The site-specific module paths for your Perl will be searched first.
cpan> install Bundle::CPAN cpan> install LWP cpan> install CGI cpan> install CGI::Session cpan> install CGI::Cache cpan> install Cache::Cache cpan> install Cache::Filecache cpan> install SVG cpan> install GD <------ architecture dependent! cpan> install GD::SVG (forced) cpan> install Digest::MD5 cpan> install HTML::Parser cpan> install HTML::TokeParser cpan> install IO::Scalar cpan> install IO::String cpan> install Net::FTP cpan> install SOAP::Lite cpan> install Statistics::OLS cpan> install Storable cpan> install Text::Shellwords cpan> install WeakRef cpan> install XML::SAX cpan> install SVG::Graph cpan> intsall XML::Writer cpan> install XML::Twig cpan> install Test::Pod cpan>install DBI cpan>install DBD::mysql cpan>install GTop <------ arch dependent cpan>install Apache::GTopLimit <------- arch dependent
This can probably be done through CPAN but I prefer to install from source. This might be architecture dependent....
perl Makefile.PL `cat /usr/local/wormbase/conf/Makefile.params`
@INC needs to be adjusted so that wormbase can find the local copies of modules. We want to append the extlib path to our @INC. This allows us to easily override architecture-dependent modules on any of the nodes as necessary.
perl Makefile.PL `cat /usr/local/wormbase/conf/Makefile.params` make make install
Rebuild Gbrowse placing libraries into our extlib/.
perl Makefile.PL LIB=/usr/local/wormbase/extlib/lib/perl5/site_perl/5.8.8 \ CONF=/usr/local/wormbase/conf \ HTDOCS=/usr/local/wormbase/html \ CGIBIN=/usr/local/wormbase/cgi-perl/seq \ DO_XS=1
To prepare individual production nodes:
- [[Managing_Perl_libraries_across_nodes#Upgrade_Perl_to_5.8.8 Upgrade Perl to 5.8.8]
- [[Managing_Perl_libraries_across_nodes#Create_a_symlink_to_the_new_Perl Create a symlink to the new Perl]
It shouldn't be necessary to [[Managing_Perl_libraries_across_nodes#Adjust_.40INC adjust your @INC], but it might be useful. You might also want to append
to your path.
Library syncrhonization is handled by two scripts.
This step is not automated to avoid accidentally pushing libraries to production nodes. Remember, wormbase-production is the rsync target for all of the nodes.
2. New libraries will automatically be synced onto the production nodes during the next update. If you want to push software/libraries onto the nodes before then, see [[Updating_software_on_production_nodes Updating software on production nodes].