RSD: Remote Software Deployment V01-16-07

- a system for the automated installation of offline software

Last modified: Fri Jun 12 18:24:30 BST 2009

Nick West

Contents


Overview

RSD is a system to simplify installation of the MINOS (and other experiments) offline code on remote machines. It is specifically aimed at the GRID environment but could be used in any situation where it is only required to install a frozen version of the code (i.e. no CVS updating) so could be used on farms for example. Also, although developed for the MINOS offline code, the main driver isn't hardwired to this application and could be used to install any suitable software once the appropriate low-level scripts have been written.

The diagram below illustrates the key features.

ASSEMBLE

The assemble command is used to prepare component source tar files, including RSD itself and place them on a web-visible directory. They don't have to be assembled in any particular order or indeed from any particular site, however the RSD tools have to be installed and in order to prepare the minossoft tar, the site must have minossoft installed. Likewise for other experiments; to assemble the tar the site obviously needs access to the material to create the tar file.

LAUNCH

The launch command has to be issued at a site which is able to submit jobs that will run where the software is to be installed. For MINOS GRID work this means that the site has to be a User Interface The RSD tools and Ganga need to be installed, but it isn't necessary to have minossoft installed.

To install on some remote site the user specifies the target machine and the software application to be installed. RSD assembles a script with this information together with the URL of the web directory and submits it.

INSTALL

When the launch script runs on the remote machine it uses the web URL to download a copy of RSD and then runs RSD with the install command. This looks up the requested software application in a configuration table and from this deduces the component libraries to be installed. For each of these libraries in turn it download it from the web and then looks up and runs the appropriate installation script.

RSD supports recursive installation, that is to say an application's list of components can include other supporting applications that are to be installed, if necessary, before installing its own component libraries.

If the process completes successfully then the application is considered to be installed. If the installation of any library or supporting application fails, installation terminates. In either case all the installation logs are returned to the launch site for examination. After fixing up any problems the installation job can be run again and, RSD attempts a validation before installation of each library, any libraries that were successfully installed before will not be reinstalled.

If running in a GRID environment, RSD uses lcg-ManageVOTag to maintain software tags.

REMOVE

The launch command can also be used to submit a remove command to remove an application that is no longer needed at a target site. Its supporting applications are not removed as they may be required by other applications; to remove them the launch command must specify them directly.


Platform Support

RSD offers very basic platform support that will allow deployments on multiple platforms to share the same software disk. On start up the system attempts to determine the platform it is running but assumes a default (currently SL3). The platform names is added as a suffix to the application and library build names and also to any published software tag.

When installing and removing software the user can designate the required platform using the --platform option, and if this fails to match the host platform RSD terminates. This will prevent an RSD job accidentally running on the wrong platform and acting on the wrong application build.


Rolling Software Support

"Rolling Software" is characterised as software that:- Examples of rolling software are:- Now RSD supports an arbitrary number of versions of each supported application; each has a separate entry in
  build_config_table.dat
However for rolling software this leads to a steadily growing table plus management overhead switching users to new versions and removing old versions. To reduce this burden RSD has two features, described below.

Wild-carding in the Configuration Table

As it explains in the table:-
#  To support "rolling software", where new versions come out frequently
#  but follow the same build, the application version number can be
#  replaced a perl wild-card expression. When a match is found any
#  character * in the associated library list by the matching version.
#  For example:-
#  
#  Application:grid_tools:V.*-build_1
#    grid_tools:*
#  
#  Will match: Application:grid_tools:V01-16-07-build_1
#  and will associate library list:  grid-tools:V01-16-07
#  
#  This avoids having to update this file each time a new version comes out.
#  
#  Note that:-
#  
#  1)  .* means any character string. 
#      Another example: V\d\d-\d\d-\d\d also matches (\d - any digit)
#  
#  2)  The version number has to be terminated by the string '-build'
#  
#  3)  Exact match takes priority over wild-card match.
#  
#  4)  If there are multiple matches the association is ambiguous, so fails.

Soft Link Support

Versions may be accessed by a system of 3 soft links in the application version/ directory (see Directory Structure) Where XXX is the patform name in order to provide Platform Support e.g.pro-SL4

The normal sequence of events is as follows:-

  1. A new-XXX version is installed and made available for testing.

  2. Once testing is complete the pro-XXX version is switched to it and

    1. The previous version of pro-XXX is moved to old-XXX

    2. The previous version of old-XXX deleted
Both of the operations are supported by the install option:-
  --soft_link=ver{:delete}

 where ver is one of
   new  Make installing version new-XXX
   pro  Make installing version pro-XXX and move previous pro-XXX to old-XXX
        Also make installing version new-XXX if higher than existing new-XXX
   old  Make installing version old-XXX

  If :delete specified any version that was pointed to by a soft
  link before the change, but no longer is, will be deleted.
The normal sequence of events is to install an application twice:-

  1. --soft_link=new
    After this the application is available for testing.

  2. --soft_link=pro:delete
    The application is now the default.
That second step does not require a re-installation, just soft link management. However, even though RSD should only validate each library in the stack it can take some time during which any software tags will declare the application to be in the installing state. So if RSD finds the soft link option and the application exists and --force has not been selected, it bypasses the install step entirely and just performs soft link updates.


User Manual

Syntax

  {global options} command {command options} {command args}


Global Options

  --build_config_table=<file>       
                             Supply build configuration table instead of using the built-in one.
                             Caution: launch command does not propagate file or command to use it.
                                      Only use with launch if 
                                        add  --install_global_option=--build_config_table=<file>
                                        <file> is visible at install site
  --debug=<level>            Set debug to required level (1, 2 or 3) [Default:0]
  --download_method={cp|wget}
                             Select tar file download method 
                               wget [Default]
                               cp  (useful when running RSD locally without web visible dirs)
  --expt=<experiment>        To change from the default experiment
  --http_proxy=<proxy>       To select a non-standard proxy for wget when installing
  --log_file=<file>          Write log output to this file. [Default:/dev/stdout]       
  --max_safe_purge_frac=<f>  Maximum fraction of unused libraries safe be purge [Default 0.2]  
  --upload_method={cp|scp}
                             Select assembled tar file upload method 
                               scp   [Default]
                               cp    (useful when running RSD locally without web visible dirs)
                               none  Don't upload, just assemble
  --web_url=<url>            Specify an alternative web URL.
  --work_dir=<dir>           Write temporary data to this directory. [Default:./]


Commands


assemble -- Assemble a tarball

assemble <library>:<version>
    Options:-
      --web_account=user@host    (not used if  --upload_method=cp)
      --web_dir=directory
      --use_local                 ROOT only: Use current ROOTSYS
The assemble command is used to build a tar file (normally of source code) for a selected version of a library and upload it onto the web visible directory. Uploading uses scp command. The --web_account option can be used to control the remote account and host used and --web_dir the directory.

In the case of ROOT, the option --use_local can be used to create a tar from the currently defined ROOTSYS, which is useful when an "off-tag" version is required.

There is a Naming Convention for libraries and versions and the configuration file

  build_config_table.dat
lists the libraries and supporting applications that are required for each application.


help -- Display brief help

This basically does what you would expect.


install -- Install a complete set of libraries

  install  <top-dir> <application>:<version>
    Options:-
      --force               Force reloading of tar file and skip pre-install validating
      --install_log=<file>  Collect all the installation logs and return a single .tar.gz in <file>
      --no_survey           Don't perform end of install software survey
      --platform=<platform> Required platform.  One of SL3 [default], SL4
      --soft_link=ver{:delete}    
                            Add soft link and optionally delete obsolete versions.
                            NB Actual soft links will be made platform specific e.g. pro-SL4
                            Will bypass install entirely if application exists and not --force.
                            See Soft Link Support
      --validate_only       Don't install, just validate.
The install command steers the installation of specified version of a selected application into the specified top level directory which must be given as in absolute NOT relative form as RSD doesn't normally use the same working directory as its user. For a list of applications RSD can install see the configuration file.
  build_config_table.dat

By default, before installing each library, RSD runs a validation check and skips installation if it passes. This saves time if attempting to complete an installation that had earlier failed part way through. The --force option can be used to force all libraries to reinstall from scratch. The option is not propagated through to any supporting application.

Normally you don't run the install command directly but instead run the launch command that runs the install command on a remote machine and there RSD supplies a --install_log option so that all the individual library log files are returned as a single gzipped tar file.

The --validate_only option is useful if you just want to check that an application is O.K., but don't want to install, even if it isn't. This option is propagated through to any supporting application.


launch -- Launch job to install (or remove) a complete set of libraries

  launch <target>  <application>:<version>
    <target> is one of:-
      self:<sw_dir>        Install locally using sw_dir as top level directory
                             e.g. self:/data/minos/minos2/west/rsd_tests
      lcg:<queue>          Install on LCG queue. 
                             e.g. lcg:lcgce02.gridpp.rl.ac.uk:2119/jobmanager-lcgpbs-minosL
                             Assumes LCG env. var. $VO_<expt>_SW_DIR will be set there.
      lcg:<queue>:<sw_dir> Install on LCG queue into specified directory. 
                             e.g. lcg:lcgce02.gridpp.rl.ac.uk:2119/jobmanager-lcgpbs-minosL:/stage/minos-data1/software/grid
      pbs:<sw_dir>         Install using PBS (via Ganga)
                             e.g. pbs:/stage/minos-data1/software/grid
      pbs-<queue>:<sw_dir> As pbs:<sw_dir> but to a specific queue rather than the default.
                             e.g. pbs-prod4:/stage/minos-data1/software/grid

    Options:-
      --install_global_option=<install option>     Pass global option to installer
                                                   e.g.  --install_global_option=--debug=1
      --install_command_option=<install option>    Pass command option to installer
                                                   e.g.  --install_command_option=--force
      --remove                                     Run remove job rather than install job
The launch job is used to generate a job to run the install (or remove) command on a target machine. The <target> argument determines the location of the target machine. For testing purposes it can designate a self target and specify the top-level directory under which to install. Currently the only other type of target is an LCG GRID host and the queue must correspond to one in the lcg-infosites --vo <experiment> ce list.

The --install_global_option and --install_command_option can be used to add global and command arguments respectively to the install command.

The --remove option is used to completely remove all the constituent libraries of an application. There are no safety checks, you have been warned!! Supporting applications are not removed.


lib_list -- List the libraries contained in the application.

Lists to the terminal the set of libraries required to build the supplied application. e.g.
  rsd lib_list minossoft:S08-03-20-R1-28-build_1

remove -- Deinstall a complete set of libraries

  remove  <top-dir> <application>:<version>
    Options:-
      --install_log=<file>  Collect all the deinstallation logs and return a single .tar.gz in <file>
      --platform=<platform> Required platform.  One of SL3 [default], SL4
De-install a complete set of libraries on target site below <top-dir>. As with the install, you don't this normally issue this command directly but rather indirectly when you use the launch --remove command. Supporting applications are not removed.


test -- Run component test

You should leave this alone!

This command is used to run tests on RSD itself. Currently, there is only valid command argument.

   test replace_sw_tag


Examples

Installing RSD

If you are at FNAL with SRT setup, then RSD is installed and all that is needed is to set up the environment:-
  bash: source  $SRT_PUBLIC_CONTEXT/GridTools/Scripts/setup/setup_minos_lcg_grid.sh

  csh:  setenv MOG_TOOLS $SRT_PUBLIC_CONTEXT/GridTools
        source $SRT_PUBLIC_CONTEXT/GridTools/Scripts/setup/setup_minos_lcg_grid.csh
The rather odd name reflects the fact that RSD is a tool developed for the LHC Computing Grid.

To install RSD, which is part of GridTools, on other sites see Installing GridTools and follow steps 1 to 3.

Installing Applications

To see what applications can currently be built look at the build_config_table.dat:-
  grep "App:" $RSD_HOME/libs_and_builds/build_config_table.dat | cut -f1 -d ' '
All that RSD needs to install an application is a top level directory under which to install any/all applications. For example to install application XXX:YYY-build_1 (e.g. minossoft:R2.0.1-build_1) under /minos/scratch/nwest:-
  my_top_dir=/minos/scratch/nwest  (not required; just for convenience)
  rsd install $my_top_dir XXX:YYY-build_1
If the install fails you can check the log of the library that failed to install by looking below the top directory ($my_top_dir in our case) for the file:-
  $my_top_dir/rsd/<library-name>-*/rsd_admin/install.log
Once the installation has completed the environment can be set up with:-
  source  $my_top_dir/apps/XXX/YYY-build_1-<platform>/setup_library/setup_XXX.bash or .csh
  where <platform> = e.g. SL4

Installing Minossoft

Let's suppose you want to install under /minos/scratch/nwest. As a convenience start by defining
  my_top_dir=/minos/scratch/nwest
Installation of Minossoft is complicated by the fact that Minossoft requires the separate application BFieldMap; it was kept separate so that it can be updated without having to rebuild Minossoft and can be shared between different releases of Minossoft. Trying:-
  grep "App:" $RSD_HOME/libs_and_builds/build_config_table.dat | cut -f1 -d ' '
gives
  App:BFieldMap:.*-build_1
means that this is Rolling Software so that new versions can be added and old ones removed with new/pro/old soft links moving forward. However, to install a specific version we need the latest BFieldMap which can be found by looking in the afs area
  ls -l /afs/fnal.gov/files/data/minos/d160/remote_software_deployment/bfieldmap*
at the time of writing this the latest was
  bfieldmap-2008-02-08.tar.gz
To install it:-
  rsd install $my_top_dir --soft_link=pro:delete BFieldMap:2008-02-08-build_1
The --soft_link=pro:delete option forces the installed application to have a 'pro' soft - something that the Minossoft installation requires.

Now you are ready to install Minossoft e.g.:-

  rsd install $my_top_dir minossoft:R2.0.1-build_1
As part of the installation procedure a loon job is run to validate the build and for this the database environmental variables need to be provided. The installation script has hardwired sets for certain locations, e.g. FNAL, but if installing at other sites define the ENV_TSQL_* before running RSD so that it will pick up your values.

Once the installation has completed the environment can be set up with:-

  bash: source  $my_top_dir/apps/minossoft/R2.0.1-build_1-SL4/setup_library/setup_minossoft.bash
  csh:  source  $my_top_dir/apps/minossoft/R2.0.1-build_1-SL4/setup_library/setup_minossoft.csh

Installing Genie

To be supplied.


Developer Manual

Installing

RSD has been developed for MINOS so if all you want to be able to install MINOS applications supported by RSD then all you need to is:-
  1. Check out the code.

  2. Define the environmental variable RSD_HOME to point to the top level directory.

    It is also convenient to define an rsd alias (csh) or subroutine (sh/bash) as:-

      perl -w $RSD_HOME/driver/rsd.pm
    
If you want to extend support to new applications see Extending Application Support

If you want to add new experiments or change the defaults that RSD assumes see Extending Experiment Support

RSD uses the Ganga job submission system for submitting jobs to the LCG GRID. If RSD cannot find Ganga it will fail. The environmental variable:-

  GANGA_BIN
must point to the Ganga executable so that RSD can locate it.

Internals

Naming Conventions

The core concepts are:- Both concepts are qualified by a version.:- A library or application name are often combined with its version to form a Application ID or Library ID. In the RSD API they are combined using a colon e.g. libsigc++:1.2.5 or minossoft:R.1.20-build_1 (the colon was chosen to ensure easy parsing) but for file names the separator is normally the more conventional minus sign e.g. libsigc++-1.2.5. In this form it is also known as the Application FID or Library FID (File ID). There is an exception to the minus sign separator in the file name: for some reason the dcap tar file is formed using an underscore e.g. dcap_v2_36_f0506_Linux+2.4 so RSD has to be programmed to know about exceptions like this.


Build Configurations and Software Stacks

When RSD has to build an application it looks the application's name up in
  build_config_table.dat
Here is a typical entry:-
Application:geant4_vmc:R2.2-build_0
  libsigc++:1.2.5
  mysql:5.0.22
  clhep:2.0.3.1
  geant4:8.3
  pythia:6.4.09
  root:v5-15-08
  geant4_vmc:v2-2
  bfieldmap:2006-01-24
  minossoft:S07-06-04-R1-25
Application geant4_vmc:R2.2-build_0 is built from the 9 entries in software stack listed after it. Building begins with the first entry (libsigc++:1.2.5), followed by the second and so on. Once a library has been installed RSD makes it available for subsequent library installations which can then bind to it, for example by using the headers it provides. So the order of software stack denotes the library dependency.


Library Building and Sharing

Libraries are always built in the context of an application. That is to say, while building, any other libraries that are part of the application and appear earlier in the application library list are considered to be supporting and will be available. In particular their headers can be used for binding. Different applications may require the same version of a particular library and can share a copy so long as it has been built in the same context. The system works as follows:-

  1. RSD assigns each build a unique Library BID (build ID) that has the following format:-
       <library name>-<library version>-<N>
         where N  = unique serial number 1, 2, ...
    

  2. Some libraries build entirely within their own directory, for example root and minossoft. However, others libraries, for example libsigc++ and mysql, install headers, libraries and executables in their installation directories, which in the RSD model is the parent directory. In order to support library sharing material is stored in two directory trees.

    The library itself is held in:-

       libs/<library name>-<library version>-<N>
    
    and the administration information, including the context in which the library is built, and all build products stored external to the library itself are held in:-
       rsd/<library name>-<library version>-<N>
    

  3. When building each library of an application, this area is searched to see if a library of the right version and right context already exists. If it does then within the application area, first any existing (and hence obsolete) soft links to the library are removed and the fresh ones made to the library and all its external build products.

  4. If no library exists, or if forcing a rebuild, a new unique Library BID is assigned. The library is initially built in the application area which is first cleared of obsolete soft links. This is done mostly for historical reasons, it's the way laid down in the library script API. On completion, whether successful or not, all the output of the build is moved to the appropriate libs/ and rsd/ directories, leaving behind soft links.

  5. At the end of each installation, a clean up procedure checks the library area and removes any library, along with the associates rsd/ directory that is no longer in use i.e. which is not pointed to by a soft link in at least one application.

Caution: Care must be taken with any soft links created during installation as they will be moved once the library build is complete and some relative ones might break. Soft links should only be one of the following:-

It is the responsibility of the writer of the installing script to ensure that this rule is observed.

Minimising Library Builds

RSD assumes that a library depends on all the libraries beneath it on the software stack defined for the application. This can lead to spurious dependencies which in turn can lead to unnecessary builds. These don't do any harm, beyond wasting some cpu cycles and disk space, but it is trivial to eliminate at least some of them.

Suppose there are two independent libraries A and B and that libraries C, D, E, and F can be used with either of both. Further assume that the software stacks are ordered as follows:-

  C   D   E   F
  B   A   A   B
  A   B
This will result in both A and B being built twice, once in the context of no supporting libraries and then again in the context of the other as a supporting library. The solution is to be consistent in the ordering and include the library even if not needed, for example:-
  C   D   E   F
  B   B   B   B
  A   A   A   A
Now A and B are only built once, A in the context of no supporting libraries and B in the (spurious) context of supporting library A. To ensure consistency the combination of these two libraries could be called a supporting application of some type and then that application could just be included in the application in the software stacks for C, D, E, and F.


Directory Structure

RSD uses two directory trees:- The two trees are organised as follows:-

  Environment  Directory                   Notes
  variable
  
  HOME         .../                        Holds global log files
                                             install_<application_id>_install_logs.tar.gz (individual install logs)
  
  
  RSD_SW_DIR  /
              ...apps/                     Applications area
              .  ...app name/              e.g. minossoft/
  RSD_TOP_DIR .     ...app ver/            platform specific version e.g. R.1.20-build_1-SL3/ 
              .        .                     May be a rolling software soft link Contains 'installed_libraries'    .
              .        ...xxx/             Where xxx = build product subdirectories e.g.  bin, include, lib.
              .        .                     Contents are all soft links to  ../../../../rsd/*/xxx
              .        ...lib file ID/     Form: <name>-<ver>  e.g. root-v5-14-00b.  
              .        .                     Soft link to ../../../../libs/<name>-<ver>-<build number>
              .        .                     e.g.  ../../../../libs/root-v5-14-00-0
              .        ...setup_library/   Recommended area for setup scripts (or soft links to them)
              .                              Naming convention setup_<lib name>.sh/.csh e.g. setup_root.csh
              .
              ...libs/                     Library build area
              .  ...lib build ID/          Form: <name>-<ver>-<build number>/ Library build ID 
              .                              e.g. root:v5-12-00-0
              .                              Contains  unwound library tar file and any internal build products
              .
              ...rsd/                      RSD admin area
              .  ...lib build ID/          RSD data associated with corresponding library in libs/
              .     ...xxx/                Where xxx = build product including subdirectories e.g.  bin, include, lib. 
              .     ...rsd_admin/          RSD adim dir with:-
              .                              <name>-<ver>.tar.gz  Tar file 
              .                              install.log          Build log
              .                              install.wlog         wget log
              .                              install.sh           Install script wrapper
              .                              install.status       One line install status. If in error, will start with '?'
              .                              install.context      One line build context e.g. libsigc++:1.2.5 mysql:5.0.22
              .                              install.date         One line build date e.g. Mon Jun 18 14:18:56 BST 2007 
              .
  RSD_HOME    ...rsd_home/                 The RSD code
                 ...config/                Experiment specific configuration files.
                 ...driver                 Generic (independent of supported software specifics) driver
                 ...doc/                   Documentation
                 ...libs_and_builds/       Software specific scripts to configure and build
  

Notes

For completeness, as this section includes file naming conventions, the script RSD generates when launching a job to run RSD on a remote machine is named:-
  launch_[install|remove]_<application_id>.sh


Global Driver Variables

Global driver variables are defined in
  $RSD_HOME/driver/initialise_globals.pm


Library Script API

Each time an assemble or install script is invoked, the following environmental variables will be defined:-

VariableMeaning
RSD_DEBUG Debug flag. Set to 1 for debug
RSD_LIBRARY_VERSION Library version
RSD_LIB_STATUS_FILE File used to communicate one-line exit message from script
RSD_LOG_FILE RSD (top level) log file
RSD_PRINT Print utility used to print to RSD_LOG_FILE RSD
in order to maintain a consistent format with RSD driver entries.
RSD_RETURN Utility to be sourced to return status. It takes 2 args:-
1) Return code (0 = success)
2) Message
Example: . RSD_RETURN 1 "Failed to build library"
RSD_RUN Utility to be sourced to execute a single script line
The utility checks the result of execution and quits if it fails
Example: . $RSD_RUN tar xzf $RSD_TAR_FILE
RSD_SITE_NAME Generic site name. e.g. "ral_t1_ui"
RSD_TAR_FILE Tar file
RSD_WORK_DIR Empty work directory for use if required

To provide good diagnostics, all scripts are expected to:-

These responsibilities can make writing scripts rather tedious so helper scripts have been provided.

Just look at

  $RSD_HOME/libs_and_builds
for examples using these helper scripts.


Assemble-Specific Environmental Variables

Each time an assemble script is invoked, the following additional environmental variables will be defined:-

VariableMeaning
RSD_USE_LOCAL =1 if --local sepcfied, ==0 otherwise
Used when assembling ROOT to take ROOTSYS rather than CVS.


Install-Specific Environmental Variables

Each time an install script is invoked, the following environmental additional variables will be defined:-

VariableMeaning
HOME Log in directory
RSD_HOME Top level directory for RSD tools
RSD_LIB_BUILD_DIR The directory where the installing library will eventually be placed
RSD_LIB_INSTALL_LOG_FILE Library install log (create if installing, check is validating)
RSD_MODE One of "installing" or "validating"
RSD_HOST_PLATFORM Host platform e.g. SL3
RSD_SW_DIR The software top level directory (holds apps/, libs/ and rsd/)
RSD_TOP_DIR The top level directory to install under
It will be of the form: ../<application-name>/<application-version>/
For each supporting library XXX (e.g. XXX = root)
The character '+' is not permitted in environment names so is removed e.g.
RSD_SUP_LIB_libsigc_VER=1.2.5
RSD_SUP_LIB_XXX_VER Version number
RSD_SUP_LIB_XXX_DIR Directory


Execution Setup Scripts

The focus of RSD is necessarily on software installation, but of course the exercise is pointless unless eventually software execution is reached! This normally starts by sourcing some setup scripts and it is natural, at least for some libraries, that these scripts are generated during installation. So RSD provides a convenient place for the scripts, or soft links to them:-
  ...apps/   
     ...app name/ 
        ...app ver/
           ...setup_library/  
The recommended name convention for the setup scripts for library XXX (e.g. XXX = ROOT) is:-
    setup_XXX.csh
    setup_XXX.sh
It is also recommended that the install script starts by briefly documenting if it produces a setup script and if so what it does. It's also a good idea to list what supporting libraries it requires. Fir example, take a look at:-
install_minossoft
Now none of this is compulsory; RSD isn't going to police this rule. However it is a good idea that people who are supporting a library within the RSD framework have a standard place so that clients have a standard place to look.


GRID Site Specifics

RSD assumes as little as possible about remote GRID sites and tries only to use resources (files and environmental variables) that constitute the standard GRID setup. This section lists the resources it needs. It also lists the Computing Elements it is currently working on and the name mapping it uses to get from the WN (Worker Node) host name to the RSD_SITE name which will be used, if necessary to hardwire information where the standard seup is inadequate.

GRID ResourceUse
$VO_<experiment>_SW_DIR Top-level directory for software installation
See Directory Structure
$HOME/.BrokerInfo Used to get the CE name.
$EDG_WL_LOG_DESTINATION Used to get the CE name if unable to find .BrokerInfo.
For site specific mappings using the host environment see get_site_info.pm
For site-specific hardwired settings see set_local_config.pm


Extending Application Support

Adding New Libraries

Adding a new library XXX requires the creation of two new scripts:-
  $RSD_HOME/libs_and_builds/assemble_XXX.sh
  $RSD_HOME/libs_and_builds/install_XXX.sh 
These scripts have to handle all the versions of library XXX. For examples, look at the scripts in
  $RSD_HOME/libs_and_builds
and for more inforamtion on writing these scripts see the Library_Script API


Adding New Applications and Builds

To add a new application or build update:-
  $RSD_HOME/libs_and_builds/build_config_table.dat
Review the individual library assemble and install scripts to ensure that can handle any new versions.
  $RSD_HOME/libs_and_builds/assemble_XXX.sh 
  $RSD_HOME/libs_and_builds/install_XXX.sh  


Extending Experiment Support

As far as possible RSD is experiment neutral, but RSD does have to use experiment specific resources. For example RSD has to know where the web-visible directory is and what VO to use when submitting GRID jobs.

Now it is possible to override defaults at execution time by selecting the appropriate options, for example:-

  --download_method={cp|wget}
                        Select tar file download method 
                          wget [Default]
                          cp  (useful when running RSD locally without web visible dirs)
  --expt=<experiment>   To change from the default experiment
  --http_proxy=<proxy>  To select a non-standard proxy for wget when installing
  --web_url=<url>       Specify an alternative web URL.
but it is tedious, not to mention error prone, to have to use such options on a permanent basis and RSD has a configuration system to eliminate this. All configuration material is held in the subdirectory:-
  config/
Configuration depends on two elements:-

When RSD begins execution it attempts to locate the file:-

        config/<experiment>-<host name>.config
  e.g.  config/minos-ral_t1_ui.config
and if successful, executes it. To see what can be changed look at:-
        config/example.config
By creating additional files it is possible to configure RSD at your sites.

Note that it is not necessary to update the CVS Repository for RSD to use your configuration for remote installation. When you use the assemble command to create the tar file for RSD itself, it takes its material from your version of RSD (as pointed to by RSD_HOME) and it will be that version that will be used remotely. That's not to say that configuration files for other experiments are not welcome in the Repository, just email if you want something added.

Of course this system relies on you remembering that

   --expt=<experiment>
option, so is still error prone. To deal with this, add the file
        config/.experiment
containing the name of your experiment and RSD will use this (although --expt will still override). Also when running the launch command, RSD will include the --expt option in the target install command, so will insure that launching and installing always use the same experiment regardless of whether the .experiment file is present at the remote site.


Testing

The configuration file
  build_config_table.dat
includes at trivial application: test_rsd that is used for testing RSD itself.
Nick West