LCATR Job Installation

This note describes how to install the LSST CCD acceptance testing Job Harness (JH) and the job software it runs. It selects specific conventions to be followed. And it describes how to run your software under the job harness in a development context.

Table of Contents

1 Meta

Note, this document is mostly been obsoleted by the JH deploy system. You may find this documented here: ../../deploy/README.org.

2 Overview

The Job Harness software itself is installed in a =virtualenv=1 environment which is made available to any machine that is hosting test or analysis software. This environment is Python-oriented but provides a rooted directory tree that mimics the usual system-level one.

All software specific to running tests or analyses must be installed into this tree in some reasonable manner but must install an Environment Module modulefile in to one of a few specific locations as described below.

3 Installation of Job Harness and Related Code

This section describes how to create the virtual environment, activate it and install in to it the Job Harness software.

3.1 Setting up a Python Virtual Environment

Use virtualenv to a virtual environment root area and activate it:

virtualenv /path/to/lcatr/venv
source /path/to/lcatr/venv/bin/activate

This activation step must be done in future fresh shells in order to run the job harness or install specific job software. Among other things it defines an environment variable $VIRTUAL_ENV which points to the root of the environment (/path/to/lcatr/venv in the example). It may be later referenced by job software installation mechanisms.

3.2 Configuring the Python repository

The job harness and related code is made available as Python packages which may be installed in the conventional manner using either pip or easy_install. The packages are made available from2:

http://lycastus.phy.bnl.gov/pypi/

To configure pip to use this server add the following to the file ~/.pip/pip.conf:

[global]
index-url = http://lycastus.phy.bnl.gov/pypi/

To configure easy_install to use this server add the following to the file ~/.pydistutils.cfg:

[easy_install]
index_url = http://lycastus.phy.bnl.gov/pypi/

3.3 Installing Job Harness and Support Code

After activating the virtual environment as above issue:

pip install lcatr lcatr-schema lcatr-harness lcatr-modulefiles

or similar if you elect to use easy_install.

You should now be able to run this simple test:

python -c 'from lcatr import schema; print schema.store'
lcat-harness --help

3.4 Preparing a release of Job Harness

This section is for Job Harness developers. To prepare a release:

  1. Increment the version string in setup.py
  2. commit and tag using the version string
  3. Produce a source tarball with python setup.py sdist
  4. Copy the tarball to the appropriate subdirectory under /var/pypi
  5. Deploy it

4 Test Station and Analysis Software Installation Requirements

Ultimately, test station and analysis software must be installed into the virtual environment area such that it is callable after an Environment Modules modulefile is located by name and version and loaded. The installation must allow for the software to be uniquely specified by the modulefile.

4.1 Locations for modulefiles

There are two locations to install modulefiles. The first is a central collection of modulefiles:

$VIRTUAL_ENV/modulefiles/<Name>/<Version>

The leaf <Version> is the modulefile. The modulefiles/ directory is initially populated by installation of the lcatr-modulefiles package as described above. Job installation mechanisms may place files into this area at their installation time but are instead encouraged to commit their modulefiles to the lcatr/modulefiles.git repository.

The second location is in a package and version specific directory:

$VIRTUAL_ENV/share/<Name>/<Version>/modulefile

Here the leaf modulefile is the modulefile for the installed package of the given <Name> and <Version>. The software itself may be installed in this same directory. This second location is convenient if the job software exists in a ready-to-use form in a cloned git repository. If so, the entire installation procedure may be as simple as:

cd /path/to/package/clone/
git archive --prefix=$pkg/$tag/ --format=tar $tag | (cd $VIRTUAL_ENV/share/; tar -xf -)

In the example, $pkg matches the <Name> and $tag matches the <Version> of the prior example. Note that error and overwrite checks are omitted here.

Footnotes:

1 http://www.virtualenv.org

2 FIXME: this is a temporary location and internal to BNL.

Author: Brett Viren <bv@bnl.gov>

Date: 2014-10-03 11:04:28 PDT

HTML generated by org-mode 6.21b in emacs 23