Difference between revisions of "How to build a frozen release"

From WormBaseWiki
Jump to navigationJump to search
(New page: = Launch the base virtual machine = I've created base virtual machines for Fedora Core 4 and Fedora Core 5 that are pre-configured for a WormBase installation. This includes: * suitable ...)
 
Line 1: Line 1:
= Launch the base virtual machine =
+
=== Configuring VMXs as hosted frozen releases ===
  
I've created base virtual machines for Fedora Core 4 and Fedora Core 5 that are pre-configured for a WormBase installation. This includes:
+
To use a Virtual Machine as a server, a few small modifications need to be made.
  
* suitable user accounts and directories
+
1. From the VMWare Server console, launch the current server core virtual machine (it should be running)
* MySQL
 
* AceDB
 
* support files such as Wu-BLAST
 
  
Note that some of these components may need to be upgraded for new freezes.
+
2. Set a static IP (must be assigned!)
  
= Create directories =
+
In this example, the guest OS IP is 143.48.220.208. This should be changed to whatever your assigned IP address is.
  
For frozen releases, the entirety of the site will be built in a single self-containted directory. We will create this in /usr/local for easy portability (creating this in a home directory creates problems since that user will need to exist for any virtual machines). The following examples assume that the build system already has appropriate [http://www.wormbase.org/wiki/index.php/How_To_Build_A_WormBase_Mirror#User_and_group_accounts users and groups].
+
ifconfig eth0:0 143.48.220.208 netmask 255.255.255.0 broadcast 143.48.220.255 route add -host 143.48.220.208 dev eth0
  
todd> mkdir /usr/local/ws[XXX].wormbase.org
+
You can also do this from the GUI if you prefer, under System Settings -> Network. Double click on the network adaptor.
todd> chgrp wormbase ws[xxx].wormbase.org
 
todd> chmod 2775 ws[xxx].wormbase.org
 
  
The acedb directory:
+
Address: Your assigned IP address
 +
Subnet mask: 255.255.255.0
 +
Default gateway: 143.48.220.254
 +
Broadcast host:  143.48.220.255 (not explicitly set in the GUI)
  
todd> cd /usr/local/ws[XXX].wormbase.org
+
3. Reset the MAC ID of the guest
todd> mkdir acedb
 
todd> chown acedb:acedb
 
todd> chmod 2775 acedb
 
  
The extlib and subdirectories for our own libraries and binaries
+
System Tools > Network
  
todd> mkdir extlib src  build; cd extlib
+
Double click on the network adaptor and select the "Hardware" tab. Click on "Probe", then "OK"
todd> mkdir lib bin include man
 
 
  
= Install Acedb =
+
4. Add the following lines to /etc/resolve.conf for DNS
  
See the documentation under [http://www.wormbase.org/wiki/index.php/How_To_Build_A_WormBase_Mirror#Installing_AceDB How to build a WormBase Mirror], adjusting paths and names as appropriate for the directory created above.
+
search cshl.edu
 +
nameserver 143.48.1.1
 +
nameserver 143.48.1.20
  
= Build and install a local copy of Perl =
+
5. Set the hostname
  
This is probably redundant but I want to create a completely self-contained version of the site. Later, this can be handled by the virtual machine. Fetch the current stable source:
+
This can be done either in the GUI under the Network panel, or using the following command line terms.
  
todd> cd /usr/local/ws[XXX].wormbase.org/src
+
If you have a static IP address, then /etc/hosts is configured as follows:
todd> wget http://www.perl.com/CPAN/src/stable.tar.gz
 
todd> cd ../build ; tar xzf ../src/stable.tar.gz
 
todd> cd perl-5.8.8
 
todd> rm -f config.sh Policy.sh
 
todd> sh Configure
 
 
  
You can have Perl look in other directories for extensions and modules in addition to those already specified. We will manually specify @INC at server startup. When asked "Directories to use for library searches? [/usr/local/lib /lib /usr/lib]" enter
+
127.0.0.1           localhost.localdomain      localhost
 +
143.488.220.44 mybox.mydomain.com mybox
  
none
+
After updating the /etc/hosts file correctly, the "hostname" command should be run as follows to set your hostname:
  
When asked: "Installation prefix to use? (~name ok) [/usr/local] " enter
+
hostname mybox.mydomain.com
  
/usr/local/ws[XXX].wormbase.org/extlib
+
6. Edit /usr/local/wormbase/conf/localdefs.pm and httpd.conf with the appropriate hostname
  
Continue the rest of the configuration as usual.
 
  
todd> make
+
8. Shutdown the virtual machine and copy it as a backup
todd> make test
 
todd> make install
 
  
= Configure CPAN =
+
''I append "server" to the name to indicate that it is configured as a server''
  
=== Configure CPAN ===
+
  tar czf wormbase-WS100.2003.05.13-server.tgz wormbase-WS100.2003.05.13
 
 
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 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=...
 
 
 
<br />
 
 
 
todd&gt; sudo perl -MCPAN -e shell
 
 
 
<br />
 
 
 
== Configure CPAN to install modules in the local directory ==
 

Revision as of 20:04, 3 October 2007

Configuring VMXs as hosted frozen releases

To use a Virtual Machine as a server, a few small modifications need to be made.

1. From the VMWare Server console, launch the current server core virtual machine (it should be running)

2. Set a static IP (must be assigned!)

In this example, the guest OS IP is 143.48.220.208. This should be changed to whatever your assigned IP address is.

ifconfig eth0:0 143.48.220.208 netmask 255.255.255.0 broadcast 143.48.220.255 route add -host 143.48.220.208 dev eth0

You can also do this from the GUI if you prefer, under System Settings -> Network. Double click on the network adaptor.

Address:  Your assigned IP address
Subnet mask: 255.255.255.0
Default gateway: 143.48.220.254
Broadcast host:  143.48.220.255 (not explicitly set in the GUI)

3. Reset the MAC ID of the guest

System Tools > Network

Double click on the network adaptor and select the "Hardware" tab. Click on "Probe", then "OK"

4. Add the following lines to /etc/resolve.conf for DNS

search cshl.edu
nameserver 143.48.1.1
nameserver 143.48.1.20

5. Set the hostname

This can be done either in the GUI under the Network panel, or using the following command line terms.

If you have a static IP address, then /etc/hosts is configured as follows:

127.0.0.1	           localhost.localdomain      localhost
143.488.220.44 mybox.mydomain.com	mybox

After updating the /etc/hosts file correctly, the "hostname" command should be run as follows to set your hostname:

hostname mybox.mydomain.com

6. Edit /usr/local/wormbase/conf/localdefs.pm and httpd.conf with the appropriate hostname


8. Shutdown the virtual machine and copy it as a backup

I append "server" to the name to indicate that it is configured as a server

  tar czf wormbase-WS100.2003.05.13-server.tgz wormbase-WS100.2003.05.13