Installation

Compatibility

The ICAT Job Portal will work with an ICAT version of 4.4 or greater.

Prerequisites

  • The IJP server distribution: ijp.server-2.0.1-distro.zip
  • A suitable deployed container (here assumed to be glassfish though tomcat should be sufficient) to support a web application. Testing has been carried out with Glassfish 4.0. Glassfish installation instructions are available.
  • A database as described in Database installation instructions installed on the server. During setup you will have to define a jdbc driver and connection details for this database.
  • The database must have a schema "ijp" defined with appropriate grants. In MySQL, this can be done by logging in as root:

    $ mysql -u root -p
    password: *****
    mysql> create database ijp;
    ...
    mysql> grant all on ijp.* to 'icat'@'localhost';

    The IJP setup will create its required tables if they do not already exist.

  • Python (version 2.4 to 2.7) installed on the server.
  • One or more IJP batch servers. The sample unxibatch server may be useful for local development and testing.

Summary of steps

  1. Please follow the generic installation instructions
  2. Update the ijp.properties file with the ICAT and IDS urls, and URLs of the IJP batch servers.
  3. The glassfish certificate for the central IJP server may need to be added to the Java trust store and to the glassfish keystore on each batch server. See the Glassfish installation instructions for more details.
  4. The glassfish certificate for each batch server may need to be added to the central IJP server's trust store and glassfish keystore.
  5. Check that it works.

The ijp-setup.properties file

driver
is the name of the jdbc driver and must match the jar file for your database.
dbProperties
identifies the IJP jobs database and how to connect to it.
glassfish
is the top level of the glassfish installation. It must contain "glassfish/domains", and will be referred to here as GLASSFISH_HOME as if an environment variable had been set.
port
is the administration port of the chosen glassfish domain which is typically 4848.

For a local oracle-xe installation the following values of driver, dbProperties should be good except for the user and password values:

driver=oracle.jdbc.pool.OracleDataSource
dbProperties=url="'"jdbc:oracle:thin:@//localhost:1521/XE"'":ImplicitCachingEnabled=true:MaxStatements=200:user=icat:password=secret

Note the "'" which is needed because the url contains colons which also separate individual properties.

For MySQL:

driver=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
dbProperties=user=icat:password=secret:databaseName=ijp

The ijp.properties file

icat.url
The (prefix of the) URL for the ICAT instance to which the IJP should connect, e.g. https://sig-23.esc.rl.ac.uk:8181.
ids.url
The (prefix of the) URL for the IDS instance to which the IJP should connect, e.g. https://sig-23.esc.rl.ac.uk:8181.
batchserverUrls
List of (prefixes of) URLs for IJP batch servers to which the IJP can submit jobs, e.g. https://sig-23.esc.rl.ac.uk:8181,https://ijp.scarf.rl.ac.uk:8181
reader
Authentication details for an ICAT account used by the IJP to login to ICAT, e.g. "simple username br54 password secret"
authn.list
List of authentication methods to authenticate IJP users. (See the authentication plugin for more details)

Check that the IJP works

Launch the IJP by visiting https://localhost:8181/ijp, and login with the credentials defined in ijp.properties. Then:

  • Choose "date" from the list of Job Types
  • Click "Submit Job"; this should bring up a dialog "date Options" with buttons labelled Submit and Close.
  • Click "Submit". The resulting dialog should display a single Submitted Job ID. Note the ID, and click Close.
  • Click on "Show job status panel"; this should launch a separate dialog listing known jobs and their statuses.
  • At or near the top of the list should be an entry for the noted ID, with name "date". If the Status is Queued, wait until it changes to Completed. Once Completed, click Display Job Output.
  • The output display should show that the job has run; at or near the end should be a line that ends with "date ending with code 0".

Install the demojobs distribution (on both the IJP server and the batch server if they are different). Repeat for these job types, to test other aspects of the IJP, e.gs:

sleepcount
Asks for sleep duration and no. of iterations. It should be possible to observe the output before the job completes.
test_args_multi
Allows the user to select multiple datasets and datafiles and submit them either to a single job, or one job per selection. Output reports the IDs of the selected datasets/datafiles.
create_datafile
Allows the user to select one or more datasets; requests a filename and (one-line) contents. For each selected dataset, runs a (separate) job that creates the file in that dataset.
copy_datafile
The user should select a single target dataset and a single datafile (in a different dataset). The job will create a copy of the datafile in the target dataset. Note that the IJP allows selection of multiple datasets and/or datafiles, and allows the user to run multiple jobs; but in these cases the jobs will fail. Only a single dataset and a single datafile (in a different dataset) should be selected.