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 10 Distributing Software Throughout the System

Adding Software or Modifying Files on the Golden Client

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

The first step in managing software changes to your HP XC system is to update the golden client node. This can involve adding new software packages, adding a new user, or modifying a configuration file that is replicated across the HP XC system, such as a NIS or NTP configuration file.

Note:

It is important to have a consistent procedure for managing software updates and changes to your HP XC system.

If you need to add a software package or service configuration file to the golden client that should not be distributed to all nodes, be sure to prevent these files from becoming part of the golden image by using an exclusion file. See “Exclusion Files” for further details.

If the package or service configuration file is specific to the head node and it is not to be distributed to any other node, then making the change on the golden client and excluding the necessary files from being included in the golden image is sufficient. However, if the software package or configuration file is destined for other (specialized) nodes in the HP XC system, then a procedure is required to distribute these changes to those nodes. You can use either of the following methods to accomplish this:

Installing Additional RPMs from the HP XC System Software Installation DVD

Use the following procedure to install additional RPMs from the HP XC System Software Installation DVD:

  1. Log in as the superuser on the head node.

  2. Insert the installation DVD into the DVD drive.

  3. Mount the DVD:

    # mount /dev/cdrom mountpoint
  4. Change to the /mountpoint/dir directory where dir is the directory on the DVD on which the RPM is located.

  5. Locate the RPM you want to install and issue the rpm command to install it; for example:

    # rpm -ivh kde-i18n-French-3.1.3-1.noarch.rpm

“Updating the Golden Image” discusses how to update the golden image with the new software for subsequent distribution to client nodes.

Using File Overrides to the Golden Image

File overrides overwrite files delivered in the golden image. File overrides are copied to the client nodes after the golden image is transferred, thus overriding files in the golden image itself.

File overrides are organized in a subdirectory hierarchy rooted at /var/lib/systemimager/overrides/name. Each subdirectory of the overrides/name directory specifies a complete file override hierarchy that is copied to the root directory of the client node's file system.

The need to use file overrides is specified in the master autoinstallation scripts, located at /var/lib/systemimager/scripts. Each master autoinstallation script contains an OVERRIDES variable that specifies one or more overrides subdirectories to associate with this master autoinstallation script.

To specify a select number of nodes to receive a particular override:

  1. Make a copy of the appropriate master autoinstallation script

  2. Use the text editor of your choice to modify the OVERRIDES variable to match your overrides subdirectory name, /name.

  3. In the /var/lib/systemimager/scripts directory, create symbolic links to this master autoinstallation script for the nodes that will receive this override.

    The symbolic link names must follow the format name.sh, where name is the host name of each node to receive the override.

For further information on using overrides in the SystemImager environment, see the FAQ chapter in the SystemImager Manual, located at the following Web site:

http://systemimager.org/doc

The following example describes how to set up an override to enable a compiler package to be delivered only to the nodes with the login role:

  1. Create an overrides subdirectory, named compiler, to contain the compiler package:

    # cd /var/lib/systemimager/overrides
    # mkdir ./compiler
  2. Verify that there are two subdirectories, named base_image and compiler, under the ./overrides directory.

    # # ls -F
    base_image/   compiler/     README
  3. Install the compiler package into the alternate root location, /var/lib/systemimager/overrides/compiler.

    # rpm -ivh --root \
    /var/lib/systemimager/overrides/compiler compilername.rpm
  4. Use the find command to verify the file hierarchy:

    # find ./compiler
    ./compiler
    ./compiler/usr
    ./compiler/usr/lib/
    .
    .
    .
  5. Make a copy of the default HP XC autoinstallation script as a new script to image the login nodes specifically with the compiler overrides. Name the new autoinstallation script compiler.master.0:

    # cp base_image.master.0 compiler.master.0
  6. Change directory to the SystemImager “scripts” directory:

    # cd /var/lib/systemimager/scripts
  7. Use the text editor of your choice to modify the OVERRIDES variable definition in the compiler.master.0 file as follows:

    [ -z $OVERRIDES ] && OVERRIDES="base_image compiler"

    It is necessary to append compiler after the string base_image because the default HP XC installation relies on the base_image override

    Save the file and exit the text editor.

  8. Link all the login nodes (that is, those nodes with the lvs service) to the compiler.master.0 autoinstallation script

    # for i in $(expandnodes $(shownode servers lvs))
    do
    ln -sf compiler.master.0 $i.sh
    done
  9. Verify that the links are correct

    # ls -l 
    .
    .
    .
    lrwxrwxrwx    1 root     root  ... n7.sh -> compiler.master.0
    lrwxrwxrwx    1 root     root  ... n8.sh -> compiler.master.0
    lrwxrwxrwx    1 root     root  ... n9.sh -> compiler.master.0

Now the system can be imaged. In this example, when nodes n[7-9] are installed with the full imaging installation, the compiler overrides are automatically delivered after the golden image has been delivered.

The following example creates a file override for a specific node, n8. The criteria for the override, for example, node type or services provided, is not addressed.

  1. Create the appropriate subdirectory for the node under the /var/lib/systemimager/overrides directory:

    # cd /var/lib/systemimager/overrides
    # mkdir n8_override
  2. Copy the appropriate files into the new n8_override directory.

    Remember to create the appropriate directories for these files. For example, if you want to specify the /etc/vimrc file, then you must also create the etc subdirectory. For example:

    # pwd
    /var/lib/systemimager/overrides
    # cd n8_override
    # mkdir etc
    # cd etc
    # cp /etc/vimrc .
  3. Change directory to the SystemImager scripts directory:

    # cd /var/lib/systemimager/scripts
  4. Copy the base_image.master.0 file to use as the basis for the new override file, n8_override.master.0:

    # cp base_image.master.0 n8_override.master.0
  5. Use the text editor of your choice to modify the OVERRIDES variable definition in the n8_override.master.0 file. Append the name of the override directory you added in the first step.

    [ -z $OVERRIDES ] && OVERRIDES="base_image n8_override"

    Save the file and exit the text editor.

  6. Create any necessary links to the override master file you created and edited in the last two steps:

    # ln -sf n8_override.master.0  n8_override.sh

    All the nodes to be overriden must be linked.

  7. Use the text editor of your choice to edit the /etc/systemimager/flamethrower.conf file.

    Add an entry at the end of the file for the directory you created in the first step. In this example, add the entry shown in bold:

    [base_image]
    DIR = /var/lib/systemimager/images/base_image
    
    [override_n8_override]
    DIR = /var/lib/systemimager/overrides/n8_override
    
    [override_base_image]
    DIR = /var/lib/systemimager/overrides/base_image
    

    Save the file and exit the text editor.

  8. Reimage the nodes:

    # setnode --resync --all
    # stopsys
    # startsys --image_and_boot
  9. Verify that the propagation occurred as expected by examining the files on the node.

Using Per-Node Service Configuration

The HP XC system configuration process uses per-node configuration scripts to achieve personalized role configurations as necessary on each node. The per-node configuration process occurs initially during HP XC system configuration, at the time each client node is auto-installed. The HP XC configuration and management database (CMDB) contains the per-node role and service configuration, and is queried on each node's initial boot to identify which roles and services to configure. See “Adding a New Service” for more information.

A per-node configuration script is associated with each configurable service, and is executed on the client node if the CMDB identifies this client as hosting this service.

The per-node configuration process actually occurs in two phases:

  • Global Service Configuration

    The global configuration phase is intended to set up the per-node configuration phase by globally configuring the service for use within the HP XC system. The global configuration of a service occurs when a global configuration script (a gconfig script) is executed during the running of the cluster_config utility. It is here that you interact with the cluster_config utility as necessary to configure the service. In order to configure a new service into the HP XC system using gconfig, you must run the cluster_config utility again.

    The global configuration script can store information in the following locations:

    CMDB

    Use the database as the target for node-specific configuration data, that is, services that are not ubiquitous in the HP XC system, but run on only one or a handful of nodes.

    Golden client file system

    By writing to the golden client file system, the script can add or modify files that are propagated to all nodes of the HP XC system by using the golden image. This is useful for configuring services that are ubiquitous in the HP XC system.

    Cluster common storage (/hptc_cluster)

    By writing to the cluster common storage, the script is able to add or modify files that are visible to all the nodes of the HP XC system. Use this method for either per-node or clusterwide services.

    As mentioned previously, the database is the destination for node-specific data. However, some existing services may already place configuration data used by the service in files in known locations. The golden client file system and the cluster common storage are available to support such applications.

    Global service configuration scripts are located in the /opt/hptc/etc/gconfig.d directory.

  • Node-Specific Configuration

    The node-specific service configuration step uses the results of the global service configuration step described previously to apply to a specific node its “personality” with respect to the service. User interaction is not permitted because this step runs on a per-node basis.

    The configuration of the service is accomplished in a script called by the node-specific service configuration controller (nconfig) script. The nconfig controller script runs at system startup, and it reports if is executing as part of the initial boot of a client node after an installation operation. If so, the nconfig controller script queries the CMDB to determine which node-specific service configuration scripts to execute, thus providing the per-node personality to each node.

    Per-node configuration scripts are located in /opt/hptc/etc/nconfig.d directory.

Run the per-node configuration scripts on each node with the following commands after successfully synchronizing each client node with the golden image. This returns the per-node personality following the golden image update:

# cexec -a -x `nodename` -f128 "/sbin/service nconfig nconfigure"
# cexec -a -x `nodename` -f128 "/sbin/service nconfig nrestart" 

The number of simultaneous remote commands are increased by using the cexec command's -f option.

You can monitor the execution of the per-node configuration scripts from a central location by monitoring the /hptc_cluster/adm/logs/imaging.log file. Run the following command from the imaging server node (currently, the head node):

# tail -f /hptc_cluster/adm/logs/imaging.log 

The per-node configuration scripts log their execution locally to the /var/log/nconfig.log file.

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