HP Insight Cluster Management Utility User Manual

Page 156

Advertising
background image

/ram${INTEL_MIC_FS}/mic0/etc/sysconfig/hostname" >> ${file}
echo "mv -f /ram${INTEL_MIC_FS}/mic1/etc/sysconfig/.hostname.\$host
/ram${INTEL_MIC_FS}/mic1/etc/sysconfig/hostname" >> ${file}
echo "mv -f /ram${INTEL_MIC_FS}/mic0/etc/sysconfig/network/.ifcfg-mic0.\$host
/ram${INTEL_MIC_FS}/mic0/etc/sysconfig/network/ifcfg-mic0" >> ${file}
echo "mv -f /ram${INTEL_MIC_FS}/mic1/etc/sysconfig/network/.ifcfg-mic0.\$host
/ram${INTEL_MIC_FS}/mic1/etc/sysconfig/network/ifcfg-mic0" >> ${file}

chmod 755 ${file}

# configure the oneSIS preinit script to run this command
sed -e "s?/bin/echo oneSIS: preinit complete?/usr/local/sbin/make_intel_mic_fs?" <
${CMU_RCFG_PATH}/etc/init/rcS.conf > ${CMU_RCFG_PATH}/rcS.conf.new
cp -f ${CMU_RCFG_PATH}/etc/init/rcS.conf ${CMU_RCFG_PATH}/usr/local/src/rcS.conf.orig
mv -f ${CMU_RCFG_PATH}/rcS.conf.new ${CMU_RCFG_PATH}/etc/init/rcS.conf
chmod 644 ${CMU_RCFG_PATH}/etc/init/rcS.conf

## finally, run mk-sysimage to incorporate the configuration changes/sbin/mk-sysimage ${CMU_RCFG_PATH}

exit 0

The following is the content of the reconf-onesis-snapshot.sh script:

#!/bin/bash
#
# CMU - oneSIS post-node customizable script
#
# This script is used for configuring per-node customizations in the oneSIS
# diskless filesystem. It is strongly recommended to review the oneSIS
# documentation at http://onesis.org before making changes to this file. It
# is important to understand how per-node file changes are implemented by
# oneSIS. A simple network configuration example is provided below.
#
# environment variables available:
#
# CMU_RCFG_PATH = path where the diskless filesystem is currently mounted
# CMU_RCFG_IMAGENAME = name of this CMU diskless logical group
# CMU_PATH = CMU installation path
# CMU_RCFG_HOSTNAME = target node hostname
# CMU_RCFG_IP = target node IP address
# CMU_RCFG_MAC = target node MAC address for PXE-booting
# CMU_RCFG_DISKLESS_SERVER = target node NFS server

#
# Simple network configuration example: configuring a second network in a
# RHEL-based diskless onesis image
#
# In this example we will configure eth1 on every node with a secondary
# network with a subnet of 172.30.X.X. The last two octets will match the
# the last two octs from the CMU management network.
#
# Note: The file /etc/sysconfig/network-script/ifcfg-eth1 *must* be
# configured in /etc/sysimage.conf as follows:
#
# LINKBACK /etc/sysconfig/network-script/ifcfg-eth1 NODE
#
# Once configured then the following command must be run:
#
# # 'mk-sysimage /opt/cmu/image/<diskless_logical_group_name>/onesis'
#
# This tells oneSIS that this file will contain a per-node configuration. This
# step can be configured in the reconf-onesis-image.sh file.
#
# The code below belongs in this file, and provides the node-specific
# configuration:
#
# orig_file=${CMU_RCFG_PATH}/etc/sysconfig/network-scripts/ifcfg-eth1
# file=${orig_file}.${CMU_RCFG_HOSTNAME}
# subnet=172.30
# last_octets=`echo $CMU_RCFG_IP | awk -F. '{print $3 "." $4}'`
# echo "DEVICE=eth1" > $file
# echo "BOOTPROTO=static" >> $file
# echo "IPADDR=${subnet}.${last_octets}" >> $file
# echo "NETMASK=255.255.0.0" >> $file
#
# end example

156

Advanced topics

Advertising