1 / 15

Using Opal to deploy a real scientific application as a Web service

Using Opal to deploy a real scientific application as a Web service. Sriram Krishnan, Ph.D. sriram@sdsc.edu. 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.

laksha
Download Presentation

Using Opal to deploy a real scientific application as a Web service

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N 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 • Make sure that these can be accessed from the command prompt • Type “java” • Type “ant” • Watch for error messages • Ask for help if these don’t work

  4. Download Software Prerequisites • Might want to create a new folder called “Tutorial” on your Desktop • Download and Extract Axis • http://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.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.0RC1.zip • 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.0RC1\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.jsp • Watch for error messages, warnings are OK

  7. Edit Opal properties • Using Wordpad, open “opal-ws-1.0RC1\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

  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 # this is required since Java can't figure out the IP # address if there are multiple network interfaces 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 # 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 OpenBabel • Designed to support molecular modeling, chemistry, and many related areas, including interconversion of file formats and data • http://openbabel.sourceforge.net/ • Download: http://nbcr.net/services/downloads/tutorial/openbabel-2.0.0awins.zip • Extract inside “Tutorial\Babel” directory • Type “babel” from the above directory to ensure that it installed fine

  10. Edit Babel Config • Using Wordpad, open “opal-ws-1.0RC1\etc\babel_config.xml” • Look over the various elements • Change the value of the “binaryLocation” to point to your Babel executable

  11. Babel Config <appConfig xmlns="http://nbcr.sdsc.edu/opal/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <metadata> <usage><![CDATA[./babel [-i<input-type>] <name> [-o<output-type>] <name>]]></usage> <info xsd:type="xsd:string"> <![CDATA[ ... Currently supported input types alc -- Alchemy file prep -- Amber PREP file ... Currently supported output types ... caccrt -- Cacao Cartesian file cacint -- Cacao Internal file ... ]]> </info> </metadata> <binaryLocation>/Users/sriramkrishnan/bin/babel</binaryLocation> <defaultArgs></defaultArgs> <parallel>false</parallel> </appConfig>

  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=BabelServicePort -DappConfig=etc\babel_config.xml • Restart Tomcat • Type “cd %CATALINA_HOME%\bin” • Type “shutdown.bat” • Type “startup.bat” • Check list of services • http://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 client, type the following: • java edu.sdsc.nbcr.opal.GenericServiceClient -l http://localhost:8080/axis/services/BabelServicePort -a "-ipdb sample.pdb -h -opdb output.pdb" -f etc\sample.pdb • Replace localhost with your neighbor’s IP address to use their Babel 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 • We will see how to use Gemstone tomorrow

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

More Related