lcg-vo-env(1) BSD General Commands Manual lcg-vo-env(1) NAME lcg-vo-env - define VO specific environment variables SYNOPSIS lcg-vo-env [-c | -s] [-v] voname [prefix] DESCRIPTION lcg-vo-env is a program to generate the environment variables definitions needed for locating VO specific resources. The idea is that lcg-vo-env is evaluated in-line by the wrapper script that is submitted to the com- pute resource. It will set the relevant environment variables defined for the specified VO, within a namespace defined by the user. The options are as follows: -c Generate C-shell commands on stdout. This is the default if SHELL looks like itās a csh style of shell. -s Generate Bourne shell commands on stdout. This is the default if SHELL does not look like itās a csh style of shell. -v Provide verbose and commented output. In this case, the generated commands can not be evaluated in-line, but must be written to a file first and sourced later. The lcg-vo-env command takes two arguments: the name of the VO in itās external representation, i.e., as specified in an AccessControlBase rule. If the prefix is omitted, the capitalised string of the first name compo- nent (before the first "." in the vo name) will be used, with any dashes ("-") replaced by underscores ("_"). CONFIGURATION The shell variables definitions are read from both a per-VO drop-in con- figuration file in /opt/lcg/etc/lcg-vo-env.d, and in a common configura- tion file /opt/lcg/lcg-vo-env.conf for all VOs. If a VO name is present in both the drop-in directory as well as in the central config file, the central config file takes precedence for those variables that are also defined there. Both files consistent of colon-separated fields on rows (one per line) that cannot be line-continued. Lines starting with a hash- sign (#) are ignored. /opt/lcg/etc/lcg-vo-env.d/ voname Contains definitions, one per line, of the form ":". /opt/lcg/etc/lcg-vo-env.conf Contains definitions, one per line, of the form "VO:::". In case the for a variable is the empty string, the variable is unset (using the abovementioned precedence rules, such that an empty def- inition in the lcg-vo-env.conf file overrides any definition set in the drop-in configuration file. EXAMPLES For /opt/lcg/etc/lcg-vo-env.d/example.org: SW_DIR:/data/esia/example.org/software DEFAULT_SE:tbn18.nikhef.nl and for the central configuration file /opt/lcg/etc/lcg-vo-env.conf: VO:example.org:DEFAULT_SE: # this is a comment VO:pvier.vl-e.nl:SW_DIR:/usr/local/vosw/p4 where the last definition of DEFAULT_SE causes this variable to be unset for the example.org VO, overriding the entry in the file in the lcg-vo- env.d/ directory. Subsequent use of the command for the example.org VO, for example in the job submission script of in the generated job wrapper: $ eval `lcg-vo-env example.org MYVO` $ printenv | grep MYVO VO_MYVO_SW_DIR=/data/esia/example.org/software $ eval `lcg-vo-env pvier.vl-e.nl` $ printenv | grep SW_DIR VO_MYVO_SW_DIR=/data/esia/example.org/software VO_PVIER_SW_DIR=/usr/local/vosw/p4 $ FILES /etc/sysconfig/lcg-vo-env Contains alternate locations for the configuration files and VO definitions. /opt/lcg/etc/lcg-vo-env.d/ voname Contains environment variable definitions for the VO "voname". /opt/lcg/etc/lcg-vo-env.conf Contains environment variable definitions for VOs in a single common file (depricated). AUTHORS David Groep, NIKHEF. SEE ALSO lcg-vo-env.conf(5), lcg-vo-env.d(5) BSD June 28, 2006 BSD