After evaluating numerous automated installations of OES servers and SLES servers we have found that these installations have some commonalities:
AutoYaST control files contain information that is identical for all customer environments, such as meta XML information, system user settings, and services configurations.
There are always properties which differ between customer environments and that might even differ between locations or sites of a particular customer but are the same for all servers in that particular environment. Time sources, name resolution (DNS, SLP, hosts), LDAP server, and replica server are examples for this kind of configuration information.
Control files typically also contain some server specific information such as the host name, IP addresses, network masks, MAC addresses, and PCI IDs.
The Consulting Installation Framework aims at reducing the complexity of managing control files. Its design is based on the following principles:
The framework must fit into every customer environment without code modification.
The installation is based on XML class files.
The configuration of SLES and OES services is split into individual XML files (snippets) that can be combined into service types as needed.
All dynamic information is removed from the XML files and replaced by placeholder variables. The names of these variables are in all uppercase and enclosed in %%. These modified XML files containing placeholders are referred to as template files.
Information relevant for multiple systems is stored in a set of configuration text files supporting the same set of variables to allow overwriting general configuration information with more specific information for a subset of systems.
Server-specific information is stored in a semicolon-separated server configuration file.
The system being installed retrieves the required template files to its /tmp/profile directory and merges them into a complete template control file.
The system being installed also retrieves the required configuration text files to its /tmp/profile directory and replaces all placeholders with the actual values, resulting in a server-specific autoinst.xml file created on the fly.
The set of variables along with their assigned values used during the installation will be stored in the file /root/install/variables.txt for documentation purposes and future use.
The framework is implemented in a main library and a set of shell scripts that are developed and maintained by Micro Focus Consulting Germany in cooperation with SUSE Consulting Germany.
Customer-specific requirements can be implemented in a custom library that is already integrated in the framework. It can use every function of the main library.
This design approach has two fundamental requirements: the ability to execute scripts on the system being installed and the ability to modify the default /tmp/profile/autoinst.xml control file created by AutoYaST, before the actual installation begins.
The first requirement is met by AutoYaST's pre-script stage at the beginning of an installation within the initial RAM disk. In this stage, shell and Perl scripts specified in the control file can be retrieved from local or remote repositories and can be executed.
After the pre-script stage, AutoYaST checks for a file named /tmp/profile/modified.xml. If this file exists, autoinst.xml is renamed to pre-autoinst.xml and modified.xml is renamed to autoinst.xml. The installation then starts and processes the information in this new control file. This meets the second requirement.
If modified.xml should not exist, the original control file is used instead.