Website:WormMine

From WormBaseWiki
Revision as of 18:23, 13 January 2012 by Tharris (talk | contribs) (→‎Postgres)
Jump to navigationJump to search

Background

Based on the Getting Started Tutorial:

   http://intermine.org/wiki/GettingStarted

Users and Groups

sudo groupadd wormbase
sudo adduser -M intermine  // will be the user connecting to the mine database
sudo passwd intermine xxxxxx
sudo useradd tharris // not strictly required of course
sudo usermod -a -G wormbase,intermine tharris

Install Prerequisites (Amazon Linux)

(see http://intermine.org/wiki/Prerequisites)

 $ sudo yum install svn git
 // Amazon's Linux on EC2 comes java ready; on Debian: $ sudo apt-get install sun-java6-sdk
 $ sudo yum install ant

Postgres

 $ sudo yum install postgresql postgresql-server postgresql-devel postgresql-contrib postgresql-docs

Set up postgresql users and create a database called "wormmine" accessible to a user called "intermine".

$ sudo service postgresql initdb

Configure Postgres to allow logging via password:

$ sudo emacs /var/lib/pgsql/data/pg_hba.conf
host all     all   0.0.0.0./0   password

Configure suggested performance settings:

$ sudo emacs /var/lib/pgsql/data/postgresql.conf

Note: Performance settings have NOT yet been changed although they've all been entered into the configuration file.

Set up a database:

$ sudo /etc/init.d/postgresql start
[tharris@wb-dev: bin]> sudo -u postgres psql -d template1 -U postgres
psql (8.4.9)
Type "help" for help.

template1=# CREATE USER intermine WITH PASSWORD 'xxxxxxx';
CREATE ROLE
template1=# create database wormmine;
template1=# create database "items-wormmine";
CREATE DATABASE
template1=# GRANT ALL PRIVILEGES ON DATABASE wormmine to intermine;
template1=# GRANT ALL PRIVILEGES ON DATABASE items-wormmine to intermine;
template1=#  \q

Note: will require 5432 open in the security group if access externally is desired.

Tomcat

Via the package manager:

 $ sudo yum install tomcat6

Or via a stable binary:

 $ curl -O http://mirror.csclub.uwaterloo.ca/apache/tomcat/tomcat-6/v6.0.33/bin/apache-tomcat-6.0.33.tar.gz
 $ tar -zxfv apache-tomcat-6* ; cd apache-tomcat*
 // startup.sh and shutdown.sh are found in apache-tomcat*/bin/
// Set up users. If installed via the package manager
$ sudo emacs /etc/tomcat6/tomcat-users.xml
<tomcat-users>
 <role rolename="manager"/>
 <user username="manager" password="manager" roles="manager"/>
</tomcat-users>

Edit the port in /etc/tomcat6/server.xml that Tomcat is listening on to something amenable with their architecture (for example 9999).


Getting the source

You'll need both the intermine source code as well as various wormbase "website-intermine" repositories.

> cd /usr/local/wormbase    // or whatever
> mkdir intermine ; chgrp intermine ; cd intermine
> svn co svn://subversion.flymine.org/branches/intermine_0_98
> ln -s intermine_0_98 intermine

Fetch the WormBase-specific elements of intermine, currently maintained as separate repositories.

// The master directory, containing model and code for fetching/parsing datasets
> cd intermine
> git clone http://github.com/WormBase/website-intermine-master wormmine
// sources
> cd bio/sources
> git clone git://github.com/WormBase/website-intermine-sources.git wormmine




Data Sources

Data sources are collected at /usr/local/wormbase/intermine/data, and within that directory by version.

/usr/local/wormbase/intermine/data/WSVERSION/SOURCE/DATA_TYPE

eg:

/usr/local/wormbase/intermine/data/WS227/wormbase/gff3/
/usr/local/wormbase/intermine/data/WS227/dbsnp
/usr/local/wormbase/intermine/data/WS227/uniprot


WormBase specific modifications

The following directories currently contain WormMine-specific modifications that are NOT under version control:

  • The entire intermine/wormmine directory. Relocating it and symlinking intermine/wormine -> our/source/repo doesn't work.
  • The intermine/bio/sources directory. This *can* be relocated in wormmine/project.xml, but build paths in sources need to be updated, too.