GeWorkbench caGrid Services

From Informatics

Jump to: navigation, search

See Also: Dispatcher Implementation Notes, Production

Contents

Install geWorkbench caGrid services

(If you are installing the caGrid services in a Virtual Machine (VM), you may want to look at an older page on VMWare first.) First step before continuing:

The caGrid Installer will install all prerequisites except for Java and MySQL (optional).

  1. The installer instructs on these issues, but it may be worth mentioning: make sure you install the tomcat container and set the following environment variables properly: ANT_HOME, CATALINA_HOME, GLOBUS_LOCATION.
  2. Make sure you deploy both
    1. the index service: go in to caGrid\projects\index directory, execute "ant deployIndexTomcat".
    2. caGrid transfer service: go in to caGrid\projects\transfer directory, execute "ant deployTomcat". You may need to edit caGrid\projects\transfer\etc\serviceMetadata.xml to make sure the required fields are not left blank before that. See more details on the wiki for the previous version (1.3).
  3. increase Java heap memory for your tomcat. In catalina.sh, find the line
 # Set juli LogManager if it is present
 if [ -r "$CATALINA_HOME"/bin/tomcat-juli.jar ]; then

Add this in front of it

 #increase memory allocation
 JAVA_OPTS="$JAVA_OPTS -Xmx2000M"

On Windows, in catalina.bat find this

 if not exist "%CATALINA_HOME%\bin\tomcat-juli.jar" goto noJuli

add this in front of it

 rem increase memory allocation
 set JAVA_OPTS=%JAVA_OPTS% -Xmx1500M

To make sure a specific java version (instead of the default java) to be used by tomcat, add something like this in the same file

 rem use java 6
 set JRE_HOME="C:\Program Files (x86)\Java\jre1.6.0_21"
  • test your tomcat and make sure you can reach
  1. http://localhost:8080/wsrf/services/DefaultIndexService
  2. http://localhost:8080/wsrf/services/cagrid/TransferService

Installation (through network)

  1. Before running installation script:
    1. you'll need a ant-contrib.jar file under the lib directory of your ant. (or you can download a local copy from here)
    2. make sure cvs and subversion clients are installed
      1. on Windows with cygwin, check cvs and subversion packages in cygwin installation
      2. on linux as root, install cvs if it's not installed by default: yum install cvs
      3. to install subversion
        1. Debian/Ubuntu linux: apt-get install subversion
        2. Fedora linux: yum install subversion
        3. Redhat linux, Solaris, Windows: CollabNet http://www.collab.net/downloads/subversion
        4. Mac: openCollabNet http://www.open.collab.net/downloads/community/
    3. make sure the paths to cvs and subversion clients are added to environment variables.
  2. To run installation script:
    1. Create a new empty directory. Let's say it's under root and name of this new directory is "workspace".
    2. Copy the geworkbench_server.xml into ~/workspace. This file currently comes with gingo service distribution.
    3. cd ~/workspace, you have the following 3 options:
      1. to run checkout without deployment execute "ant -f geworkbench_server.xml checkout". Services will be checked out into ~/workspace/cagrid_1_3 directory. During checkout user could be prompted:
        • to type cvs username.
        • to type cvs password.
      2. to run build and deployment without checkout execute "ant -f geworkbench_server.xml deploy". Services should be in ~/workspace/cagrid_1_3 directory prior to execution of this command.
      3. to run complete installation execute "ant -f geworkbench_server.xml install". Services will be checked out, built and deployed. During checkout user could be prompted:
        • to type cvs username.
        • to type cvs password.
    4. (Optional/Alternative) Using distribution package
      1. After build and deployment, to create package for public deployment without java source code, execute "ant -f geworkbench_server.xml dist". This will create "dist" package on the same level of "workspace". "dist" is checked into cvs repository at /cvs/magnet/cagrid/dist and is available for the public download.
      2. To run deployment without build, cd dist, then execute "ant -f geworkbench_server.xml deployNoBuild".
    5. Change version & proxyhost in ${tomcat.dir}/bin/authorizationRequired.properties
      1. the default version & proxyhost is for production server with proxy on cagridnode;
      2. if services were deployed to your localhost, change the last two lines into:
        • version=
        • proxyhost=localhost
  3. Troubleshooting of the installation:
    1. if cvs/subversion client is not installed then user will get error messages. Ant docs states: "What do those error codes mean? Well, they are OS dependent.” Example of error messages on Linux: "java.io.IOException: svn: not found". It means that subversion client is not on the path.
    2. if in windows, your cvs seems hanging after entering cvs username, you can solve this problem by generating ssh public/private keys and appending the public key to .ssh/authorized_keys on the cvs server. This can avoid prompting for user's cvs password. Instructions can be found in http://sshkeychain.sourceforge.net/mirrors/SSH-with-Keys-HOWTO/SSH-with-Keys-HOWTO-4.html
    3. if there's an exception org.globus.wsrf.NoSuchResourceException on caGrid Transfer, please check if you have set the correct version & proxyhost as described in 2.5 in this section.
  4. To test the installation:
    1. go to ${tomcat.dir}/bin
    2. restart your tomcat

Installation (offline version)

  1. you'll need a ant-contrib.jar file under the lib directory of your ant. (or you can download a local copy from here)
  2. create a workspace directory, cd in to that directory, download and unzip the offlineInstaller.tar.gz comes with service distribution.
  3. execute "ant -f geworkbench_server_offline.xml install"
    1. according to the services you want or not, type y or n.
  4. modify ${tomcat.dir}/temp/Dispatcher/userInfo.txt
  5. restart your tomcat

If you don't add your service in dispatcher.properties (see Production, the service will still show up in geWorkbench searching, but when you run it, you will get a null pointer exception from ServiceExecuterThread line 63. It needs to be verified that this is covered by the new script.

Production Deployment

  • (Production is the out-of-date wiki for the production deployment.

The current production versions are installed on geworkbench1 and geworkbech2. They have the same setting. You need to log in as user 'cagrid' and do export CATALINA_HOME=.../apache-tomcat-5.5.27 before shutting down and restarting the tomcat.

host machine: geworkbench1.c2b2.columbia.edu geworkbench1.c2b2.columbia.edu deployment location:

  1. /ifs/data/c2b2/af_lab/cagrid/geworkbench1_release/apache-tomcat-5.5.27
  2. /ifs/data/c2b2/af_lab/cagrid/geworkbench2_release/apache-tomcat-5.5.27

How to set username/password:

  1. edit apache-tomcat-5.5.27/temp/Dispatcher/userInfo.txt by adding one line like 'username==password' for each user
  2. restart tomcat as user cagrid. You must set CATALINA_HOME before restarting because multiple tomcat instances are running under this account.

Other Cases

  1. Linux, On development machine afdev: CaGrid_services_deployment_case_study. More useful details than this page, but not completely up-to-date.
  2. Windows, e.g., development PC

Installation of CaGrid, Tomcat and GeWorkbench Services for External Users

  1. Get the cagrid1.3 installer from here
  2. Follow Installation Quick Start and install caGrid1.3(including ant, globus); use "Staging Grid" as the Target Grid.
  3. Use caGrid 1.3 installer to install tomcat as the non-secure container.
  4. Go in to caGrid\projects\index directory, execute "ant deployIndexTomcat".
  5. Before the first time you deploy cagrid transfer service, you need to edit caGrid\projects\transfer\etc\serviceMetadata.xml to make sure the following fields are not blank: ServiceDescription PointOfContact, ResearchCenter DisplayName, ResearchCenter ShortName, ResearchCenter PointOfContact, ResearchCenter Address, see detailed list.
  6. Go in to caGrid\projects\transfer directory, execute "ant deployTomcat".
  7. You'll need ant-contrib.jar file under the lib directory of your ant. (or you can download a local copy from here)
  8. Download geworkbench server side package from here.
  9. tar -zxvf dist.tar.gz
  10. Go in to dist directory, execute "ant -f geworkbench_server.xml deployNoBuild"
  11. Go in to $CATALINA_HOME/bin, execute "catalina.sh start" to start tomcat; "catalina.sh stop" to stop tomcat; check logs at $CATALINA_HOME/logs/catalina.out
  12. Once cagrid services are up and running, in "Services" tab of geWorkbench Analysis panel, use
index service url: http://localhost:8080/wsrf/services/DefaultIndexService
dispatcher url: http://localhost:8080/wsrf/services/cagrid/Dispatcher
Personal tools