Skip to end of metadata
Go to start of metadata

Assume we have a Linux server with Ubuntu 7.10 installed. (Neither Linux or Ubuntu is a requirement, but installing Tomcat in Ubuntu is quite easy).

Start a Terminal window, and become root:

: stain@rpc268 ~;sudo -i
Password: ********** (your password)
root@rpc268:~#

Now install Tomcat 5:

root@rpc268:~# aptitude install tomcat5
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Reading extended state information     
Initialising package states... Done
Building tag database... Done     

First, let's download and customize the taverna-service WAR file. From Taverna's download page, browse to "Remote Taverna execution" and select "Download the Remote Execution service". Either save the downloaded WAR file on your desktop and move it to your server using your favourite tools, or from the download page, right click on the this direct link text to get a download link you can use on the server.

According to the documentation we need to configure the database for the application first. To do this we will unzip the WAR file and modify a configuration file inside:

root@rpc268:~# *curl -fO http://garr.dl.sourceforge.net/sourceforge/taverna/remotetaverna-0.4.2.war*
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 21.2M  100 21.2M    0     0  6644k      0  0:00:03  0:00:03 -::- 7510k
root@rpc268:~# mkdir remotetaverna
root@rpc268:~# cd remotetaverna
root@rpc268:~/remotetaverna# unzip ../remotetaverna-0.4.2.war
Archive:  ../remotetaverna-0.4.2.war
   creating: META-INF/
  inflating: META-INF/MANIFEST.MF   
   creating: templates/
   creating: WEB-INF/
(..)
  inflating: META-INF/maven/uk.org.mygrid.remotetaverna/taverna-service/pom.properties 
root@rpc268:~/remotetaverna# cd WEB-INF/classes/META-INF/
root@rpc268:~/remotetaverna/WEB-INF/classes/META-INF# ls
persistence.xml
root@rpc268:~/remotetaverna/WEB-INF/classes/META-INF# vim persistence.xml   (Or use nano, emacs, etc.)

Change this section:
                        <property name="hibernate.connection.driver_class"
                                value="org.apache.derby.jdbc.EmbeddedDriver" />
                                <property name="hibernate.connection.url"
                                value="jdbc:derby:/tmp/remoteTavernaDB;create=true"
                        />
to store the database in /var/lib/remotetaverna/db:
                        <property name="hibernate.connection.driver_class"
                                value="org.apache.derby.jdbc.EmbeddedDriver" />
                                <property name="hibernate.connection.url"
                                value="jdbc:derby:/var/lib/remotetaverna/db;create=true"
                        />
We'll make the parent of this directory (but don't create the "db" directory! Doing so throws Apache Derby and Tomcat into a mysterious endless loop). So that the server can write to the directory, change it's owner to tomcat5 (or whatever user your tomcat will be running as, which for security reasons must be a separate user, not root or your own user):

root@rpc268:~/remotetaverna/WEB-INF/classes/META-INF# cd
root@rpc268:~# mkdir /var/lib/remotetaverna
root@rpc268:~# chown tomcat5 /var/lib/remotetaverna

From here we'll rezip the modified WAR archive, but this time using the version-neutral name "remotetaverna.war":
root@rpc268:~# cd remotetaverna
root@rpc268:~/remotetaverna# zip -r ../remotetaverna.war .
  adding: META-INF/ (stored 0%)
  adding: META-INF/MANIFEST.MF (deflated 19%)
(..)
  adding: WEB-INF/web.xml (deflated 58%)
root@rpc268:~/remotetaverna# cd

And deploy it to Tomcat (removing any old installation):
root@rpc268:~# rm -rf /usr/share/tomcat5/webapps/remotetaverna*
root@rpc268:~# cp remotetaverna.war /usr/share/tomcat5/webapps
root@rpc268:~/remotetaverna# /etc/init.d/tomcat5 restart  (not really needed)
Stopping Tomcat 5 servlet engine: (not running).
Starting Tomcat 5 servlet engine using Java from /usr/lib/jvm/java-1.5.0-sun: tomcat5.
root@rpc268:~#

We will wait 10 seconds, and then check our Tomcat installation, which for Ubuntu should be at port 8180. So accessing http://rpc268.cs.man.ac.uk:8180/remotetaverna/ would for this example installation redirect to /remotetaverna/v1/users;createAdmin where we are required to register an administrator account and specify some parameters. We'll modify the Taverna home to a subdirectory below our remotetaverna directory previously created, and set it to /var/lib/remotetaverna/tavernaHome.

Registering the administrator user

After clicking Create, click Current user home and log in using the username and password you just specified. Now click Add userto register a user account for the REST API client. If your application is going to access the service automatically it is probably a good idea to register a separate user for that. Otherwise you could register a normal (Taverna plugin) user that will also be able to access the API. In this example we'll create a user "myapp":

Creating a normal user myapp that will use the REST API

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.