Installing and Configuring OGSA-DAI Kostas Tourlas

advertisement
Installing and Configuring
OGSA-DAI
Kostas Tourlas
tourlas@nesc.ac.uk
Goals for OGSA-DAI

Aim to deliver application mechanisms that:

Meet the data requirements of Grid applications




Acceptable and supportable by database providers



Functionality, performance and reliability
Reduce development cost of data centric Grid applications
Provide consistent interfaces to data resources
Trustable, imposed demand is acceptable, etc.
Provide a standard framework that satisfies standard
requirements
A base for developing higher-level services




Data federation
Distributed query processing
Data mining
Data visualisation
UK Globus Week - www.ogsadai.org.uk
2
Core features of OGSA-DAI

An extensible framework for building applications

Supports relational, xml and some files


Supports various delivery options





XSLT, ZIP, GZip
Supports message level security using X509
Client Toolkit library for application developers
Comprehensive documentation and tutorials
Fourth production release coming up:


SOAP, FTP, GridFTP, HTTP, files, email, inter-service
Supports various transforms


MySQL, Oracle, DB2, SQL Server, Postgres, XIndice, CSV, EMBL
OGSI (GT3), WS-I (OMII) and WS-RF (GT4) flavours
Highly extensible

Strength is in customising out-of-box features
UK Globus Week - www.ogsadai.org.uk
3
Prerequisites and Dependencies

Ensure that Globus Toolkit 4.0 Java WS Core is
properly installed on your system

instructions for core only downloads here:



http://wwwunix.globus.org/toolkit/docs/development/3.9.5/common/java
wscore/admin/#installcoreonlybinary
Ensure you have downloaded any external JARs
required

xmldb.jar, xindice.jar

Database JDBC drivers
Ant v.1.5.2
UK Globus Week - www.ogsadai.org.uk
4
Installation (1)


Obtain the OGSA-DAI binary package
Put the prerequisite JARs in the OGSA-DAI
distributions lib/ directory




xindice.jar, xmldb.jar
Ensure GLOBUS_LOCATION variable is set correctly
Ensure CATALINA_HOME variable is set correctly if
using GT4 on Tomcat
Build OGSA-DAI WSRF

ant makeGar
UK Globus Week - www.ogsadai.org.uk
5
Installation (2)

Install OGSA-DAI WSRF


onto GT4 container:

From OGSA-DAI distribution directory

ant deployGTContainer
or onto GT4 on Tomcat:




Change directory to GLOBUS_LOCATION
ant -f share/globus_wsrf_common/tomcat/tomcat.xml
deployTomcat -Dtomcat.dir=$CATALINA_HOME
Change directory to OGSA-DAI distribution directory
ant deployTomcat Dtomcat.dir=/path/to/Tomcat/directory
UK Globus Week - www.ogsadai.org.uk
6
Deploy Services and Resources (1)

To expose a data resource is a three-step process:




Deploy an OGSA-DAI data service. This data service
initially exposes 0 data service resources.
Deploy a data service resource. The data service
resource contains information about a data resource
and the activities clients can perform on that data
resource via a data service.
Add a data service resource to a data service. This
instructs the data service to expose the data service
resource and so allows clients to interact with the
data service resource - thereby interacting with a
data resource.
Make sure GLOBUS_LOCATION / CATALINA_HOME
are correct before starting!
UK Globus Week - www.ogsadai.org.uk
7
Deploy Services and Resources (2)

Deploy a data service

from within the OGSADAI distribution
directory, run:



ant deployDataService[GT4|Tomcat]
-Ddai.service.path=service/path
i.e. deployDataServiceGT4 for GT4 container or
deployDataServiceTomcat for GT4 on Tomcat
where

dai.service.path= specifies the local URL of the service.
e.g. -Ddai.service.path=ogsadai/DataService specifies
a data service whose URL will be
http://HOST:PORT/wsrf/services/ogsadai/DataService.
UK Globus Week - www.ogsadai.org.uk
8
Deploy Services and Resources (3)

Deploy a Data Service Resource


A data service resource file is an ANT properties file used
specify the properties of your data service resource.
The important properties are as follows:








dai.resource.id= - name for the data service resource.
dai.data.resource.type=[Relational | XML | Files] - the type of data
resource to which the data service resource provides access.
dai.data.resource.uri= - data resource URI. This must be compatible
with the driver class specified next.
dai.driver.class= - data resource driver class name. This is optional
only if dai.data.resource.type=Files.
dai.credential= - Grid certificate credentials of a user permitted to
access the data resource. If omitted then any user will be allowed
access.
dai.user.name= - data resource user name. Optional only if there is no
user name required for a database.
dai.password= - corresponding data resource password. Optional if
there is no user name required, or if the password is null.
An example of this file is included in the distribution
UK Globus Week - www.ogsadai.org.uk
9
Deploy Services and Resources (4)

To deploy a data service resource:




Take a copy of data.service.resource.properties within the OGSADAI WSRF distribution directory.
Load the file into an editor and provide values specifying your
data service resource - the comments in the file should help you –
and save.
Put the data resource driver JARs within the drivers directory
within the OGSA-DAI WSRF distribution directory.
from within the OGSADAI distribution directory, run:


where


ant deployResource[GT4|Tomcat] -Ddai.service.resource.file=DAI-SERVICERESOURCE-FILE
dai.service.resource.file specifies the location of a data service resource properties
file. if no argument is given the default location of data.service.resource.properties
(within the OGSA-DAI WSRF distribution directory) is assumed.
Values in the same data service resource file can be overridden at
the command line via the use of -Dproperty=value flags.
UK Globus Week - www.ogsadai.org.uk
10
Deploy Services and Resources (5)

Adding a Data Service Resource to a Data Service

from within the OGSADAI distribution directory, run


where:



ant addResource[GT4|Tomcat] Ddai.service.path=service/path
-Ddai.resource.id=ResourceID
dai.service.path specifies the local URL of the service.
dai.resource.id is the ID of the data service resource that the
data service is to expose
Restart the GT4 container or Tomcat to activate
the service

this is not required in the forthcoming OGSA-DAI
R6.0 which features dynamic service configuration.
UK Globus Week - www.ogsadai.org.uk
11
Listing Data Resources

To list the data service resources exposed
by a data service:
Ensure that your container is running.
 Run the following command from within the
OGSA-DAI WSRF distribution directory:



ant listResourcesClient -Ddai.url=SERVICE-URL
where dai.url specifies the URL of the data
service.

If omitted then a default URL of
http://localhost:8080/wsrf/services/ogsadai/DataServic
e is used.
UK Globus Week - www.ogsadai.org.uk
12
Querying Data Service Resource
Properties

To query data service resource
properties:

Invoke the Globus GetProperty Client:



Change directory to GLOBUS_LOCATION
./bin/wsrf-get-property -s DATA-SERVICE-URI -k
{http://ogsadai.org.uk}DataServiceResourceKey DATARESOURCE-NAME PROPERTY-NAME
Properties can include:



Name, vendor, driver, etc.
Request status
Database schema
UK Globus Week - www.ogsadai.org.uk
13
Removing Resources

To remove data service resources:

from within the OGSADAI distribution directory, run:

ant removeResource[GT4|Tomcat]
-Ddai.service.path=service/path
-Ddai.resource.id=ResourceID

where:



dai.service.path specifies the local URL of the service.
dai.resource.id is the ID of the data service resource that the
data service is no longer to expose.
You will need to shutdown and restart Tomcat before
the changes take effect.
UK Globus Week - www.ogsadai.org.uk
14
Undeploying OGSA-DAI

Ensure GLOBUS_LOCATION or CATALINA_HOME
are set correctly

Change to the OGSA-DAI distribution directory

To undeploy OGSA-DAI WSRF from GT4:


To undeploy OGSA-DAI WSRF from Tomcat:


ant undeployGTContainer
ant undeployTomcat
Undeployment erases all OGSA-DAI XML Schema,
OGSA-DAI-specific JAR files and configuration files
from the destination.
UK Globus Week - www.ogsadai.org.uk
15
The User Side

What’s coming up tomorrow:


a look at the Activity framework and how to
develop your own functionality through
activities
a lookahead to the new Client Toolkit APIs
UK Globus Week - www.ogsadai.org.uk
16
Further information

The OGSA-DAI Project Site:


The DAIS-WG site:



users@ogsadai.org.uk
General discussion on grid DAI matters
Formal support for OGSA-DAI releases



http://forge.gridforum.org/projects/dais-wg/
OGSA-DAI Users Mailing list


http://www.ogsadai.org.uk
http://www.ogsadai.org.uk/support
support@ogsadai.org.uk
OGSA-DAI training courses
UK Globus Week - www.ogsadai.org.uk
17
Download