Download presentation
Presentation is loading. Please wait.
Published byGertrude Harrell Modified over 9 years ago
1
Using Opal to deploy a real scientific application as a Web service Sriram Krishnan sriram@sdsc.edu
2
Downloads Opal Tutorial –This presentation JDK 1.5: –http://java.sun.com/javase/downloadshttp://java.sun.com/javase/downloads Apache Ant: –http://ant.apache.org/http://ant.apache.org/ Apache Tomcat: –http://nbcr.net/services/downloads/tutorial/jakarta-tomcat-5_0_30.ziphttp://nbcr.net/services/downloads/tutorial/jakarta-tomcat-5_0_30.zip Opal 1.9 Distribution –From the Opal website
3
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
4
Before we get started Should have JAVA and ANT already installed –And environment variables JAVA_HOME and ANT_HOME set correctly –Java: http://java.sun.com/javase/downloadshttp://java.sun.com/javase/downloads –Ant: http://ant.apache.org/http://ant.apache.org/ Make sure that these can be accessed from the command prompt –Type “java” –Type “ant”
5
Download Software Prerequisites Create a new directory called “Tutorial” 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
6
Download Opal Download and extract Opal –Extract inside the Tutorial directory Compile the sources –On the command prompt, cd to the above location –Open the “build.properties” and modify the variable “catalina.home” with the path where you installed tomcat (previous slide) –Type “ant jar” –Watch for error messages
7
Edit Opal properties Open the file “etc/opal.properties” inside the Opal installation Look over the various properties being set –Modify the property “tomcat.url” by replacing “localhost” with the the IP address of your machine Type “ifconfig -a” to figure out your IP address
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
Deploy Opal inside Tomcat From the Opal directory, type the following command: –“ant install” Start Tomcat from the command prompt –Type “cd $CATALINA_HOME/bin” –Type “ chmod +x *.sh” (so this only once) –Type “./startup.sh” (use this command to start the server) Test the Opal installation –http://localhost:8080/opal/happyaxis.jsphttp://localhost:8080/opal/happyaxis.jsp –Watch for error messages, warnings are OK If you wanna stop the Tomcat server type “./shutdown.sh”
10
Download Scientific Application We will use the application OpenBabel –Designed to support molecular modeling, chemistry, and many related areas, including inter-conversion of file formats and data. –Download appropriate version from: http://openbabel.sourceforge.net/ –Extract inside the “Tutorial/Babel” directory Type “babel” from the above directory to ensure that it installed fine
11
Edit Babel Config Open the file “configs/babel_config.xml” inside the Opal installation Look over the various elements –Change the value of the “binaryLocation” to point to your Babel executable
12
Babel Config <appConfig xmlns="http://nbcr.sdsc.edu/opal/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> ] [-o ] ]]> <![CDATA[... Currently supported input types alc -- Alchemy file prep -- Amber PREP file... Currently supported output types caccrt -- Cacao Cartesian file cacint -- Cacao Internal file... Additional options :... ]]> /Users/sriramkrishnan/bin/babel false
13
Deploy application using Ant On the command prompt, cd to your Opal installation To deploy application, type the following: –ant deploy -DserviceName=BabelServicePort -DappConfig=configs/babel_config.xml Check list of services –http://localhost:8080/opal/serviceshttp://localhost:8080/opal/services
14
Run command line client On the command prompt, cd to your Opal installation Set classpath by typing “. etc/classpath.sh” (on Bash) To run the job, type the following: –java edu.sdsc.nbcr.opal.GenericServiceClient -l http://localhost:8080/opal/services/BabelServicePort -a ”-ipdb sample.pdb -opdb out.pdb" -f etc/sample.pdb -r launchJob To query status, type the following: –java edu.sdsc.nbcr.opal.GenericServiceClient -l http://localhost:8080/opal/services/BabelServicePort -r queryStatus -j
15
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
16
Advanced Configuration Database: –http://nbcr.net/software/opal/docs/database.htmlhttp://nbcr.net/software/opal/docs/database.html –For persisting job metadata and access logs Scheduler: –http://nbcr.net/software/opal/docs/scheduler.htmlhttp://nbcr.net/software/opal/docs/scheduler.html –To access local schedulers via DRMAA or GRAM GSI Security: –http://nbcr.net/software/opal/docs/security.htmlhttp://nbcr.net/software/opal/docs/security.html –To enable GSI-based authentication and authorization
17
More Information http://nbcr.net/software/opal –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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.