Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using Opal to deploy a real scientific application as a Web service Sriram Krishnan, Ph.D.

Similar presentations


Presentation on theme: "Using Opal to deploy a real scientific application as a Web service Sriram Krishnan, Ph.D."— Presentation transcript:

1 Using Opal to deploy a real scientific application as a Web service Sriram Krishnan, Ph.D. sriram@sdsc.edu

2 Goals Start off with a clean slate Install software prerequisites Install the Opal toolkit Deploy scientific application as Web service Access service via command-line client

3 Before we get started Should have JAVA and ANT already installed –And environment variables JAVA_HOME and ANT_HOME set correctly –Java: http://www.java.com/getjava/http://www.java.com/getjava/ –Ant: http://ant.apache.org/http://ant.apache.org/ Make sure that these can be accessed from the command prompt –Type “java” –Type “ant”

4 Download Software Prerequisites Might want to create a new directory called “Tutorial” Download and Extract Axis –http://nbcr.net/services/downloads/tutorial/axis-1_2_1.ziphttp://nbcr.net/services/downloads/tutorial/axis-1_2_1.zip –Extract inside Tutorial directory Download and Extract Tomcat –http://nbcr.net/services/downloads/tutorial/jakarta-tomcat-5_0_30.ziphttp://nbcr.net/services/downloads/tutorial/jakarta-tomcat-5_0_30.zip –Extract inside Tutorial directory –Set the environment variable CATALINA_HOME Control Panel -> System -> Advanced

5 Download Opal Download and Extract Opal –http://nbcr.net/services/downloads/tutorial/opal-ws-1.5.tar.gzhttp://nbcr.net/services/downloads/tutorial/opal-ws-1.5.tar.gz –Extract inside Tutorial directory Compile the sources –On the command prompt, cd to the above location –Type “ant -f build-opal.xml compile” –Watch for error messages Ask for help if you see any

6 Deploy Axis inside Tomcat Copy “axis” directory inside “axis-1_2_1\webapps” into “%CATALINA_HOME%\webapps” Copy “activation-1_0_2.jar” and “mailapi-1_3_1.jar” from “opal-ws- 1.5\lib” into “%CATALINA_HOME%\common\lib” Start Tomcat from the command prompt –Type “cd %CATALINA_HOME%\bin” –Type “startup.bat” Test the Axis deployment –http://localhost:8080/axis/happyaxis.jsphttp://localhost:8080/axis/happyaxis.jsp –Watch for error messages, warnings are OK

7 Edit Opal properties Using Wordpad (or vi), open “opal-ws- 1.5\etc\opal.properties” Look over the various properties being set –Modify the property “tomcat.url” by replacing “localhost” with the the IP address of your machine Type “ipconfig /all” to get your IP address on Windows, or “ifconfig -a” on Unix

8 Opal Properties # parallel parameters num.procs=1 mpi.run=/Users/sriramkrishnan/Misc/mpich-1.2.7/bin/mpirun # the base URL for the tomcat installation tomcat.url=http://localhost:8080 # database information database.use=false database.url=jdbc:postgresql://localhost/app_db database.user=app_user database.passwd=app_passwd # drmma information drmaa.use=false drmaa.pe=mpich # globus information globus.use=false globus.gatekeeper=localhost:2119/jobmanager-sge globus.service_cert=/Users/sriramkrishnan/certs/app_service.cert.pem globus.service_privkey=/Users/sriramkrishnan/certs/app_service.privkey

9 Download Scientific Application We will use the application ClustalW –ClustalW is a general purpose multiple sequence alignment program for DNA or protein –Download appropriate version from: ftp://ftp-igbmc.u-strasbg.fr/pub/ClustalW/ –Extract inside “Tutorial\ClustalW” directory Type “clustalw” from the above directory to ensure that it installed fine

10 Edit Babel Config Using Wordpad (or vi), open “opal-ws- 1.5\etc\clustalw_config.xml” Look over the various elements –Change the value of the “binaryLocation” to point to your ClustalW executable

11 ClustalW Config <appConfig xmlns="http://nbcr.sdsc.edu/opal/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <![CDATA[ DATA (sequences) -INFILE=file.ext :input sequences. -PROFILE1=file.ext and -PROFILE2=file.ext :profiles (old alignment).... … ]]> /Users/sriramkrishnan/bin/clustalw false

12 Deploy application using Ant On the command prompt, cd to your Opal installation To deploy application, type the following: –ant -f build-opal.xml deploy -DserviceName=ClustalWServicePort -DappConfig=etc\clustalw_config.xml Restart Tomcat –Type “cd %CATALINA_HOME%\bin” –Type “shutdown.bat” –Type “startup.bat” Check list of services –http://localhost:8080/axis/serviceshttp://localhost:8080/axis/services

13 Run command line client On the command prompt, cd to your Opal installation Set classpath by typing “classpath.bat” To run the job, type the following: –java edu.sdsc.nbcr.opal.GenericServiceClient -l http://localhost:8080/axis/services/ClustalWServicePort -a ”sample.fa" -f etc\sample.fa -r launchJob To query status, type the following: –java edu.sdsc.nbcr.opal.GenericServiceClient -l http://localhost:8080/axis/services/ClustalWServicePort -r queryStatus -j Replace localhost with your neighbor’s IP address to use their ClustalW service

14 What’s Next? To add another service, you just need to add another application config –And deploy using Ant - that’s all! You can write custom clients for your Web services –e.g. Java, Python, Perl, JavaScript

15 More Information http://nbcr.net/services –Downloads, Papers, Presentations –More documentation Advanced configuration like Database, Scheduler, and Security setup Feel free to drop us a note - contacts available from our web page


Download ppt "Using Opal to deploy a real scientific application as a Web service Sriram Krishnan, Ph.D."

Similar presentations


Ads by Google