Sun Update Connection - Enterprise Bare Metal Installation Guide

Template Files

The /usr/local/uce/server/private/channels.xml file contains a section called bmi , which contains pointers to the BMI template files. The BMI template files define how the BMI server provisions managed hosts.The template files are refreshed whenever a user configures or reconfigures the channel.

The template files are explained in the following table.

File Defining Behavior 

Description 

initrd (binary)

The init ramdrive determines the modules to be present before installation. 

kernel (binary)

Kernel used for installation. 

netboot (configuration template)

Identifies the location of these files in the filesystem. 

kickstart (configuration template)

Response file, which contains the predefined answers for installation, created by either Kickstart or the AutoYaST module in YaST. This file controls system creation. 

BMI Template Directories

After you configure a channel, the BMI server gets the latest template files from the knowledge base and stores them in the /tftpboot/images/TYPE (Redhat or SuSE)/ARCHITECTURE (IA32 or AMD64)/DISTRIBUTION/ directory on the BMI server.

For example: /tftpboot/images/SuSE/IA32/SLES_9_0_IA32/kickstart

A channel-specific template directory is created for each set of architecture-distribution type systems that is relevant for your environment. Each directory contains the appropriate BMI server template files.

BMI Server Macros in Template Files

The configuration template files (netboot and kickstart) contain parameter macros. The BMI server substitutes the macros with actual data when a system is added as a managed host of the BMI server. The macros are needed as-is for BMI server operations.


Caution – Caution –

Do not change the macro text or the placement of the macros in the file.


Template File 

Macro Name 

Template File 

Macro Name 

netboot

INITRD PATH

kickstart

{HOSTNAME}

 

KERNEL_PATH

 

{ROOT_PASSWORD}

 

KICKSTART_PATH

 

{SERVER_NAME}

 

DISTRO_SOURCE

 

{USERNAME}

     

{PASSWORD}

Host Files

When a system is provisioned, a subdirectory is created under the /tftpboot/pxelinux.cfg directory on the BMI server. The name of the subdirectory is the MAC address of the provisioned host. The //BMI-system/tftpboot/pxelinux.cfg/MAC-address/ directory contains the kickstart and netboot host files. A host file contains the same lines that are in the template file, but the macro is replaced with host-specific data. A host file also has a post-install section that must not be changed.

Host files are refreshed whenever a host is reprovisioned.

Customizing Files

When you customize the files, either the template files or the host files, there are some parts that must be copied exactly from the original files.

Customizing Template Files

BMI template files belong to a specific architecture-distribution. Modifying the files affects all future system provisioning for that distribution.

When you change or add a template file, you must copy the macros from the original file in the exact text and order.

Customizing Host Files

A host file affects the installation and provisioning of one system. To ensure consistency, copy your customized files to every relevant /MAC-address/ directory.

The kickstart host file is the BMI name for the file created with either Kickstart or YaST. In the kickstart file there is a post section containing data that leads the installation of the Sun Update Connection – Enterprise agent and notifies the BMI server of successful provisioning. The post-install section must be copied exactly into all your customized files.

ProcedureTo Create Customized Template Files

  1. Maintain the default template files for copying and backup:


    # cd /tftpboot/images/TYPE/ARCH/DISTRO
    # mv kickstart kickstart.orig
    # mv netboot netboot.orig
    
  2. Maintain the default host files for copying and backup:


    # cd /tftpboot/pxelinux.cfg/MAC-address/
    # mv kickstart kickstart.orig
    # mv netboot netboot.orig
    
  3. In either or both directories, make another copy for customization:


    # cp kickstart.orig kickstart.significant-suffix
    # cp netboot.orig netboot.significant-suffix
    
  4. Change the files as needed:

    • If you change a template file, make sure the macro lines are exactly as in the original template file, in the same order and the same text.

    • If you change a host file, make sure your host file has the post-install section copied exactly, in the same location in the file as in the original host file.

    • If you want to keep multiple versions of a file, give each version a different suffix and make sure to copy over the needed macros or post-install section.

  5. Decide which version will be used for the next BMI server session. Make a backup of this file. This is important, because if any user changes the configuration through the BMI Server Setup feature, your active files will be overwritten.

  6. Create a symlink for the BMI server to find the files that you want to use for the next BMI provisioning session:


    # ln -s kickstart.your-suffix kickstart
    # ln  -s netboot.your-suffix netboot
    

Example 2–1 Symlink For the BMI Server


kickstart.orig
kickstart.myServers
kickstart.myWorkstations_partA
kickstart.myWorkstations_partB
kickstart.myWorkstations_partA_backup
kickstart -> kickstart.myWorkstations_partA