4.8.12.2Using reconf-diskless-image.sh

The reconf-diskless-image.shscript is executed at the end of the image building process. This script contains any modifications to be applied in the read-only part of the image mounted by the nodes.

To this script, add all the commands that you want to execute before the creation of the snapshot directories, such as the personalized read/write directory for each compute node. For example, you can customize the list of files to be copied into the snapshot directory.

The reconf-diskless-image.shcontent provided by HP Insight CMU is:

#!/bin/bash

#cmu_begin_interface

#do not change anything in this section #add custom code after this section

CMU_RECONF_DISKLESS_IMAGE_VERSION=1

#starting with cmu version 4.2

#this script is now dedicated to custom code

#this code is executed as the last step of the creation of

#a diskless image

#

#this script is invoked by /opt/cmu/tools/cmu_dl_post_image

#environment variables available:

#

#CMU_RCFG_PATH = path where the root filesystem is currently mounted

#CMU_RCFG_HOSTNAME = hostname of the compute node

#CMU_RCFG_DOMAIN = dns domainname of the compute node

#CMU_RCFG_IP = mgt network ip of this compute node

#CMU_RCFG_NTMSK = net mask

#cmu_end_interface

#-- custom code starts here --

exit 0

This script is invoked at the end of the image creation process, when /opt/cmu/image/<imageName>/root is populated.

The script is invoked with the following input parameters:

CMU_RCFG_PATH—The path to the root directory of the image. /opt/cmu/image/<imageName>/root

CMU_RCFG_OSTYPE—The type of operating system detected by HP Insight CMU.

CMU_RCFG_IMAGENAME—The name of the HP Insight CMU image.

CMU_PATH—The path to the HP Insight CMU directory. The default is /opt/cmu.

4.8.12.3Using reconf-diskless-snapshot.sh

The reconf-diskless-snapshot.shscript is invoked at the end of each node registration, when the snapshot directory of a compute node has been created. All node-specific changes are made in this script. For example, if you have a network card that needs a static IP address, add the commands to create the ifcfg- file in this file.

IMPORTANT: If you need a customization file in the snapshot directory, you must also put the name in the file /opt/cmu/image/my_diskless_image/snapshot/files.custom.

The content of the reconf-diskless-snapshot.shscript provided by HP Insight CMU is:

4.8 HP Insight CMU diskless environments 61

Page 61
Image 61
HP Insight Cluster Management Utility manual Using reconf-diskless-image.sh