What Is a Grid UI?

A Grid UI (User Interface) is a computer which has the Grid middleware installed and which can be used to interact with Grid resources (Computing Elements and Storage Elements). From the user’s point of view, a Grid UI provides a set of high-level and low-level commands (grid-*, edg-*, lcg-*, lfc-*, globus-*, voms-proxy-*, glite-*, glite-wms-*, and others) plus a set of environment variables which configure the behaviour of those commands.

The middleware currently comes in two major flavours: the older LCG-2 (with version numbers up to 2.7) and the newer gLite 3 (with version numbers from 3.0 upwards). gLite is a superset of LCG-2 and still contains all the older commands, plus some replacements and new commands (for example voms-proxy-* instead of grid-proxy-*, and glite-wms-job-* instead of edg-job-*). See the LCG-2 User Guide or the gLite 3 User Guide for details.

Setting Up the Environment

The DESY IT group provides the middleware via AFS under /afs/desy.de/project/glite/UI (for SL4) and /afs/desy.de/group/grid/UI (for SL3). You can turn any computer running Scientific Linux 3 or 4 into a Grid UI by sourcing a shell script which will set up your environment (PATH, LD_LIBRARY_PATH, MANPATH, plus a couple of further middleware-specific variables) appropriately:

source /afs/desy.de/project/glite/UI/etc/profile.d/grid-env.sh      (SL4)
source /afs/desy.de/group/grid/UI/GLITE/etc/profile.d/grid_env.sh   (SL3)

(Note that the frequently-used built-in command . (a single dot) is just a shortcut for source.) The paths contain symbolic links which will always point to the most recent version of gLite. You may specify paths with version numbers to select a certain middleware version explicitly.

You can also install the whole middleware package locally on your computer – see How to Install a Local UI for detailed instructions.

Customisation

After setting up your environment, you may want to adjust a few variables for your convenience:

Location of the Proxy File

The commands voms-proxy-init and grid-proxy-init create a so-called proxy certificate which is in turn needed for every access to Grid resources. By default this file resides in your home directory and is called k5-ca-proxy.pem. Set the environment variable X509_USER_PROXY to specify a different location, e. g. in $HOME/.globus or on the local disk.

export X509_USER_PROXY=/tmp/userproxy.pem

Having the proxy file stored on the local disk (instead of the AFS) can be useful if you don’t own a valid AFS token, e. g. because you logged out from the UI and let some commands run in the background, or because your token expired after some time.

Keep in mind that your proxy file must never be readable by anyone but you! On local filesystems it should have the file access permissions 600 (-rw-------), in the AFS it should be stored in a directory with an appropriate ACL (with the read permission granted only to yourself and possibly system:administrators).

Default Virtual Organisation

The lcg-* commands usually require that you specify your Virtual Organisation with the --vo option. Instead you can set the environment variable LCG_GFAL_VO:

export LCG_GFAL_VO=ilc

LFC Host

Set the environment variable LFC_HOST to specify the host which should be queried to resolve logical filenames for the lfc-* and lcg-* commands:

export LFC_HOST=grid-lfc.desy.de

Note that grid-lfc.desy.de is actually an alias name for the currently active LFC host at DESY. You can also use the command lcg-infosites --vo <VO_NAME> lfc to query the BDII at runtime.

export LFC_HOST=$(lcg-infosites --vo ilc lfc)

If you do not specify an LFC_HOST, logical filenames for lfc-* commands have to be given in the form host:path.

LFC Home Directory

Set the environment variable LFC_HOME to specify a base location for all relative paths in the LFC. It will be used by all lfc-* commands if the given logical filename does not start with a slash.

export LFC_HOME=/grid/ilc

Resource Broker and Other Settings

In order to make more far-reaching changes to the configuration, you can copy the files $EDG_LOCATION/etc/edg_wl_ui_cmd_var.conf and $EDG_LOCATION/etc/<VO_NAME>/edg_wl_ui.conf to your personal disk space, modify them, and set the environment variables EDG_WL_UI_CONFIG_VAR and EDG_WL_UI_CONFIG_VO accordingly:

cp $EDG_LOCATION/etc/edg_wl_ui_cmd_var.conf $HOME/grid
cp $EDG_LOCATION/etc/ilc/edg_wl_ui.conf $HOME/grid
# modify the configuration according to your needs
export EDG_WL_UI_CONFIG_VAR=$HOME/grid/edg_wl_ui_cmd_var.conf
export EDG_WL_UI_CONFIG_VO=$HOME/grid/edg_wl_ui.conf

For example, you may want to change LoggingDestination, NSAddresses, LBAddresses, or OutputStorage. Similar configuration files exist for gLite:

cp $GLITE_LOCATION/etc/glite_wmsui_cmd_var.conf $HOME/grid
cp $GLITE_LOCATION/etc/<VO_NAME>/glite_wmsui.conf $HOME/grid
# modify the configuration according to your needs
export GLITE_WMSUI_CONFIG_VAR=$HOME/grid/glite_wmsui_cmd_var.conf
export GLITE_WMSUI_CONFIG_VO=$HOME/grid/glite_wmsui.conf

Similar possibilities hold for the corresponding gLite WMS configuration files. Be sure you know what you’re doing!

Small Utilities

Browsing in the LFC in a cd-like Manner

Download the attached file lfc.sh and source it in your shell. (Because the script has to modify variables in the current environment, it is not executable.) It then defines three shell functions lfc-cd, lfc-pwd, and lfc-ll.

You can define the environment variable LFC_HOME before calling lfc-cd for the first time in order to define your “LFC home directory”. lfc-cd will act similar to the usual cd command: You can specify absolute or relative paths (may include . and ..), you can use no argument or the tilde to jump to your LFC home directory, or you can just pass a minus sign to go back to the previous directory. lfc-pwd will display your current location in the LFC. The function lfc-ll is just a wrapper for lfc-ls -l.

Aliases for MyProxy Commands

The myproxy-* commands always need the option -d to work as expected, furthermore myproxy-init needs the option -n. You may define shell aliases to prevent the common error of forgetting these options:

alias myproxy-init='myproxy-init -d -n'
alias myproxy-info='myproxy-info -d'
alias myproxy-destroy='myproxy-destroy -d'

Of course you have to be aware that this practice lies on the border between convenience (good) and sloth (bad).

Stripping the Prefix lfn: for LFC Commands

The lfc-* commands cannot handle the prefix lfn: in front of logical filenames (or paths) – all you’ll get is a “fatal configuration error: Host unknown: lfn”. This can be slightly annoying when copying and pasting arguments between lcg-* and lfc-* commands in the shell. The tiny snippet of code below will strip off the prefix lfn: for all lfc-* commands – just execute it in your shell (or in an initialisation script).

for cmd in ${LCG_LOCATION}/bin/lfc-*
do
    eval "function ${cmd##*/}() { command ${cmd##*/} \"\${@#lfn:}\" ; }"
done

The construct with the full pathname is needed because shell aliases cannot take arguments, whereas shell functions can be (infinitely) recursive. Find out more about ${parameter#word} in the bash manpage, if you like. (The functions defined above will in principle strip any leading lfn: from all command line arguments, but this should hardly matter since lfn: is unlikely to appear anywhere else than in the actual LFN.)

Other Shells

The above should work for sh-style shells, e. g. bash and zsh. For csh-style shells there is an equivalent setup script named /afs/desy.de/project/glite/UI/etc/profile.d/grid-env.csh or /afs/desy.de/group/grid/UI/GLITE/etc/profile.d/grid_env.csh. The other commands will have to be adapted – see the manpage of your favourite shell for details.

GridUserInterface (last edited 2009-06-16 18:32:14 by localhost)