Installing_Stateful_Linux_Nodes

There is a newer version of this page. You can find it here.

There are two options to install your nodes as stateful (diskful) nodes:

  1. use ISOs or DVDs, follow the section [#Option_1:_Installing_Stateful_Nodes_Using_ISOs_or_DVDs]
  2. or clone new nodes from a pre-installed/pre-configured node, follow the section [#Option_2:_Installing_Stateful_Nodes_Using_Sysclone]
    [TOC]

Option 1: Installing Stateful Nodes Using ISOs or DVDs

This section describes the process for setting up xCAT to install nodes; that is how to install an OS on the disk of each node.

Create the Distro Repository on the MN

The copycds command copies the contents of the linux distro media to /install/<os>/<arch> so that it will be available to install nodes with or create diskless images.

  • Obtain the Redhat or SLES ISOs or DVDs.
  • If using an ISO, copy it to (or NFS mount it on) the management node, and then run:

    copycds <path>/RHEL6.2-Server-20080430.0-x86_64-DVD.iso

  • If using a DVD, put it in the DVD drive of the management node and run:

    copycds /dev/dvd # or whatever the device name of your dvd drive is

Tip: if this is the same distro version as your management node, create a .repo file in /etc/yum.repos.d with content similar to:

[local-rhels6.2-x86_64]
name=xCAT local rhels 6.2
baseurl=file:/install/rhels6.2/x86_64
enabled=1
gpgcheck=0

This way, if you need some additional RPMs on your MN at a later, you can simply install them using yum. Or if you are installing other software on your MN that requires some additional RPMs from the disto, they will automatically be found and installed.

Select or Create an osimage Definition

The copycds command also automatically creates several osimage defintions in the database that can be used for node deployment. To see them:

lsdef -t osimage          # see the list of osimages
lsdef -t osimage &lt;osimage-name&gt;          # see the attributes of a particular osimage

From the list above, select the osimage for your distro, architecture, provisioning method (in this case install), and profile (compute, service, etc.). Although it is optional, we recommend you make a copy of the osimage, changing its name to a simpler name. For example:

lsdef -t osimage -z rhels6.2-x86_64-install-compute | sed 's/^[^ ]\+:/mycomputeimage:/' | mkdef -z

This displays the osimage "rhels6.2-x86_64-install-compute" in a format that can be used as input to mkdef, but on the way there it uses sed to modify the name of the object to "mycomputeimage".

Initially, this osimage object points to templates, pkglists, etc. that are shipped by default with xCAT. And some attributes, for example otherpkglist and synclists, won't have any value at all because xCAT doesn't ship a default file for that. You can now change/fill in any osimage attributes that you want. A general convention is that if you are modifying one of the default files that an osimage attribute points to, copy it into /install/custom and have your osimage point to it there. (If you modify the copy under /opt/xcat directly, it will be over-written the next time you upgrade xCAT.)

But for now, we will use the default values in the osimage definition and continue on. (If you really want to see examples of modifying/creating the pkglist, template, otherpkgs pkglist, and sync file list, see the section [#Deploying_Stateless_Nodes]. Most of the examples there can be used for stateful nodes too.)

Install a new Kernel on the nodes

Using a postinstall script ( you could also use the updatenode method):

mkdir /install/postscripts/data
cp &lt;kernel&gt; /install/postscripts/data

Create the postscript updatekernel:

vi /install/postscripts/updatekernel

Add the following lines to the file

1
2
#!/bin/bash
rpm -Uivh data/kernel-*rpm

Change the permission on the file

chmod 755 /install/postscripts/updatekernel

Add the script to the postscripts table and run the install:

chdef -p -t group -o compute postscripts=updatekernel
rnetboot compute

Option 2: Installing Stateful Nodes Using Sysclone

This section describes how to install or configure a diskful node (we call it as golden-client), capture an osimage from this golden-client, the osimage can be used to clone other nodes later.

Note: this support is available in xCAT 2.8.2 and above.

Install or Configure the Golden Client

If you want to use the sysclone provisioning method, you need a golden-client. In this way, you can customize and tweak the golden-client’s configuration according to your needs, verify it’s proper operation, so once the image is captured and deployed, the new nodes will behave in the same way as the golden-client.

To install a golden-client, follow the section [#Option_1:_Installing_Stateful_Nodes_Using_ISOs_or_DVDs].

To install the systemimager rpms onto the golden-client:

  • Download the xcat-dep tarball which includes systemimager rpms.

    Go to xcat-dep and get the latest xCAT dependency tarball. Copy the file to the management node and untar it in the appropriate sub-directory of /install/post/otherpkgs. For example:

[RH]:

mkdir -p /install/post/otherpkgs/rhels6.3/x86_64/xcat
cd /install/post/otherpkgs/rhels6.3/x86_64/xcat
tar jxvf xcat-dep-*.tar.bz2
  • Add the sysclone otherpkglist file and otherpkgdir to osimage definition and run the install. For example:

[RH]:

chdef -t osimage -o &lt;osimage-name&gt; otherpkglist=/opt/xcat/share/xcat/install/rh/sysclone.rhels6.x86_64.otherpkgs.pkglist
chdef -t osimage -o &lt;osimage-name&gt; -p otherpkgdir=/install/post/otherpkgs/rhels6.3/x86_64
rpower &lt;my-golden-cilent&gt; reset          # you could also use the updatenode method

**Capture image from the Golden Client **

Using imgcapture to capture an osimage from the golden-client.

imgcapture &lt;my-golden-client&gt; -t sysclone -o &lt;mycomputeimage&gt;

Tip: when imgcapture is run, it pulls an osimage from the golden-client, and creates an osimage definition on xcat management node. Use lsdef -t osimage <mycomputeimage> to check the osimage attributes.


MongoDB Logo MongoDB