2. Classes

You can assign a system to different classes which can be defined in the control file. Unlike rules, classes have to be configured in the control file and represent a configuration which is typical for a group of systems.

2.1. Creating Class files and Directories

Using the configuration management system, you can define a set of classes. The class definition consists of the following variable for each class:

  • Name: Class name

  • Descriptions: Class description

  • Order: Order (or priority) of the class in the stack of migration

Figure 6.2. Defining Classes

Defining Classes

You can create as many classes as you need, however it is recommended to keep the set of classes as small as possible to keep the configuration system concise. As an example, the following set of classes can be used:

  • site: Classes describing a physical location or site.

  • machine: Classes describing a type of machine or make

  • role: Classes describing the function of the machine to be installed

  • group: Classes describing a department or a group within a site or a location.

A file saved in a class directory can have the same syntax and format as a regular control file but represents a subset of the configuration. For example, to create a new control file for a special computer with a specific network interface, only the resource in the control file, which controls the configuration of the network is needed. Having multiple network types, you can merge the one needed for a special type of hardware with other class files and create a new control file which suits the system being installed.

2.2. Using Classes During Installation

Classes can be merged during installation using a special configuration option in the control file. The classes should be on the same media where the control file is found in the directory classes.

The following shows a simple example of 2 classes defined in the control file which are retrieved and merged during installation

Example 6.3. Classes

  ...
  <install>
    <bootloader>
        ....
    </bootloader>
    <classes config:type="list">
      <class>
        <class_name>software</class_name>
        <configuration>sles9.xml</configuration>
      </class>
      <class>
        <class_name>hardware</class_name>
        <configuration>model_x.xml</configuration>
      </class>
    </classes>

    <general>
        ....
    </general>
  </install>
...
	  
	

The files sles9.xml and model_x.xml will be retrieved from the the directories classes/software and classes/hardware respectively.

The files above might contain one or more configuration sections.