Monday, October 29, 2007

FAS Script file for the SC07 Demo

Script file generateDB.sh is designed especially for the demo at SC07. This script manages three accounts, leesangm, mpierce, and yuma. First, all of the information about these users will be removed.Then new information will be registered. If you want to modify information, open generateDB.sh modify it, and run it.

To run this script,
Step 1. You should download this .
All of the library jar files, and script files are included.
Step 2. Run the command.
./generateDB.sh

That's it.

Command Line Access to the FAS0.7

Command line tool provides immediate access to the FAS server. This is very useful for the test runs.
To user this command line tool, you don't need to run the service on your site. You will need only client of the service.

Step 1. You should download this .
All of the example, script files are included.

Step 2. Run the command.
(1)To create new user space
./run.sh AddNewUserSpace -f [FAS service location] -l [username] -h [host name] -p [port number] -dn [DN of the community cert for this host] -pr [protocol] -us [logical space for this user]
e.g.) ./run.sh AddNewUserSpace
-l leesangm -h "gridfarm001.ucs.indiana.edu" -p "2811" -pr "gridftp" -us "/home/quakesim/"

(2)To query user space
./run.sh QueryUserSpace -f [FAS service location] -l [username] -h [host name] -p [port number] -dn [DN of the community cert for this host] -pr [protocol] -us [logical space for this user]
e.g.) ./run.sh QueryUserSpace -l leesangm

(3)To remove user space
./run.sh RemoveUserSpace
-f [FAS service location] -l [username] -h [host name] -p [port number] -dn [DN of the community cert for this host] -pr [protocol] -us [logical space for this user]
e.g.) ./run.sh RemoveUserSpace -l leesangm

[NOTE]
Default value of FAS service location is
http://gridfarm002.ucs.indiana.edu:8080/axis2/services/FileAgentService
Default value of DN of the Community Certificate is Teragrid Quakesim cert.
/C=US/O=National Center for Supercomputing Applications/CN=QuakeSim Community User

File Agent Service V0.7

1. Introduction
File Agent Serivce is a web service providing access to the information about community user space. This user space is accessed with Teragrid community certificate. This version provides 7 operations including 3 operations from the previous version.
  • queryDataSpaceInfo
  • registerDataSpaceInfo
  • removeDataSpaceInfo
  • createDataSpace
  • queryUserSpaceConvention
  • registerUserSpaceConvention
  • removeUserSpaceConvention

Section 2 will discribe how to access the service, and each of the operations are described in the section 3.

2. Access to the service
Required jar file:
-FileAgentService.aar and basic jar file for axis2.
Download tarball [48MB contains all the lib and source code].
Service is now up and running on,
http://gridfarm002.ucs.indiana.edu:8080/axis2/services/FileAgentService
The WSDL file is available at,
http://gridfarm002.ucs.indiana.edu:8080/axis2/services/FileAgentService?wsdl
For detail code example, please refer the sample code.

3. Operations
3.1 queryDataSpaceInfo
This operation provides query interface to the data space information. Input parameter is query statement described in WSDL and output parameter is the query result.
Here is how to build an input query for this operation. First, dataspace information includes following items,
  • username : user's portal id
  • host: remote location of the data resource
  • port: port number of the data resource
  • commCertDN: DN of the community certificate that used for this resource
  • protocol: protocol to access this resource
  • LogicalUserSpace: logical user space assigned for the user

Above items are accessible through getter/setter methods of the FASBean object that is included in the FileAgentService.aar file.

For example,
FASBean fb = new FASBean();
fb.setUsername("fiona");
fb.setHost("gridfarm002");
fb.setPort("123");
fb.setCommCertDN("nydb");
fb.setProtocol("gridftp");
fb.setLogicalUserSpace("/home/communityspace/fiona");

For the queryDataSpaceInfo operation, you can build very simple query without knowing any of complicated query language. Specify items that you know exactly. Leave items as null if you are not sure. This operation will process the null item as a wildcard in the query.

For example, if you want to get all the dataspace information about user A in the host GGG, then set the username and host and leave everything else as null. (Just don't set the value).

3.2 registerDataSpaceInfo
This operation registers new data space information. Define FASBean and use it as parameter of this operation. Please refer the sample code.

3.3 removeDataSpaceInfo
This operation removes data space inforamtion. This works very similar to the queryDataSpaceInfo operation. Therefore, if you want to remove all of the information about user A, you should specify username only, and leave all of other itesm null. Please note if you set complete null input parameter to thie operation, it will completely reset your database.

3.4 createDataSpace
[TODO] This operation is almost same with thte registerDataSpaceInfo operation. On top of creating data space information, this operation will access the remote resource and create your's logical space as well.

3.5 queryUserSpaceConvention
This is a utility operation for the advanced users. If the administor wants to organize ther user's logical space with more standard convention, 3.5 ~ 3.7 operations should be very useful.
This operation provides following informations,
  • host: host name of the remote resource
  • port: port number of the remote resource
  • attr: attribution of this convention
  • defaultLoc : convention of the user space
For example, let's assume that an administrator should organize users' data under the community space which is /g/d/commUser. This space is hosted by host A and port 1234. Also this host has multiple mounted resources such as /tg/h/j/hpss for the HPSS server, and /sc/datacatacitor for the High performance data capacitor. The user's space can be organized following way.

host: A
port: 1234
attr: High performance data capacitor
defaultLoc: /sc/datacapacitor/userspace/username

host: A
port: 1234
attr: Network File System
defaultLoc: /g/d/commUser/userspace/username

host: A
port: 1234
attr: HPSS
defaultLoc: /tg/h/j/hpss/userspace/username

Based on these informations, when a new user tries to create a data space, the system can query the convention of the defaultLoc and create the user space accordingly. Also the application can show the attribute of the location so that it can provide more precise information instead encrypted directory path.

You can use this operation in very similar way to the queryDataSpaceInfo. Specify all of the items you know exactly and send the request. The operation will process your query as predicates combined as AND predicates and process non-specified items as wildcard items.

3.6 registerUserSpaceConvention
This operation registers new User space convention. Section 3.5 explains how to organize the community user space using this operation. For more information, please refer the sample code.

3.7 removeUserSpaceConvention
This operation removes user's space convention. For more information, please refer the sample code.

Appendix. Sample Code
Download tarball [48MB contains all the lib and source code]
Sample Code Directory: src/org/ogce/fileagentservice/client
AddNewUserSpace.java
QueryUserSpace.java
RemoveUserSpace.java
ConventionExample.java

Monday, October 15, 2007

Community Proxy Single sign-on

This is about the sigle sign-on process with the community proxy certificate for the OGCE porttal (Gridsphere version). As soon as the user's login name and password are verified the portal service accesses teragrid proxy server, gets the community proxy certificate and stores it with user's login name in the proxy manager.

Step 0. prepare the account
-- get community account
-- http://grid.ncsa.uiuc.edu/myproxy/tgsso.html

Step 1. change the code
org.gridlab.gridsphere.impl.service.core.user.LoginServiceImpl
-- access the proxy server (teragrid proxy server)
-- get a proxy cert
-- register to the proxy manager with the currrent login name

Step 2. compile and generate jar
On gridsphere directory,

ant gridsphere-jar

*make sure that the detendent jar files are located in the lib directory.
proxymanager-api-4.2.jar
cog-jglobus-1.2-050621.jar
jgss-1.0.jar

*make sure that the classpath is pointing the lib directory in the compile task.

Step 3. copy jar to current OGCE deployment under,
/shared/lib/

Thursday, October 4, 2007

File Agent service access from portlet: compile

STEP 0: Shut down tomcat

STEP 1: add 3rd party jar for axis2,
axis2-adb-1.3.jar
axis2-kernel-1.3.jar
axiom-api-1.2.5.jar
annogen-0.1.0.jar
axiom-api-1.2.5.jar
axiom-dom-1.2.5.jar
axiom-impl-1.2.5.jar
commons-codec-1.3.jar
commons-httpclient-3.0.1.jar
stax-api-1.0.1.jar
wsdl4j-1.6.2.jar
wstx-asl-3.2.1.jar
XmlSchema-1.3.2.jar
FileAgentService-0.5.aar
command:
ogce-portal-only/maven-2.0.7/bin/mvn install:install-file -DgroupId=axis2 -DartifactId=axis2-adb -Dversion=1.3 -Dfile="axis2-adb-1.3.jar" -Dpackaging=jar
ogce-portal-only/maven-2.0.7/bin/mvn install:install-file -DgroupId=axis2 -DartifactId=axis2-kernel -Dversion=1.3 -Dfile="axis2-kernel-1.3.jar" -Dpackaging=jar
ogce-portal-only/maven-2.0.7/bin/mvn install:install-file -DgroupId=FileAgentService -DartifactId=FileAgentService -Dversion=0.5 -Dfile="FileAgentService-0.5.aar" -Dpackaging=jar
ogce-portal-only/maven-2.0.7/bin/mvn install:install-file -DgroupId=axis2 -DartifactId=axiom-api -Dversion=1.2.5 -Dfile="axiom-api-1.2.5.jar" -Dpackaging=jar

Step 2. Add s to the project.pom file


axis2
axiom-api
1.2.5
compile


axis2
axiom-dom
1.2.5
compile


axis2
axiom-impl
1.2.5
compile



axis2
axis2-adb
1.3
compile



axis2
annogen
0.1.0
compile



axis2
axis2-kernel
1.3
compile



axis2
commons-codec
1.3
compile



axis2
commons-httpclient
3.0.1
compile


axis2
stax-api
1.0.1
compile


axis2
wsdl4j
1.6.2
compile


axis2
wstx-asl
3.2.1
compile


axis2
XmlSchema
1.3.2
compile



FileAgentService
FileAgentService
0.5
compile



STEP 3: compile and install
On the directory of ogce-portal-only,
maven-2.0.7/bin/mvn clean install -f portlets/comp-file-management/pom.xml

STEP 4: try it.
./tomcat-startup.sh