Using Opal to deploy a real scientific application as a Web service PowerPoint PPT Presentation

presentation player overlay
1 / 15
About This Presentation
Transcript and Presenter's Notes

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


1
Using Opal to deploy a real scientific
application as a Web service
  • Sriram Krishnan, Ph.D.
  • sriram_at_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 dont 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/jakart
    a-tomcat-5_0_30.zip
  • Extract inside Tutorial directory
  • Set the environment variable CATALINA_HOME
  • Control Panel -gt System -gt Advanced

5
Download Opal
  • Download and Extract Opal
  • http//nbcr.net/services/downloads/tutorial/opal-w
    s-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//localhost8080/axis/happyaxis.jsp
  • Watch for error messages, warnings are OK

7
Edit Opal properties
  • Using Wordpad, open opal-ws-1.0RC1\etc\opal.prope
    rties
  • 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.procs1
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.urlhttp//localhost8080 database
information database.usefalse
database.urljdbcpostgresql//localhost/app_db
database.userapp_user database.passwdapp_p
asswd globus information
globus.usefalse globus.gatekeeperlocalhost2
119/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/tutor
    ial/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_conf
    ig.xml
  • Look over the various elements
  • Change the value of the binaryLocation to point
    to your Babel executable

11
Babel Config
ltappConfig xmlns"http//nbcr.sdsc.edu/opal/types"
xmlnsxsd"http//www.w3.org/2001/XMLS
chema"gt ltmetadatagt ltusagegtlt!CDATA./babel
-iltinput-typegt ltnamegt -oltoutput-typegt
ltnamegtgtlt/usagegt ltinfo xsdtype"xsdstring"gt
lt!CDATA ... Currently supported
input types alc -- Alchemy file prep -- Amber
PREP file ... Currently supported output
types ... caccrt -- Cacao Cartesian
file cacint -- Cacao Internal file ...
gt lt/infogt lt/metadatagt
ltbinaryLocationgt/Users/sriramkrishnan/bin/babellt/b
inaryLocationgt ltdefaultArgsgtlt/defaultArgsgt
ltparallelgtfalselt/parallelgt lt/appConfiggt
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 -DserviceNameBabelSe
    rvicePort -DappConfigetc\babel_co
    nfig.xml
  • Restart Tomcat
  • Type cd CATALINA_HOME\bin
  • Type shutdown.bat
  • Type startup.bat
  • Check list of services
  • http//localhost8080/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//localhost8080/axis/services/BabelServicePo
    rt -a "-ipdb sample.pdb -h -opdb output.pdb" -f
    etc\sample.pdb
  • Replace localhost with your neighbors IP address
    to use their Babel service

14
Whats Next?
  • To add another service, you just need to add
    another application config
  • And deploy using Ant - thats 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
Write a Comment
User Comments (0)
About PowerShow.com