Difference between revisions of "Maintaining local Yaim functions"

From PDP/Grid Wiki
Jump to navigationJump to search
Line 55: Line 55:
  
  
== Use the freshly built rpm from Quattor profiles ==
+
== Install the nikhef-yaim-* packages via Quattor ==
  
 
Copy the rpm built in the previous step to a repository on the Quattor server stal.
 
Copy the rpm built in the previous step to a repository on the Quattor server stal.
Line 61: Line 61:
 
Ensure that the rpm is owned by the user ndpfmgr.
 
Ensure that the rpm is owned by the user ndpfmgr.
  
To include the new version of nikhef-yaim-local in the Quattor profiles, edit the template
+
The nikhef-yaim-* packages are installed via Quattor. The exact version of each package may depend on the gLite update version that is installed (gLite updates may imply installation of a backward-incompatible version of a glite-yaim-* package and the corresponding nikhef-yaim-* package). The Quattor templates that define the desired versions are found in:
$L/cfg/facility/<FACILITY>/lcg2/yaim/pro_lcg2_config_yaim.tpl where $L is the base directory of the Quattor configuration.
 
  
Search this file for the following lines:
+
grid/glite-''<VERSION>''/update/''<UPDATE>''/ndpf-yaim.tpl
  
# NIKHEF local yaim setup
+
(the file is located under $L/cfg, where $L points to the base directory of the Quattor tree). In the above, ''<VERSION>'' denotes the gLite version (e.g., 3.1) and ''<UPDATE>'' represents the update level for that gLite version.
"/software/packages" = pkg_repl("nikhef-yaim-local", "X.Y.Z-R", "noarch");
 
  
where ''X.Y.Z'' is the version number and ''R'' the release number.
+
The layout of the file ndpf-yaim.tpl consists of a number of conditional updates:
Change the version and release numbers to match those of your package.
 
  
Finally, make and deploy your quattor profile!
+
if ( exists( x[escape( "glite-yaim-XXX")] ) ) {
 +
  x = pkg_repl("nikhef-yaim-XXX", "a.b.c-d", "noarch");
 +
};
 +
 
 +
(i.e., the local package is only installed if its glite counterpart is installed).
 +
 
 +
 
 +
Finally, make and deploy your quattor profile according to the procedure described in the article [[How_to_work_with_our_Quattor_setup]]!
  
 
'''Note:'''
 
'''Note:'''
The ncm-yaim component only executes when it detects changes in its configuration file.
+
The ncm-yaim component only executes Yaim when it detects changes in its configuration file.
To manually trigger execution of the yaim configuration, execute the following command:
+
To manually trigger execution of the Yaim configuration, execute the following command:
  
 
  ncm-ncd --configure yaim
 
  ncm-ncd --configure yaim
Line 82: Line 86:
 
or even
 
or even
  
  /opt/lcg/yaim/scripts/configure_node /etc/lcg-quattor-site-info.def <NODE TYPE> [NODE TYPE] ...
+
  /opt/glite/yaim/bin/yaim -c -s /etc/lcg-quattor-site-info.def -n <NODE TYPE> [-n <NODE TYPE>] ...

Revision as of 15:40, 23 July 2009

Local Yaim functions

Yaim (http://yaim.info/) is the official configuration tool for gLite middleware. It aims to support the basic configuration for typical grid sites. That basic level of configuration may be insufficient for sites, which may use a non-standard or more complex setup. Yaim allows sites to enhance the default configuration setup with so-called "local functions".

Nikhef's grid middleware is configured using Yaim (which is in turned controlled via [Quattor]). The Nikhef site configuration differs from the default in various ways, which is facilitated by the use of local Yaim functions. For every glite-yaim-PRODUCT package that needs to be enhanced for our site-specific configuration, we maintain a corresponding package nikhef-yaim-PRODUCT. This article describes how to maintain the local packages (between parentheses their gLite counterparts):

  • nikhef-yaim-bdii (glite-yaim-bdii)
  • nikhef-yaim-clients (glite-yaim-clients)
  • nikhef-yaim-core (glite-yaim-core)
  • nikhef-yaim-dpm (glite-yaim-dpm)
  • nikhef-yaim-lcg-ce (glite-yaim-lcg-ce)
  • nikhef-yaim-lfc (glite-yaim-lfc)
  • nikhef-yaim-scas (glite-yaim-scas)
  • nikhef-yaim-wms (glite-yaim-wms)

The source code for the above packages is kept on the Subversion server under repository ndpf/nl.nikhef.ndpf.yaim; there is one directory per package. Each directory contains the same files and directories:

+ functions/local/
+ config.version
+ Makefile
+ template.spec

The files Makefile and template.spec are required for building the package. The version information is taken from file config.version. Under directory functions/local, the modified versions of the configuration functions are defined.

The next sections describe how to checkout, modify, build and install these packages holding the local Yaim functions.

Get the latest sources from the Subversion repository

Do a checkout or update of the directory nl.nikhef.ndpf.yaim from the Subversion repository. Under this directory, one sub-directory per product-package will be created.

The repository is located at host ndpfsvn, with location ndpf/nl.nikhef.ndpf.yaim. Access to this repository is restricted.

Modify the sources

You should know how to do that :-)


Build the package

The file config.version contains the current version number and release number. To build the rpm while preserving the version and release number in config.version, use the command

make rpm

To build and automatically increase the release number, use

make release

To increase the version number, manually modify config.version and use 'make rpm'.

The resulting rpm package will be available in <BUILDROOT>/RPMS/noarch.


Install the nikhef-yaim-* packages via Quattor

Copy the rpm built in the previous step to a repository on the Quattor server stal. The current location for the package at stal is /project/quattor/www/html/mirror/nikhef. Ensure that the rpm is owned by the user ndpfmgr.

The nikhef-yaim-* packages are installed via Quattor. The exact version of each package may depend on the gLite update version that is installed (gLite updates may imply installation of a backward-incompatible version of a glite-yaim-* package and the corresponding nikhef-yaim-* package). The Quattor templates that define the desired versions are found in:

grid/glite-<VERSION>/update/<UPDATE>/ndpf-yaim.tpl

(the file is located under $L/cfg, where $L points to the base directory of the Quattor tree). In the above, <VERSION> denotes the gLite version (e.g., 3.1) and <UPDATE> represents the update level for that gLite version.

The layout of the file ndpf-yaim.tpl consists of a number of conditional updates:

if ( exists( x[escape( "glite-yaim-XXX")] ) ) {
  x = pkg_repl("nikhef-yaim-XXX", "a.b.c-d", "noarch");
};

(i.e., the local package is only installed if its glite counterpart is installed).


Finally, make and deploy your quattor profile according to the procedure described in the article How_to_work_with_our_Quattor_setup!

Note: The ncm-yaim component only executes Yaim when it detects changes in its configuration file. To manually trigger execution of the Yaim configuration, execute the following command:

ncm-ncd --configure yaim

or even

/opt/glite/yaim/bin/yaim -c -s /etc/lcg-quattor-site-info.def -n <NODE TYPE> [-n <NODE TYPE>] ...