# # '$RCSfile: README,v $' # '$Author: tao $' # '$Revision: 1.12 $' # '$Date: 2004-01-13 00:09:35 $' # This directory contains design, documentation, and development materials associated with the SEEK EcoGrid (ecogrid). Create Metacat Grid Service and Run Client The build.xml file is a example to create Metacat Ecogrid implementaion gar file then deploy it to tomcat. Here is the details: 1. Install globus tool kits 3 (Please see the details in docs/gt3-installation-linux.html) and tomcat 4. We suggest both gt3 and tomcat are owned by user globus. This will decrease the file permission issues. 2. Checkout Metacat module: Location: org.ecoinformatics.org/cvs Checkout: cvs co -P metacat To build Metacat you may also need to checkout the utilities module. 3. Checkout seek module. Location: org.ecoinformatics.org/cvs Checkout: cvs co -P seek seek module, metacat module and utilities module should be different sub-directory in the same directory. For example: project/seek project/metacat project/utilities 4. Edit the build.xml file seek/projects/ecogrid directory. The main properties you need to changes are: "xml.file.path": the directory you want to put xml file for ftp transfer. "data.file.path": the directory you store data file in metacat. "baseURL": the base url which your service will be deploied. "tomcat.dir": the home directory of tomcat. "current.dir": the absolute path of current directory. 5. As globus user, run "ant clean deployTomcat". The implmentaion gar file will be created and deploied to tomcat_home_dir/webapps/ogsa. 6. Copy endorsed/xalan.jar file to TOMCAT_HOME/common/lib/endorsed. 7. Restart tomcat as globus user. Enter tomcat_home_dir/bin. Run ./startup.sh 8. Create a client lib as regular user foo. In seek/projects/ecogrid run "ant buildclientlib" and you will get a file - ecogrid_client_lib.zip in build/lib. This zip file has all lib files to run client. 9. Unzip clinet lib zip file - ecogrid_client_lib.zip in seek/projects/ecogrid/lib. 10. Run client as regular user foo. 10.1 Get user certificate. In globus_home_dir/bin, run "./grid-cert-request" as foo. Then you will find a usercert_request.pem in foo_home/.globus. 10.2 Send usercert_request.pem to Matt Jones(jones@nceas.ucsb.edu) or Jing Tao (tao@nceas.ucsb.edu). 10.3 Put the signed usercert.pem in foo_home/.globus. 10.4 Run "umask 066" as foo in ecogrid directory. 10.5 Edit build.xml. The main properties in clientinit target need be changed are: sourceURI: the source URI for get method destinationURI: the destination URI for get method identifier: the file or document name which need be transfered in get method password: the password to create proxy for user foo. 10.6 In seek/projects/ecogrid, run "ant runClient" as foo. How to set up client without gt3 installation 1. Install Grid-FTP server 1.1. unzip gridftp.zip in lib directory. You will get a new directory - gridftp. 1.2. Go to gridftp directory and follow the README's instruction in there. 2. Set up security configuration 2.1. Get a gsi-config.zip file in seek/projects/ecogrid/lib and unzip it as root user in /etc directory. Edit grid-mapfile to make sure DN and local user name are correct. 2.2. As root user, run command "export GLOBUS_LOCATION=`pwd`" then run "./setup/globus/setup-gsi" in grid-ftp server installation directory. When running the setup-gsi command, the format for host is: O=SEEK,OU=ca.ecoinformatics.org,OU=EcoGrid 2.3. Get the host certification: As root user, run command "bin/grid-cert-request -host hostname" in grid-ftp installation directory. In /etc/grid-security directory, a file named hostcert_request.pem will be found. Send the file to Matt Jones and request certificate. After getting the host certificate, put the file - hostcert.pem in /etc/grid-security as root user. 2.4. Get the user private key and certification: If you already has a copy of private key and certification for the same DN, just copy the usercert.pem and userkey.pem from that machine to the local machine. The directory which stored the private key and certification will be the .globus in user's home directory. 3. unzip ecogrid_client_lib.zip file and your will get a directory named ecogrid_client_lib which contains all jar file you need to run client. Put them into your application class path (This zip file can be getten by running "ant buildclientlib" in a host which is installed gt3). 4. Follow the instruction for 10.4 to 10.6 in "Create Metacat Grid Service and Run Client" setction. You may modify this build.xml to create your own ecogrid implementation. The main steps are: 1. Create a directory such as "srb/impl" under src/ecoinformatics/ecogrid and put the wrap implementaion source code there. 2. Put the lib files (e.g. jar files) into lib directory. 3. Modified the build.xml. The main property you need changes are: "impl.package.dir": the directory to put your wrap implementation source code "impl.package.name": the package name of your wrap implementation "impl.class.name": the class name of your wrap implementation "service.name": service name in service container "service.instance" instance name created by service factory "project.dir" the driectory you put your real implementation 4. Following the steps from step 4 in metacat implementation (but you may ignore the first two properties in step 4). What should we do if update resultset.xsd and query.xsd: Because there are some bugs in AXIS, some stub files which automatically generated could NOT match the schema. So we had to modify the stubs files manually. The modified stub files are: ANDType.java, ORType.java and AnyContentType.java. In cvs, those files have correct implementation. So if you change something in resultset.xsd and query.xsd which has no relation to the three java files (in schema they are AND, OR, and AnyContent complextTypes), you could NOT commit the changes of those three java file to CVS. You should delete the modified copy and check out the cvs newest version for them. The other java files can be checked into cvs. If you change something about those three files, you should merge the new copy and cvs version before you commit the file.