Administrative Updates to the VRE

Overview

N.B. This document is derived from a Wiki page and was written with a specific installation of the VRE software in mind. It should be re-written to take into consideration the needs of someone installing the system at their own institution. It also assumes a working knowledge of Memfem.


Instances of the text <web server> should be replaced with the actual hostname of the web server used to host the VRE. Instances of the text <local cluster> should be replaced with the actual hostname of the PBS-compliant local cluster used for job submission.

Dependencies

Installing Tomcat and PostgreSQL

  1. Install tomcat-5.5

  2. Install postgres-8.1.*. For Fedora Core 6, the process used was as follows:

  3. ./configure

  4. gmake

  5. su

  6. gmake install

  7. adduser postgres

  8. mkdir /usr/local/pgsql/data

  9. chown postgres /usr/local/pgsql/data

  10. su - postgres

  11. /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

  12. /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &

  13. /usr/local/pgsql/bin/createdb test

  14. /usr/local/pgsql/bin/psql test

  15. 363 cp tomcat.policy /etc/tomcat-5.5/

  16. 375 cp ~rblake/postgresql.jar /usr/share/tomcat-5.5/common/lib/

  17. added this file: /usr/share/tomcat-5.5/common/lib/naming-factory-dbcp.jar

Installing the VRE Application

Checking out the Source Code

mkdir ~/src

cd ~/src

svn co https://ibvre.svn.sourceforge.net/svnroot/ibvre ibvre

svn update ~/src/ibvre

ssh <web server>

cd ~src/ibvre/sql

psql -h localhost -p 5432 -U postgres

create database vre;

\c vre

\i createVREDatabase.sql

\i populateReferenceData.sql

\q

Viewing the Database

To browse the VRE database use pgAdmin3. To connect to the database, add the server by clicking on the plug button on the toolbar and enter the following details into the server dialog box:

Leave everything else unchanged.

If the firewall prevents outside machines accessing port 5432, and you want to run pgAdmin3 locally, it is possible to get round this through SSH tunnelling. First enter the following command on your local machine:

ssh -L 5433:localhost:5432 ibuser@<web server>

Then just run pgAdmin3 locally connecting to localhost port 5433.

As an example of what can be done with this tool, click on the 'vre' database under 'databases', click the SQL button on the toolbar, enter the following command and click the play button:

select * from fil_file f

join jof_job_output_file j on j.jof_fil_id = f.fil_id

join job_job j2 on j2.job_id = j.jof_job_id

join clu_cluster c on c.clu_id = j2.job_clu_id

join exp_experiment e on e.exp_id = j2.job_exp_id

where fil_name like 'restart%';

This will display all of the restart files held in the database against jobs and experiments.

Installing/Updating the Web Application

cd ~/src/ibvre/lib

for i in `find . -name "*.jar"`; do cp $i ~/src/ibvre/webapps/vre/WEB-INF/lib/; done

cd ~/src/ibvre

ant build-all

cp ~/src/ibvre/build/dist/VRE.war /var/lib/tomcat-5.5/webapps

ant deploy-jobupdateservice

Installing the Memfem Executor

#Are we spoofing qsub and qstat with sh and cat determines if -f added to qstat command or not

spoofqsub=false

numberofnodes=2

cd ~/src/ibvre

ant build-remote-memfem

cd ~/src/ibvre/build/dist

unzip RemoteMemfemInstall.zip -d RemoteMemfemInstall

cp RemoteMemfemInstall/* /home/ibuser/clusterhome/EXECUTOR/

cd ~/src/ibvre

ant build-remote-memfem

cd ~/src/ibvre/build/dist

cp RemoteMemfem.jar /home/ibuser/clusterhome/EXECUTOR/

Adding an Ionic Model

<ionicModels>

...

<ionicModel fixedName="<luv_fixed_name>" paramValue="<luv_value>"/>

</ionicModels>

<ionicModels>

...

<ionicModel fixedName="IM_ALRD" paramValue="aLRd"/>

</ionicModels>

ssh <web server>

psql -h localhost -p 5432 -d vre -U postgres

select max(luv_id)+1 from LUV_LOOKUP_VALUE;

insert into LUV_LOOKUP_VALUE(luv_id, luv_lut_id, luv_fixed_name, luv_description, luv_value) values (<luv_id>,5,<luv_fixed_name>,<luv_description>,<luv_value>);

insert into LUV_LOOKUP_VALUE(luv_id, luv_lut_id, luv_fixed_name, luv_description, luv_value) values (42,5,'IM_ALRD','Adapted Luo-Rudy Dynamic','aLRd');

cd ~src/ibvre

svn commit sql

svn commit src

Adding a New Geometry Model

clusterhome/MEMFEM/canine/canine.tetras

clusterhome/MEMFEM/canine/canine.bcs

clusterhome/MEMFEM/canine/canine.cg_in

clusterhome/MEMFEM/canine/canine.cond

clusterhome/MEMFEM/canine/canine.fibers

clusterhome/MEMFEM/canine/canine.mem.cond

clusterhome/MEMFEM/canine/canine.pace.set

clusterhome/MEMFEM/canine/canine.pts

clusterhome/MEMFEM/canine/canine.spec

clusterhome/MEMFEM/canine/canine.tetras

clusterhome/MEMFEM/canine/canine.right_plate.set

clusterhome/MEMFEM/canine/canine.optical_points.set

clusterhome/MEMFEM/canine/canine.left_plate.set

<geometryModels>

...

<geometryModel fixedName="<luv_fixed_name>" paramValue="<model_param_value>" commonDirName="<model_dir_name>"/>

</geometryModels>

<geometryModels>

...

<geometryModel fixedName="GM_CANINE" paramValue="canine" commonDirName="canine"/>

</geometryModels>

ssh ibuser@<web server>

psql -h localhost -p 5432 -d vre -U postgres

select max(luv_id)+1 from LUV_LOOKUP_VALUE;

insert into LUV_LOOKUP_VALUE(luv_id, luv_lut_id, luv_fixed_name, luv_description, luv_value) values (<luv_id>,4,<luv_fixed_name>,<luv_description>,<model_dir_name>);

insert into LUV_LOOKUP_VALUE(luv_id, luv_lut_id, luv_fixed_name, luv_description, luv_value) values (99,4,'GM_CANINE','Canine Model A from UCSD','canine');

cd ~src/ibvre

svn commit sql

svn commit src

Adding a New Cluster

The VRE is currently designed only to work with clusters supporting the PBS queuing system, and has only been tested for the Torque implementation http://www.clusterresources.com/wiki/doku.php?id=torque:torque_wiki. More than one cluster supporting this system can be used at the same time. If the need arises to introduce a cluster with a different queuing system, further work is required to enable the RemoteExecutor and ClusterProxy classes to be parameterised based on the Cluster_ID chosen for the job.

The VRE (as of Feb 2007) has built in support for submission to <web server> and <local cluster>. Submission to <web server> is to a spoofed qsub/qstat system written by UmarFarooq. This requires that symlinks to sh and cat are present in /home/ibuser/clusterhome/EXECUTOR, as well as a couple of spoofing scripts. RemoteExecutor has to be built with spoofqstat=true in executor.properties.

As ibuser, run :

Xvfb :2 &

export DISPLAY=<local cluster>:2.0

cat id_rsa_pub >> authorized_keys

/home/ibuser/clusterhome

/home/ibuser/clusterhome/EXECUTOR

/home/ibuser/clusterhome/MEMFEM

/home/ibuser/clusterhome/MEMFEM/EXE

/home/ibuser/clusterhome/MEMFEM/EXE/4.2

/home/ibuser/clusterhome/MEMFEM/rabbit

ln -s /bin/sh /home/ibuser/clusterhome/EXECUTOR/qsub

ln -s /usr/bin/cat /home/ibuser/clusterhome/EXECUTOR/qstat

/home/ibuser/clusterhome/MEMFEM/EXE/4.2/memfemexe

PYTHONPATH=:/usr/local/lib:/home/ibuser/VTK/Wrapping/Python:/usr/local/lib/python2.3/site-packages/vtk/

LD_LIBRARY_PATH=/usr/local/lib/

PATH=$PATH:/usr/java/jre1.5.0_11/bin

export PATH PYTHONPATH LD_LIBRARY_PATH

insert into CLU_CLUSTER (clu_id, clu_fixed_name, clu_display_name,clu_username,clu_host,clu_home_dir) VALUES(3, 'LOCALCLUSTER','LocalCluster','ibuser','<local cluster>','/home/ibuser/clusterhome');

Adding a New Parameter to the VRE

TODO

Manually Deleting Jobs

delete from jof_job_output_file where jof_job_id=<job_id>;

delete from job_job where job_id=<job_id>;

Basic HTTP Authentication for the VRE webapp

This will give minimal protection to the VRE webapp.

<!--

Define the a "Security Constraint" on the VRE webapp. This will exclude

the web services.

-->

<security-constraint>

<web-resource-collection>

<web-resource-name>vre</web-resource-name>

<url-pattern>*.do</url-pattern>

</web-resource-collection>

<auth-constraint>

<role-name>vre</role-name>

</auth-constraint>

</security-constraint>


<!-- Define the Login Configuration for this Application -->

<login-config>

<auth-method>BASIC</auth-method>

<realm-name>vre</realm-name>

</login-config>

<role rolename="vre"/>

<user username="vre" password="memfem" roles="vre"/>