-
Notifications
You must be signed in to change notification settings - Fork 4
LapDevelopment_ServerDeployment
The instructions on this page are intended to provide a step by step installation of a lap+galaxy instance with:
- Abel Cluster Support
- FEIDE Authetification
- POSTGRES Data Storage
- Gold Accounting
As a prerequisite to LAP installation, there must be a MongoDB database available for access by the LAP user. Some notes on how MongoDB is configured on the LAP servers is available on the LapDevelopment/MongoDB, but for local installations
-
Install MongoDB via your package manager, e.g.
yum -y install mongodb-server
-
Confirm that the database directory (/var/lib/mongodb/ by default) is available;
-
Optionally, review MongoDB settings (e.g. in /etc/mongodb.conf and /etc/sysconfig/mongod);
-
Start the server and optionally enable automated start-up, e.g.
/etc/init.d/mongodb start
By default, MongoDB initially allocates database space relatively generously (at around three gigabytes, it appears). If disk space is at a premium (as can be the case on a laptop :-), consider adding the --smallfiles option to the start-up sequence of the MongoDB server.
On the (non-Galaxy) LAP side, the following components are required: the LAP Tree, Library, tool descriptions, and (optionally) operational scripts.
cd /home/laportal
svn co http://svn.emmtee.net/lap/trunk/tree
svn co http://svn.emmtee.net/lap/trunk/library
svn co http://svn.emmtee.net/lap/trunk/tools
svn co http://svn.emmtee.net/lap/trunk/operation
Create a file with the name env.sh in /home/laportal that contains all the environment variables needed to run LAP
export LAPTREE=/home/laportal/tree
export LAPLIBRARY=/home/laportal/library
export LAPSTORE=mongodb://127.0.0.1:27017/lapstore
In early 2016, there are several versions of Galaxy in use with LAP. However, development focus now shifts towards the 2015.03 release, and there is a pre-configured snapshot available in SVN with local extensions (e.g. custom datatypes) and the basic configuration to use the LAP Tool descriptions (assuming the above locations):
cd /home/laportal
svn co http://svn.emmtee.net/lap/trunk/local/galaxy
When using this version, no symbolic links should be required (assuming the LAP components reside in the recommended location), i.e. config/galaxy.ini already points to the LAP tool configuration:
tool_config_file = /home/laportal/tools/config.xml
tool_path = /home/laportal/tools
To start Galaxy:
cd /home/laportal/galaxy
./run.sh > main.log
At this point, with a bit of luck, the built-in Galaxy web server will be listening at http://localhost:8080.
Except for (currently, a small number of) LAP-specific extensions, this Galaxy version corresponds to the following release:
git clone https://github.com/galaxyproject/galaxy/
cd galaxy
git checkout release_15.03
PostgresSQL is the database used to store users data. The database is provided by UIO DB Hotell
To install Postgres on Fedora/Redhat use the following command:
dnf install postgresql postgresql-server postgresql-devel postgresql-contrib
For test purposes you can initialize postgres server on local machine that can be used by galaxy. This server will be replaced in the production and development version of LAP. The local installation of posgres should have an enabled ssl.
The following commands are used to enable SSL connection in Galaxy. This connection is required by the Hotell database servers. To do this you must recompile the module psycopg2. The recompilation is done with the following procedure.
1. Install the postgresql client and server (we need the server only to compile the postgresql ssl module!! Don't start the server)
yum install postgresql-server.x86_64 postgresql-devel.x86_64 postgresql.x86_64
2. Install also the following libraries to in order to compile the module
yum install gcc redhat-rpm-config python-devel.x86_64 python27-python-setuptools.noarch
3. Download the psycog python pack needed for the SSL connection with the DB. It might already exist but it is not compiled for SSL. The package is available at: http://initd.org/psycopg. (Verified version is 2.6.1. the current release)
4. Modify the setup.py as follows: just before the line
from distutils.core import setup, Extension
add the following lines
import pkg_resources
from scramble_lib import *
5. Compile the package.
#Indicates the path of the scaramble lib
export PYTHONPATH=/home/laportal/galaxy/scripts/scramble/lib python
setup.py bdist_egg
6. The compilation creates an pscyog2-<VERSION-ARCH>.egg in the dist folder. The egg must be placed in Galaxy default egg directory galaxy/eggs/.
7. Update the file egs.ini with the correct versions of psycopg2
The Apache server serves as a proxy and aggregate for both galaxy and gold interfaces. It is used also from the module for Feide authentication.
1. Install apache server and appropriate mods.
yum install httpd mod_ssl mod_auth_kerb mod_nss mod_proxy_html
2. Edit the file /etc/httpd/conf/httpd.conf. Redirect the root to SSL 443 port.
<VirtualHost _default_:80>
RewriteEngine on
ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
</VirtualHost>
Allow static pages to be loaded by apache
<Directory /home/laportal/galaxy/static/>
- Options Indexes FollowSymLinks AllowOverride None Require all granted
</Directory>
Update the CGI section.
<Directory "/var/www/cgi-bin">
AllowOverride None
Options +ExecCGI
AddHandler cgi-script .cgi .pl
Order allow,deny
Allow from all
</Directory>
4. Generate SSL keys for the certificate check if mod_ssl and open_ssl are installed, if not install them.
yum install mod_ssl
yum install openssl.x86_64
Create keys and certificates
# Generate private key
openssl genrsa -out ca.key 1024
# Generate CSR
openssl req -new -key ca.key -out ca.csr
# Generate Self Signed Key
openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt
# Move the files to the correct locations
cp ca.crt /etc/pki/tls/certs/galaxy.server.crt
cp ca.key /etc/pki/tls/private/galaxy.server.key
cp ca.csr /etc/pki/tls/private/galaxy.server.csr
5. Create Virtual Host for galaxy in /etc/httpd/conf.d/ssl.conf
NameVirtualHost *:443
LoadModule ssl_module modules/mod_ssl.so
LoadModule mod_auth_memcookie_module modules/mod_auth_memcookie.so
<VirtualHost *:443>
ServerName hyperbole.uio.no
<Proxy balancer://balancer_lap_clarino>
BalancerMember http://localhost:8080
</Proxy>
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCertificateFile /etc/pki/tls/certs/galaxy.server.crt
SSLCertificateKeyFile /etc/pki/tls/private/galaxy.server.key
# SSL stuff goes here, check with your security guy at the Tech Dept.
RewriteEngine on
RewriteRule ^/static/style/(.*) /home/laportal/galaxy/static/june_2007_style/blue/$1 [L]
RewriteRule ^/static/scripts/(.*) /home/laportal/galaxy/static/scripts/packed/$1 [L]
RewriteRule ^/static/(.*) /home/laportal/galaxy/static/$1 [L]
RewriteRule ^/favicon.ico /home/laportal/galaxy/static/favicon.ico [L]
RewriteRule ^/robots.txt /home/laportal/galaxy/static/robots.txt [L]
</VirtualHost>
Home | Forum | Discussions | Events