Installing a BaBar SPGrid Release

From GridPP Wiki
Jump to: navigation, search


The installation of a version of the BaBar SPGrid software at a remote LCG site is done by submitting a grid job to run at the site which downloads the release in the form of a tar archive from an LCG Storage Element, unpacks it to the VO Software Area and sets up various commands, links and config files for site specific setup.

Installation Files

In addition to the tar achive of the software three files are needed to install the software:

  1. A script that performs the installation at the remote site
  2. A JDL file to submit and configure the installation Job
  3. A KanAccess.cfg file to be installed at the remote site. This is used by the BaBar software to locate certain input files (the background trigger collections)

This script performs the following actions:

  • Download the release from the Grid using the Logical File Name
  • Download a "Fix" archive if needed
  • Optionally removes a previous copy of this release
  • Extracts the archive(s) to the VO Software Area
  • Optionally copies the KanAccess.cfg config file (a site specific file sent with the job in the input sand box) into the release folder.
  • Optionally creates a area for non-release specific binaries and creates scripts to locate the Conditions Database at the site

Moose-install.sh

#!/bin/bash -x
ver=$VER
lfn=$LFN
fix=$FIX
boot=$BOOT
start=`pwd`

export LCG_GFAL_INFOSYS=lcgbdii02.gridpp.rl.ac.uk:2170

whoami

lcg-cp --verbose --vo babar $lfn file://$start/Moose.tar.gz

if [ -n $fix ]
then
  lcg-cp --verbose --vo babar $fix file://$start/Moose-fix.tar.gz
fi

echo $VO_BABAR_SW_DIR
ls -ld $VO_BABAR_SW_DIR
printenv | sort

cd $VO_BABAR_SW_DIR/

if [ $REINSTALL = "YES" ]
then
  rm -rf $ver 
fi

tar -xzf $start/Moose.tar.gz

if [ -n $fix ]
then 
  tar -xzf $start/Moose-fix.tar.gz
fi

ls -ld

if [ $MKKANACCESS = "YES" ]
then
  cp $start/KanAccess.cfg ${ver}/kanga/config/
fi

if [ -n $boot ]
then
cd $VO_BABAR_SW_DIR/

mkdir bin

cat <<EOF > bin/sp8boot.sh
OO_FD_BOOT=$boot
unset OO_AMS_USAGE
export OO_FD_BOOT
echo Setting OO_FD_BOOT to $OO_FD_BOOT
echo and unsetting OO_AMS_USAGE
EOF

cat <<EOF > bin/sp8boot.csh
setenv OO_FD_BOOT $boot
unsetenv OO_AMS_USAGE 
echo Setting OO_FD_BOOT to $OO_FD_BOOT
echo and unsetting OO_AMS_USAGE 
EOF

fi

Optional components are switched on by setting environment variables in the JDL file.

Example JDL file for installation at RAL

Executable = "Moose-install.sh";
VirtualOrganisation = "babar";
StdOutput = "install.out";
StdError = "install.err";
Environment = {
                "VER=Moose-18.6.0b",
                "LFN=lfn:Moose-18.6.0b.tar.gz",
                "BOOT=babarams2.rl.ac.uk::/raid/objy/databases/conditions/current/8107/BaBar.BOOT",
                "REINSTALL=NO",
                "MKKANACCESS=YES"
              };
InputSandbox = {"./Moose-install.sh","./KanAccess.cfg"};
OutputSandbox = {"install.out","install.err"};
Requirements = ( other.GlueCEUniqueID == "lcgce01.gridpp.rl.ac.uk:2119/jobmanager-lcgpbs-short" )

Submission

At this point in the install all that remains is to submit the job to the Resource Broker:

edg-job-submit Moose-install-ral.jdl

Testing and Validating the Installation

Simply build a test job specifying the CE to you just installed on as the CE to run the job then submit as normal.

Once you can run test jobs successfully build and run validation jobs in the same manner

--Chris brew 17:12, 25 Oct 2005 (BST)