This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Overview#

Orchard is what we call the network-aware service-oriented software used to run Orc programs online. This page describes how to package, install, and test the Orchard servlets. I will describe the process assuming a Debian-based distribution such as Ubuntu using Jetty for a servlet container, although the process will be similar for any Linux distribution.

Prerequisites:

  • Ant
  • Eclipse
  • A recent checkout of the Orchard, OrcSites and OrcJava modules from CVS

WARNING: when you first check out Orchard, Eclipse will try to compile it automatically. This will fail until you have completed some of the following steps. Don't panic. After these instructions are completed Orchard will compile without errors.

Install Jetty#

You will need a servlet container, and Jetty is one which is light-weight and easy to install and maintain. Download and install Jetty 6 packages. For Debian, you can go to http://dist.codehaus.org/jetty/, browse to the latest version, browse to debian, and install:

  • jetty6
  • libjetty6-java
  • libjetty6-jsp-java

The "extra" and "examples" packages are not necessary for a basic installation.

After installing, edit /etc/defaults/jetty6 to set:

  • NO_START=0
  • JAVA_OPTIONS="-Xmx2G -Djava.awt.headless=true -Dcom.sun.management.jmxremote"

Install Orc JAR Dependencies#

The WAR file needs to include the JARs for OrcJava and OrcSites. Build these and copy them to the Orchard/lib directory:

(cd OrcJava && ant jar && cp orc-?.?.?.jar ../Orchard/lib)
(cd OrcSites && ant jar && cp orc-sites-?.?.?.jar ../Orchard/lib)

Create .properties files#

Browse to src/orc/orchard and copy orchard.sample.properties to orchard.properties. Modify it to suit your configuration (i.e. set the mail servers). If you don't plan to run a database or use the various webservice demos you can leave those sections as-is.

Build and Deploy the WAR#

Do a "Clean" build of Orchard from within Eclipse. Then use the External Tool "Build WAR" (which just runs "ant war" using build.xml) to create orchard.war in the top-level directory. You can deploy it in Jetty like this:

sudo cp orchard.war /var/lib/jetty6/webapps/
sudo /etc/init.d/jetty6 restart

If you are using a different servlet container, after creating orchard.war you should install it in the manner appropriate to your container.

Test the Services#

Assuming everything went well, a few seconds after restarting the servlet you should be able to go to http://localhost:8080/orchard and see an Orc job submision page. If you don't see it, check /var/log/jetty6/*.stderrout.log for error messages indicating a problem deploying the servlet.

Click "Run" and watch for publications in the bottom window. If you are not seeing any publications, check for Javascript errors. I recommend installing the "Firebug" Firefox extension to assist in debugging communication problems with the servlet.

Database (OPTIONAL)#

There is an experimental feature to allow users to log in to use restricted features. I don't recommend that you try and set this up on your own server, but if you really want to try it, follow these instructions:

  1. Install postgreSQL
  2. Log in to postgreSQL as an administrator
  3. Run the script src/orc/orchard/create.sql
  4. Run the script src/orc/orchard/schema.sql
  5. To create accounts, use the JMX Console (see below).

JMX Monitoring (optional)#

To use the JMX console (this has known issues on Java 6, please downgrade to Java 5 if you want to use this feature):

  1. Start jconsole: gksudo jconsole
  2. Select the local agent starting with /usr/share/jetty6/start.jar and click Connect
  3. Some useful things to do in the JMX console:
    • Under "MBeans", if there are any jobs running they will appear under "orc.orchard"; you can see status, statistics, and stop jobs if necessary.
    • Under "MBeans", you can find the DbAccounts object and create/update restricted accounts. (This assumes you configured a user accounts database.)
    • Under "Threads", you can see which threads are blocked and where.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 12-Apr-2009 18:22 by AdrianQuark.