Ubuntu install of RLS catalog service
This service serves as an interface to the Globus RLS used in NDGF for cataloging file replicas. In order that information on replicas in this catalog can be accessed outside NDGF without any dependencies, this http service was developed to handle query requests and contact the RLS service for information.
A test machine in Aalborg (francis.grid.aau.dk) with the Ubuntu 6.0.6 OS is used as a test installation of the service. These are the instructions to get the service running.
Externals
Apache and mod_python
apt-get install apache2
apt-get install mod-python
Grid tools
The Nordugrid standalone client provides all the necessary Globus tools. It was installed following these instructions
http://www.nordugrid.org/documents/ng-client-install.html
I used the 0.6.0 Debian tarball
http://ftp.nordugrid.org/software/nordugrid-arc/releases/latest/debian-3.1/i386/nordugrid-arc-standalone-0.6.0-1.i386.tgz
Now there is a bug in Globus threading where it doesn't work properly on some systems, causing commands to hang instead of terminating (only kill -9 can stop them). This is worked around by setting the following environment variable
export LD_ASSUME_KERNEL=2.2.5
Python
The default python version is 2.4.3
DQ2 installation
The version used was the current HEAD of DQ2
CVS (v0.3 from 16/4/07). To build DQ2 required the dashboard packages to be built. However it proved difficult to find some missing xml modules (eg libxml2) to make the dashboard compile so a tarball was copied over of a pre-compiled DQ2. This was compiled with python 2.3.4 but this did not seem to cause any problems running it with 2.4.3.
The configuration files go into
/opt/dq2/etc.
I put the following into
/opt/dq2/etc/panda.lrc.server/panda.lrc.server.cfg
[panda.lrc.server]
db=
host=rls://atlasrls.nordugrid.org:39281
user=
passwd=
impl=rlscli
dsn=
The rlscli implementation uses the globus command line version of the service. To use the mysql version which queries on the LRC views of the RLS tables, set the impl to rls and add the database connection parameters. I think this conf file is the only one required but I copied the whole tree of conf files from another machine so can't be sure.
Apache configuration
The structure of the Debian packaged Apache is slightly different from that of RH4, so the setup on pcatlas264.cern.ch had to be adjusted slightly. The following should go in
/etc/apache2/sites-available/ddm.conf
Listen 8001
NameVirtualHost 130.225.192.122:8001
<VirtualHost 130.225.192.122:8001>
ServerName francis.grid.aau.dk
DocumentRoot /var/www/apache2-default
<Directory /var/www/apache2-default/dq2>
<Limit GET POST PUT DELETE OPTIONS>
Order allow,deny
Allow from all
</Limit>
# mod_python
PassEnv LD_LIBRARY_PATH PYTHONPATH
PythonPath "sys.path+['/user/dcameron/stage/lib']"
SetHandler mod_python
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
</VirtualHost>
This runs the service on port 8001. The directory in the
PythonPath setting is the stage area of DQ2. A symlink needs to be created to this in the sites-enabled dir
ln -s /etc/apache2/sites-available/ddm.conf /etc/apache2/sites-enabled/ddm.conf
To put the webservice into action create a symbolic link to the ws in the stage area:
mkdir /var/www/apache2-default/dq2
ln -s /user/dcameron/stage/lib/panda/lrc/server/ws_lrc.py /var/www/apache2-default/dq2/ws_lrc.py
Setup and running
A Grid proxy cert needs to be in place for the service to call globus-rls-cli, and this needs to be owned by the user www-data and have permissions 600. This is probably not the nicest way to do it...:
grid-proxy-init -valid [long time]
sudo chown www-data /tmp/x509up_u0000
sudo cp /tmp/x509up_u0000 /etc/apache2/
sudo does not take env variables such as LD_LIBRARY_PATH from the user's environment so to start and stop apache we need to use a small script (I called it apache.sh) to set the environment:
#!/bin/sh
if [ ! $1 ]; then
echo "must specify start|stop|restart"
exit 1
fi
export LD_ASSUME_KERNEL=2.2.5
export X509_USER_PROXY=/etc/apache2/x509up_u1054.apache
export PYTHONPATH=/user/dcameron/stage/lib:/var/www/apache2-default/dq2
cd nordugrid-arc-standalone-0.6.0
. setup.sh
apache2ctl $1
To start/stop/restart apache:
./apache.sh start|stop|restart
Clients
The client package is the panda LRC client package which can be used for LRC and RLS. In the configuration file (eg
~/.dq2/etc/panda.lrc.client/panda.lrc.client.cfg
) put
[panda.lrc.client]
insecure=http://francis.grid.aau.dk:8001/
secure=
The RLS service is a service for querying only so there is no secure part to it.
--
DavidCameron - 18 Apr 2007