wiki:Obsolete/Development/Templates/Generated

Version 21 (modified by /C=FR/O=CNRS/OU=UMR8607/CN=Michel Jouvin/emailAddress=jouvin@…, 17 years ago) (diff)

--

Generating Templates for OS and gLite

OS Templates

OS Templates describing RPM list for each OS feature goup are entirely generated from standard Red Hat (or SL) provided comps.xml file. This is a 3 steps process :

  • src/utils/misc/rpmProvides.pl: generate a file describing features provided by each RPM in OS distribution
  • src/utils/misc/rpmRequires.pl : generate a file describing for each RPM in the distribution the required dependencies. Uses file produced by previous step as input.
  • src/utils/misc/comps2pan.xsl : generate the templates from standard comps.xml file provided in OS distribution. Uses file produced by previous step as input.

All these tools are part of SCDB base.

It is important to use the namespace parameter in comps2pan.xsl and indicates rpmlist as value.

The reference source for these tools is in util/misc in Quattor CVS.

gLite Templates

Base list of RPMs for gLite services

For each gLite service in glite/ directory, there is a list of the required RPMs for the service. This list is mainly generated from official list supplied by gLite with the release. It generally requires some manual tuning to solve some missing dependencies in the list provided by gLite. After the initial release, this list should not be edited, except for adding a new RPM required by an update. Replaced RPMs must be handled by update related templates.

To generate the template from the gLite supplied list, you need to use src/utils/misc/createPackagesTemplate.pl script provided with SCDB. The steps are :

Templates for services managed by ncm-glite

Some of the gLite services are managed with a generic component, ncm-glite. For each service managed by this component, there is a directory in common/glite directory defining the supported configuration options for this service.

These per service templates are generated from file .conf.xml provided in the config RPM associated with each service. This is done by a set of tools in utils directory of ncm-glite component sources, in Quattor CVS. This tool generates 3 templates per service :

  • config.tpl : the entry point
  • schema.tpl : defines all the supported PAN resources/properties for this component
  • defaults.tpl : defines a sensible default value for each property, according to the content of XML file for the service.

Look at README file in utils directory for instructions on how to use the tools and generate these files.

Before using this tool, all the glite*-config*rpm must be installed on the machine where the tool will be run.

List of update RPMs

LCG, gLite and OS templates allow to define in a specific template a list of RPMs that must be used in replacement of standard RPMs. That means that RPMs listed in this template are installed only if the standard RPM was part of the configuration.

Generally all update RPMs for one product version are kept in one directory. There is a tool to help producing the associated template with the last version of each RPM in this directory, src/utils/misc/rpmUpdates.pl/rpmUpdates.pl, which is part of the SCDB base. This script accept one argument, the RPM repository directory, and write the template on stdout which must be redirected to a file.

Trusted CAs Template

Trusted CAs are described in a set of RPMs, updated regularly. There is one template describing all the trusted CAs RPMs that must be loaded. This is :

This template is generated from the contents of the RPM repository containing CAs RPMS with the tools src/utils/misc/createPackagesTemplate.pl which is part of SCDB base.

Before running this tools, it is necessary to download the new CA RPMs from the location indicated in the announcement. In QWG templates, these RPMs are stored in a specific RPM repository. It is a good practice to rename the corresponding directory, create a new one with the same name and download the new RPMs in this empty directory. For example, for CA 1.9 (replace the directory in the example by the directory corresponding to CA RPMs repository) :

mv /www/htdocs/packages/ca /www/htdocs/packages/ca.old
mkdir /www/htdocs/packages/ca
cd /www/htdocs/packages/ca
wget http://glitesoft.cern.ch/LCG-CAs/current/RPMS.production/index.html
wget --force-html --no-directories --base  http://glitesoft.cern.ch/LCG-CAs/current/RPMS.production/index.html -A.rpm -i index.html

Then run src/utils/misc/createPackagesTemplate.pl. For example, for gLite 3.0 and with previous directories :

src/utils/misc/createPackagesTemplate.pl --namespace common/security \
                                         --template cfg/grid/glite-3.0.0/common/security/cas.tpl \
                                         /www/htdocs/packages/ca