Configuring OS Templates

This pages describes the use of QWG templates to configure the OS. These templates are not related to the middleware and can be used in other contexts. They are in charge of installing the required RPMs, based on feature groups requested, and do the base machine configuration (network, ...). They are used by middleware templates configuring a specific middleware machine type to do the base configuration of the machine.

Look at nformation about layout of OS templates for more information.

Selecting OS version

The following sections describe how to define a default OS version and a per-machine OS version. As a result of the OS version selection, the standard templates define variable OS_VERSION_PARAMS which is a nlist representing characteristics of the selected OS versions. Properties (keys) defined in this variable are:

  • major: the major version of the OS (for example 4 for SL4.x)
  • minor: the minor version of the OS (for example 6 for SL 4.6)
  • version: the version of the OS without the architecture (for example sl460 for sl460-x86_64)
  • arch: the architecture of the OS

Cluster Default OS Version

A default OS version/arch can be associated with a cluster. When defined, unless specified otherwise (see next section), all machines will use this OS version.

Default OS version/arch for the cluster is defined with variable NODE_OS_VERSION_DEFAULT, generally in cluster specific site/cluster_info.tpl. The value is the directory containing templates for this OS version.

Per Machine OS Version

Each machine in a cluster can run its own OS version/arch, different from the cluster default version.

Tis done by creating a template pointed by variable NODE_OS_VERSION_DB in your site or cluster hierarchy. This variable is generally defined in cluster specific site/cluster_info.tpl.

The template pointed to by NODE_OS_VERSION_DB must define variable OS_VERSION. This variable must contain one entry for each machine that is not using the default OS version defined for the cluster. The value is the directory containing templates for the OS version.

Selecting Kernel Version

Normally, standard templates provide an appropriate definition of the kernel number and variant (smp, hugemem...) according to OS version used and the hardware present (as declared in templates). If you want to override this default, you can use the following variables (typically at the very beginning of the node profile or in cluster site/cluster_info.tpl) :

  • KERNEL_VERSION_NUM : this must contain the kernel version, as it is in the RPM name, without the architecture.
  • KERNEL_VARIANT : smp, hugemem, largesmp... or nothing (empty string) for non smp kernel.

Proper definition of these variables is important. They are used both to select RPMs to install for kernel and kernel modules and to configure Grub.

Defining KERNEL_VERSION_NUM directly may not be convenient if you want to define it for a large number of machines but not all in your cluster because if you define it in the node profile, this involves editing a large number of templates and if you define it at the cluster level, it may not work if all the machines don't use the same OS version. An alternative to defining this variable directly is to define the variable OS_KERNEL_VERSION. This variable is a nlist with one entry per OS version where:

  • Key is the OS version+architecture as used to define the OS used by the machine (e.g. sl470-x86_64) or the OS version without the architecture (e.g. sl470) in which case the kernel version will be used for all architectures of this OS version.
  • Value is a string corresponding to the kernel RPM version.

The variable OS_KERNEL_VERSION must typically be defined in the template defining the OS version for each machine (the template pointed by variable NODE_OS_VERSION_DB).

Note : only one version of RPMs for kernel and kernel module are present at anytime in the configuration. Be cautious when changing one of these variables on an already installed machine as it will uninstall the previously used version. This will change in the future when SPMA will be able to keep the previously installed version, even if no longer part of the configuration. Grub cannot be configured to use a kernel version other than the one present in the node profile, thus rebooting with an old kernel may require an interactive boot to reconfigure Grub.

Selecting Kernel Architecture

Normally, an attempt is made to guess the OS architecture from the CPU model. But this doesn't fit all situations, in particular with processors that can be installed as 32-bit or 64-bit. You can force the architecture you want to use on a specific machine by défining variable CPU_ARCH to the architecture name, using standard architecture names used in RPMs (e.g. i386, x86_64...).

OS Errata and RPM Updates

See dedicated page.

Last modified 12 years ago Last modified on Dec 9, 2010, 11:13:44 PM