Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP XC System Software : Administration Guide > Chapter 8 Distributing Software Throughout the System

Updating the Golden Image

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Before you can deploy your software and configuration updates throughout the HP XC system, you must update the golden image to synchronize with these changes. The golden image that is created during the initial HP XC system configuration process is named base_image, and it exists in the file system hierarchy under the directory /var/lib/systemimager/images.

You can update the golden image by using either of two utilities:

  • The cluster_config utility

  • The updateimage utility

This section describes both methods.

Note:

Do not update the golden image file system directly. The golden image is a tar file that is compressed for delivery during the multicast imaging operation. The cluster_config and updateimage utilities ensure that the golden image file structure and tar file remain synchronized.

The rsync command is the underlying mechanism used by the cluster_config and updateimage utilities to update the golden image. The rsync command provides an efficient method to update an existing fileset because it transfers only the differences between those two sets of files. As a result, the update of the golden image is significantly quicker than its initial creation.

Whichever method you use to update the golden image, you can protect the golden image from contamination with golden client (head node) specific personality by using an exclusion file. This exclusion file is passed to the rsync command as a list of exclude patterns. For a detailed description of exclusion files, and how to use exclusion files to manage software updates, see “Exclusion Files”.

Note:

Before updating the golden image, make a copy in case you need to revert back. Use the SystemImager si_cpimage command to perform this task. Ensure that you have enough disk space in the target directory where the image will be saved; image sizes are typically 3–6 GB and the size of a compressed tar file of an image is generally 1–3 GB.

The following command makes a copy of the default golden image, base_image, in the /var/lib/systemimager/images directory. The saved image name in this example is base_image.orig. You must run this command on the image server node, which is the head node.

# si_cpimage --verbose --directory /var/lib/systemimager/images \
base_image base_image.orig

If you are preserving multiple images, save earlier versions as compressed archives using your favorite compression utility to preserve disk space on the image server.

The cluster_config Utility

If you have added your own services to be deployed throughout the HP XC system by using the per-node service configuration method described in “Using Per-Node Service Configuration”, in conjunction with the information in “Adding a Service”, you must run the cluster_config utility on the head node again to ensure the Configuration and management database (cmdb) is updated with the latest per-node service configuration and the necessary configuration files updated on the head node. You must be the superuser (root) to run this utility. The cluster_config utility performs the following tasks:

  • Executes the global service configuration scripts.

  • Updates the golden image automatically.

  • Executes the node-specific configuration scripts on the head node.

When the cluster_config command completes, the golden image is synchronized with the golden client. You are ready to deploy the golden image to all the nodes in your HP XC system.

Note:

Nodes that have had their configuration changed are set to network boot. This causes the nodes to reinstall themselves automatically, thus receiving the latest golden image. For nodes to be set to network boot, the nodes must be operational. The cluster_config command displays any nodes that could not be reached, and thus are not set to network boot. This is a problem only on CP6000 systems because each node's EFI environment must be modified. You must resolve the EFI environment manually for those nodes.

The updateimage Command

The updateimage command updates the golden image from the golden client; it does not run any service configuration scripts. As superuser, you must run this command on the golden client node. The updateimage command provides a --dry-run option. This option enables you to inspect the files that will be added to (or deleted from) the golden image, without making any changes.

In the following example, the nodename command is executed and resolves to the node name of the golden client:

# updateimage --gc `nodename` --dry-run

If you are satisfied with the list of files that will be updated in the golden image, issue the command to perform the update:

# updateimage --gc `nodename`

When the updateimage command completes, the golden image is synchronized with the golden client and the golden image tar file is updated. You are ready to deploy the golden image to all the nodes in your HP XC system.

Note:

By default, the updateimage command sets all client nodes to network boot from their Ethernet adapter, connected to the administrative network, the next time the nodes are rebooted. This causes the nodes to reinstall themselves automatically, thus receiving the latest golden image.

On CP6000 systems, for nodes to be set to network boot, the nodes must be operational. The updateimage command displays any nodes that could not be reached, and thus are not set to network boot. This is a problem only on CP6000 systems because each node's EFI environment must be modified. You must resolve the EFI environments manually for those nodes. If the node is not operational when the updateimage command is run, you must set the nonoperational nodes to network boot from the EFI boot menu the next time the nodes are booted.

The --no-netboot option of the updateimage command overrides this default action and maintains the boot order for each client node.

Run the following command to update the golden image but keep the client nodes from network booting the next time the nodes are rebooted:

# updateimage --gc `nodename` --no-netboot

Exclusion Files

Exclusion files protect the golden image from being contaminated with node-specific content from the golden client. While the golden client represents the configuration from which all other nodes are replicated, the golden client is also an actively participating node, and has its own configuration.

A simple example of the types of files to be excluded is a log file, one of many such files in the /var directory. Log files contain node-specific log information. Other examples are configuration files that reference the node's IP address and host name.

The image replication and distribution environment uses three separate exclusion files:

  • /opt/hptc/systemimager/etc/base_exclude_file

    Used during the initial creation of the golden image, which occurs as a result of executing the cluster_config command. The golden client has very little personality at this time, so this exclude file is fairly sparse.

    After the initial golden image is created from the golden client, the golden client is configured, and it takes on its node-specific personality. Any subsequent update to the golden image should exclude those node-specific files from contaminating the golden image.

  • /opt/hptc/systemimager/etc/updgi_exclude_file

    Used when updating the golden image.

    The /opt/hptc/systemimager/etc/updgi_exclude_file file has a stricter set of exclude patterns than the base_exclude_file file.

    The exclude files follow the rules for pattern exclusion based on the rsync command, because the rsync command is the underlying method by which the golden image is created and updated. For a detailed description of the syntax for exclusion files, see the EXCLUDE PATTERNS section of rsync(1).

    If you install additional software on the golden client that produces node-specific content, you must edit the updgi_exclude_file file to add patterns for each node-specific file or directory that you want to exclude, before updating the golden image. NFS-mounted file systems on the golden client are automatically excluded from the golden image. You do not need to include these in the updgi_exclude_file file.

  • /etc/systemimager/updateclient.local.exclude

    Used when updating nodes from the golden image with the si_updateclient command.

    The /etc/systemimager/updateclient.local.exclude file lists files and directories resident on each client node. This exclude file protects these files and directories from being overwritten or deleted when the client node is updated from the golden image with the si_updateclient utility.

    Note:

    The updateclient.local.exclude file is used specifically by the si_updateclient utility; it has no effect when nodes are reimaged as a result of a client autoinstallation operation.

    The updateclient.local.exclude file is resident on each node and referenced locally during the si_updateclient operation. Update this file as you would update other software throughout the HP XC system; that is, edit the /etc/systemimager/updateclient.local.exclude file on the golden client, then incorporate it into the golden image with the updateimage command. The updated image is distributed as described in “Propagating the Golden Image to All Nodes”.

Ensuring That the Golden Image Is Current

Use the updateimage command or thecluster_config command to ensure that the golden image contains all the latest software for all the nodes. If you copy software directly to client nodes without updating the golden image first, that software will be deleted from the client nodes the next time the clients are re-imaged.

Choose the --no-netboot option to update the image if you do not want the client nodes to network boot the next time they are rebooted or power cycled. Otherwise, the reboot or power cycle causes a full re-installation of the node software.

The --dry-run option enables you to verify which files would be added and deleted without performing the operation.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2003 Hewlett-Packard Development Company, L.P.