Instrument Pipeline Installation Procedure (DRAFT)
ipip is a Perl5 script which installs a DFS Instrument Pipeline.
It has two modules, the first compiles the sources and installs the recipes.
The second one unpacks the content of the CalibDB
tarfile and carries out an updateCalibDB command.
Interface Specification
-
An instrument pipeline delivery consists of two mandatory tarfiles and a third optional one:
- <instrument>-<rel>.tar.gz
- <instrument>-calibdb-<rel>.tar.gz
- <instrument>-dic-<rel>.tar.gz
-
As <quality> account, ipip will be called as:
ipip <instrument>-<rel>.tar.gz [ offline ]
where the optional keyword offline will be used to flag a pipeline delivery
to be used by
the Quality Group at ESO Garching HQ.
-
Even when a source-only release is delivered, the calibdb tarfile will
have to be delivered as well.
The vice-versa applies when only
calibdb files have to be changed.
- The sources tarfile <instrument>-<rel>.tar.gz will contain
a directory called <instrument>-<rel>,
which will contain an executable
called setup or setup.sh.
setup will be the wrapper script hiding from ipip the internal
details of the pipeline building process:
- it is supposed to fail if no command line argument is passed.
- it returns 0 if the build succedeed or -1 if it failed.
- it will copy all the executables (binaries, scripts) and the necessary
documentation to the deployment directory,
- it may write its logfile into a file called setup.log
- it may receive as a command line argument the additional keyword offline
and may or may not change its behaviour accordingly
- In addition to that, the standard output and error of the script setup will be logged in the file /tmp/ipip-tmp<pid>-setup.log.
- The sources tarfile will also contain, under <instrument>-<rel>, a file called
CONTACT which will contain the e-mail address of the person who is
responsible for this delivery.
- The source tarfile may also contain a file called
INSTALL.PARANAL, located under
<instrument>-<rel>, which will contain detailed instructions
on additional steps to be taken for the pipeline to run (like
environment variables configuration etc. etc.).
- The calibdb tarfile will start at the instrument level,
for instance:
fors1/rul
fors1/rul/fors1.akd
fors1/rul/fors1.bdd
fors1/rul/fors1.dpr
fors1/rul/fors1.ehr
fors1/rul/fors1.pdd
offline/fors1.ehr
dic/ESO-DFS-DIC.FORS1_QC
- As in the above example, it may also contain a directory called dic,
meant
to contain dictionary for QC1LogWriter
- The calibdb tarfile may also contain a directory called offline (also as in the example), which will contain some files to replace those located somewhere under the <instrument> tree, in case
the offline qualifier has been activated. If no matching file is found, or if the offline
option is not specified, the directory will be ignored
Preliminary Checks
- the session must be running as <quality> account
- zcat, tar or gtar must exist
- $MIDASHOME and $MIDVERS defined and existing for esomidas
- $VLTROOT must be defined
- /tcal and /cal must exist and point to directories
- $MIDASHOME/$MIDVERS/pipeline must exist and be writable
- <quality> account existing
- <quality> account environment
- Operating system is either of SunOS, Linux or HP-UX.
- calibDb does not contain illegal files (via external script
check-calib.pl, which is callable separately)
M1
- What ipip's module one will do is:
- delete any existing directory $MIDASHOME/$MIDVERS/pipeline/<instrument>-<rel>
- create a temporary directory under $MIDASHOME/$MIDVERS/pipeline
- cd to that directory
- untar the source tarfile
- cd to the directory <instrument>-<rel>
- execute ./setup providing as one and only command line argument, the
path to the deployment directory
which will be $MIDASHOME/$MIDVERS/pipeline/<instrument>-<rel>
- If setup returns a non-zero code, ipip will exit showing
the error message from setup
- delete the temporary directory
- create under $MIDASHOME/$MIDVERS/pipeline a link <instrument> --> <instrument>-<rel>.
M2
- What ipip's module two will do is:
- cd to appropriate /tcal subdirectory
- delete any already existing files which might be overwritten
- untar the tarfile
- copy all the files contained in the dic subdirectory into
the place specified
by the $DFS_QC1_DIC_DIR
- create all needed directories under /cal
- run updateCalibDb -a
- ipip will have to have a table, read at runtime, containing the
location (UT) of each instrument.
This will be needed to cd to the correct path under
/tcal, as quality, before untarring the tarfile
and running
updateCalibDb -a.
Notice that following this interface will not
prevent the pipeline to be compiled and installed
by hand.