OGSADAI Installation - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

OGSADAI Installation

Description:

OGSA-DAI on OMII 2.0. OMII The Open Middleware Infrastructure ... unzip omii-server-2.0.0/base/apache-ant-1.6.1-bin.zip. Add apache-ant-1.6.1/bin to your PATH ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 19
Provided by: amyk158
Category:

less

Transcript and Presenter's Notes

Title: OGSADAI Installation


1
OGSA-DAIInstallation
  • OGSA-DAI on OMII 2.0
  • OMII The Open Middleware Infrastructure Institute
  • NeSC, Edinburgh, 14 September 2005

2
Outline
  • Installation of OGSA-DAI WSI 1.0
  • Configuration
  • Use

3
Installation
  • Download the source or binary OGSA-DAI WSI 1.0
    distribution from
  • http//www.ogsadai.org.uk
  • Registration is required for the download
  • Unpack the distribution into a directory of your
    choice

4
Prerequisites for installation
  • The following libraries must be present
  • jakarta-oro.jar (available from
    http//jakarta.apache.org/oro)
  • lucene-final-1.4.jar (available from
    http//jakarta.apache.org/lucene)
  • xmldb.jar (available from http//xml.apache.org/xi
    ndice)
  • For each database a driver is required
  • JDBC driver for MySQL, e.g. mysql-connector-java-3
    .0.11-stable-bin.jar (available from
    http//www.mysql.com)

5
Environment
  • Make sure youre using Ant version 1.6.1
  • Use ant version to display the version number
  • If the version is 1.5.2-20
  • unzip omii-server-2.0.0/base/apache-ant-1.6.1-bin.
    zip
  • Add apache-ant-1.6.1/bin to your PATH
  • Setup the environment
  • export JAVA_HOME/home/omiiserv/j2sdk1.4.2_04
  • export CATALINA_HOME
  • /home/omiiserv/OMII/jakarta-tomcat-5.0.25

6
Create a binary distribution
  • If you have downloaded the source distribution
    you must create a binary package before
    installation can proceed
  • Copy the prerequisite libraries into directory
  • ogsadai-wsi-1.0/lib
  • Compile the source distribution and create the
    binary package
  • ant createBinaryDistribution

7
Deploying OGSA-DAI Step by Step
  • Deploy OGSA-DAI
  • Deploy a data service
  • Create and deploy a data resource
  • Add the data resource to the service dynamically

8
Deploy OGSA-DAI
  • Using the GUI installer (recommended)
  • ant guiDeployTomcat
  • Enter a valid Tomcat path when prompted (path of
    your OMII Tomcat installation) and the web
    application path (axis)
  • Or the command line installer
  • ant deployTomcat

9
Restart Tomcat
  • Restart Tomcat
  • cd ltOMII_HOMEgt/jakarta-tomcat-5.0.25/bin
  • ./shutdown_base.sh
  • ./start_base.sh

10
Deploy a Data Service
  • Use the GUI tools
  • ant guiDeployDataServiceTomcat
  • Enter a local path and name of your Data Service
    when prompted, e.g. ogsadai/DataService
  • Tick the box Configurable? this means we can
    add data resources dynamically without restarting
    Tomcat

11
Check the deployment
  • Open a web browser and point it to
  • http//localhost18080/axis/services
  • The new data service should show up in the list
    of services
  • Run the list-resources client
  • ant listResourcesClient
  • Ddai.urlhttp//localhost18080/
  • axis/services/ogsadai/DataService
  • Should return
  • java Service version OGSA-DAI WSI 1.0
  • java This service exposes no resources!

12
Create a new data resource
  • Use the GUI tools
  • ant guiCreateResourceTomcat
  • The wizard will guide you through the setup
  • Add a MySQL database running on localhost3306
    and database ogsadai
  • Username is ogsadai and password is ogsadai
  • Provide the location of the MySQL JDBC driver
  • Select a name for your resource, e.g.
    MySQLResource
  • Save the configuration in a file
  • Select a Tomcat path and the web application name
  • Finally, deploy the new resource

13
Data Resource Info
  • MySQL database
  • Host localhost3306 and database ogsadai
  • Username is ogsadai and password is ogsadai
  • OR
  • PostgreSQL database
  • Host localhost5432 and databaseomii
  • Username omii_user and password omii

14
Restart Tomcat
  • Restart Tomcat
  • cd ltOMII_HOMEgt/jakarta-tomcat-5.0.25/bin
  • ./shutdown_base.sh
  • ./start_base.sh

15
Add a Data Resource To Service
  • Use the GUI tools
  • ant guiAddResourceTomcat
  • Enter a valid Tomcat path when prompted
  • Enter the service name to which you wish to add
    your resource
  • Service Path
    ogsadai/DataService
  • Data Service Resource ID MySQLResource
  • WebApp Name axis

16
  • Add the resource dynamically
  • ant dataServiceClient
  • -Ddai.urlhttp//localhost18080/
  • axis/services/ogsadai/DataService
  • -Ddai.resource.idMySQLResource
  • -Ddai.actiondeploy

17
Check the installation
  • Run the list-resources client
  • ant listResourcesClient
  • Ddai.urlhttp//localhost18080/
  • axis/services/ogsadai/DataService
  • Should return
  • java Service version OGSA-DAI WSI 1.0
  • java Number of resources 1
  • java Resource MyResource

18
Run a Query
  • We can now submit a perform document to the
    service, for example the following simple SQL
    query
  • SELECT FROM littleblackbook WHERE idlt100
  • Run the end-to-end client
  • ant dataServiceClient
  • -Ddai.urlhttp//localhost18080/
  • axis/services/ogsadai/DataSer
    vice
  • -Ddai.resource.idMySQLResource
  • -Ddai.actionexamples/GDSPerform/JDBC/
  • query/select100Rows.xml

19
  • Returns
  • java ltcurrentRowgt
  • java ltcolumnValuegt100lt/columnValuegt
  • java ltcolumnValuegtSimon Lawslt/columnValuegt
  • java ltcolumnValuegt824 Anjomshoaa Place,
    Winchesterlt/columnValuegt
  • java ltcolumnValuegt01349735156lt/columnValuegt
  • java lt/currentRowgt
  • java lt/datagt
  • java lt/webRowSetgtgtlt/ns2resultgt
  • java lt/ns2responsegt
  • java Request status COMPLETED

20
Create a Test Database
  • Add your database driver to the CLASSPATH
  • (PostgreSQL or other)
  • Source the setenv.sh script in the OGSA-DAI
    binary root dir
  • source setenv.sh
  • Populate the test table
  • java uk.org.ogsadai.client.dbcreate.CreateTestPost
    greSQLDB
  • -username omii_user -password omii -database
    omii
Write a Comment
User Comments (0)
About PowerShow.com