Difference between revisions of "Managing Perl libraries across nodes"

From WormBaseWiki
Jump to navigationJump to search
Line 21: Line 21:
   PREFIX=/usr/local/wormbase/extlib \  
   PREFIX=/usr/local/wormbase/extlib \  
   LIB=/usr/local/wormbase/extlib/lib \
   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...
TH - Note to self: It might be cleaner to just flatten this whole structure into a single directory using something like...

Revision as of 19:41, 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:

Configure CPAN

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 \

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 \


PREFIX=/usr/local/wormbase/extlib \
VENDORPREFIX=/usr/local/wormbase/extlib \

Initial 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

Install AcePerl

This can probably be done through CPAN but I prefer to install from source.

perl Makefile.PL `cat /usr/local/wormbase/conf/Makefile.params`

Adjust @INC

@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.

export PERL5LIB=/usr/local/wormbase/extlib/lib/perl/5.8.8:/usr/local/wormbase/exlib/perl/site_perl/5.8.8

Build BioPerl

Upgrade BioPerl:

perl Makefile.PL `cat /usr/local/wormbase/conf/Makefile.params`
make install

Build GBrowse

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 \

Preparing Nodes

To prepare individual production nodes:

It shouldn't be necessary to adjust your @INC, but it might be useful. You might also want to append


to your path.

Synchronizing libraries

Library syncrhonization is handled by two scripts.

1. Copy /usr/local/wormbase/extlib to /usr/local/wormbase-production/extlib

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].