2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

Merge pull request #6473 from xcat2/master

Merge from master to 2.15 branch for 2.15.0 release. (5)
This commit is contained in:
Mark Gurevich 2019-11-04 15:15:51 -05:00 committed by GitHub
commit 218c6d3acc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
67 changed files with 7885 additions and 508 deletions

View File

@ -24,6 +24,10 @@
# prep for a release.
# GPGSIGN=0 - Do not sign the repo in the end of the build. The repo will be signed by default
#
# LOCAL_KEY=1 Use local keys to sign repo instead of WGET from GSA. By default use GSA.
#
# SETUP=1 Setup environment for build. By default do not setup environment.
#
# LOG=<filename> - provide an LOG file option to redirect some output into log file
#
# DEST=<directory> - provide a directory to contains the build result
@ -48,16 +52,8 @@ if [[ ! -f /etc/lsb-release ]]; then
fi
. /etc/lsb-release
# Check the necessary packages before starting the build
declare -a packages=( "reprepro" "devscripts" "debhelper" "libsoap-lite-perl" "libdbi-perl" "quilt" "git")
export HOME=/root
for package in ${packages[@]}; do
RC=`dpkg -l | grep $package >> /dev/null 2>&1; echo $?`
if [[ ${RC} != 0 ]]; then
echo "ERROR: Could not find $package, install using 'apt-get install $package' to continue"
exit 1
fi
done
# Process cmd line variable assignments, assigning each attr=val pair to a variable of same name
for i in $*; do
@ -70,6 +66,44 @@ for i in $*; do
export $varstring
done
#Setup environment so the xcat-deps can be built on a FVT test machine
if [ "$SETUP" = "1" ];then
#Mount GSA
POKGSA="/gsa/pokgsa"
POKGSA2="/gsa/pokgsa-p2"
POKGSAIBM="pokgsa.ibm.com"
if [ ! -d $POKGSA ];then
mkdir -p $POKGSA
mount ${POKGSAIBM}:${POKGSA} ${POKGSA}
fi
if [ ! -d $POKGSA2 ];then
mkdir -p $POKGSA2
mount ${POKGSAIBM}:${POKGSA2} ${POKGSA2}
fi
# Verify needed packages installed
REPREPO="reprepro"
DEVSCRIPTS="devscripts"
DEBHELPER="debhelper"
QUILT="quilt"
apt-get -y install $REPREPO $DEVSCRIPTS $DEBHELPER $QUILT
echo "Finised setup for xcat-dep build. Rerun this script with SETUP=0 LOCAL_KEY=1 flags"
exit 1
fi
# Check the necessary packages before starting the build
declare -a packages=( "reprepro" "devscripts" "debhelper" "libsoap-lite-perl" "libdbi-perl" "quilt" "git")
for package in ${packages[@]}; do
RC=`dpkg -l | grep $package >> /dev/null 2>&1; echo $?`
if [[ ${RC} != 0 ]]; then
echo "ERROR: Could not find $package, install using 'apt-get install $package' to continue"
exit 1
fi
done
# Supported distributions
dists="saucy trusty utopic xenial bionic"
@ -136,8 +170,6 @@ function setbranch {
fi
}
export HOME=/root
WGET_CMD="wget"
if [ ! -z ${LOG} ]; then
WGET_CMD="wget -o ${LOG}"
@ -150,10 +182,16 @@ else
gsa_url=http://pokgsa.ibm.com/projects/x/xcat/build/linux
mkdir -p $HOME/.gnupg
for key_name in pubring.gpg secring.gpg trustdb.gpg; do
if [ ! -f $HOME/.gnupg/$key_name ] || [ `wc -c $HOME/.gnupg/$key_name|cut -f 1 -d' '` == 0 ]; then
rm -f $HOME/.gnupg/$key_name
${WGET_CMD} -P $HOME/.gnupg $gsa_url/keys/$key_name
if [ "$LOCAL_KEY" = "1" ];then
# Keys are already in the local $HOME/.gnupg directory
chmod 600 $HOME/.gnupg/$key_name
else
# Need to download keys from GSA
if [ ! -f $HOME/.gnupg/$key_name ] || [ `wc -c $HOME/.gnupg/$key_name|cut -f 1 -d' '` == 0 ]; then
rm -f $HOME/.gnupg/$key_name
${WGET_CMD} -P $HOME/.gnupg $gsa_url/keys/$key_name
chmod 600 $HOME/.gnupg/$key_name
fi
fi
done
fi
@ -424,9 +462,8 @@ then
#the path of ubuntu xcat-dep deb packages on GSA
GSA="/gsa/pokgsa/projects/x/xcat/build/ubuntu/xcat-dep"
if [ ! -d $GSA ]; then
echo "build-ubunturepo: It appears that you do not have gsa installed to access the xcat-dep pkgs."
echo "build-ubunturepo: It appears that you do not have GSA to access the xcat-dep pkgs."
exit 1;
fi

View File

@ -17,6 +17,11 @@
# UP=0 or UP=1 - override the default upload behavior
# FRSYUM=0 - put the directory of individual rpms in the project web area instead
# of the FRS area.
# CHECK=0 or 1 - verify proper file location and links. Default is to check.
# Verifies all noarch files in ..../<OS>/<ARCH>/ are links
# Verifies no broken link files in ..../<OS>/<ARCH>/
# Verifies there are no multiple, real (non-link) files with the same name
# Verifies all real (non-link) files have a link to it
# VERBOSE=1 - Set to 1 to see more VERBOSE output
# This script should only be run on RPM based machines
@ -30,10 +35,14 @@ fi
USER=xcat
TARGET_MACHINE=xcat.org
BASE_GSA=/gsa/pokgsa/projects/x/xcat/build
GSA=$BASE_GSA/linux/xcat-dep
FRS=/var/www/xcat.org/files/xcat
OSNAME=$(uname)
UP=0
CHECK=1
# Process cmd line variable assignments, assigning each attr=val pair to a variable of same name
for i in $*; do
# upper case the variable name
@ -41,13 +50,7 @@ for i in $*; do
export $varstring
done
if [ "$OSNAME" == "AIX" ]; then
DFNAME=dep-aix-`date +%Y%m%d%H%M`.tar.gz
GSA=/gsa/pokgsa/projects/x/xcat/build/aix/xcat-dep
else
DFNAME=xcat-dep-`date +%Y%m%d%H%M`.tar.bz2
GSA=/gsa/pokgsa/projects/x/xcat/build/linux/xcat-dep
fi
DFNAME=xcat-dep-`date +%Y%m%d%H%M`.tar.bz2
if [ ! -d $GSA ]; then
echo "ERROR: This script is intended to be used by xCAT development..."
@ -117,6 +120,81 @@ function checkrc {
fi
}
# Verify files in $GSA
if [[ ${CHECK} -eq 1 ]]; then
ERROR=0
LINKED_TO_FILES_ARRAY=[]
counter=0
OSes=`find $GSA -maxdepth 1 -mindepth 1 -type d`
for os in $OSes; do
ARCHes=`find $os -maxdepth 1 -mindepth 1 -type d`
for arch in $ARCHes; do
# Find regular noarch.rpm files in <OS>/<ARCH> directory
for file in `find $arch -type f -name "*noarch.rpm"`; do
ERROR=1
echo -e "\nError: Regular 'noarch' file $file found in 'arch' directory. Expected a link."
done
# Find broken links file
for file in `find $arch -xtype l -name "*noarch.rpm"`; do
ERROR=1
echo -e "\nError: Broken link file $file"
done
# Save a link of everything being linked to for later use
for link_file in `find $arch -type l -name "*.rpm"`; do
LINKED_TO_FILE=`realpath --relative-to=$GSA $link_file`
LINKED_TO_FILES_ARRAY[$counter]=$LINKED_TO_FILE
counter=$counter+1
done
done
done
# Find identical files in $GSA and $GSA/<OS> directory
for short_file in $GSA/*.rpm; do
basename=$(basename -- "$short_file")
DUP_FILES=`find $GSA/*/ -type f -name $basename`
if [[ ! -z $DUP_FILES ]]; then
ERROR=1
echo -e "\nError: Multiple real files with the same name found ($basename):"
for dup_file in `find $GSA -type f -name $basename`; do
ls -l $dup_file
done
fi
done
if [ -n "$VERBOSEMODE" ]; then
# In verbose mode print contents of array containing all the files someone links to from <OS>/<ARCH>
for var in "${LINKED_TO_FILES_ARRAY[@]}"; do
echo "Symlink detected to file: ${var} "
done
fi
echo " "
# Find all files no one links to
REAL_FILES=`find $GSA/* -maxdepth 1 -type f -name "*.rpm" | cut -d / -f 10,11 --output-delimiter="/"`
for file in $REAL_FILES; do
FOUND=0
for used_link in "${LINKED_TO_FILES_ARRAY[@]}"; do
if [[ $file == $used_link ]]; then
FOUND=1
break
fi
done
if [[ ${FOUND} -eq 0 ]]; then
echo "Warning: No symlinks to file: $GSA/$file"
fi
done
if [[ ${ERROR} -eq 1 ]]; then
echo -e "\nErrors found verifying files. Rerun this script with CHECK=0 to skip file verification."
exit 1
fi
fi
WORKING_TARGET_DIR="${DESTDIR}/xcat-dep"
# Sync from the GSA master copy of the dep rpms
mkdir -p ${WORKING_TARGET_DIR}
@ -132,151 +210,67 @@ cd ${WORKING_TARGET_DIR}
# add a comment to indicate the latest xcat-dep tar ball name
sed -i -e "s#REPLACE_LATEST_SNAP_LINE#The latest xcat-dep tar ball is ${DFNAME}#g" README
if [ "$OSNAME" != "AIX" ]; then
# Get gpg keys in place
mkdir -p ${GNU_KEYDIR}
checkrc
for i in pubring.gpg secring.gpg trustdb.gpg; do
if [ ! -f ${GNU_KEYDIR}/$i ] || [ `wc -c ${GNU_KEYDIR}/$i|cut -f 1 -d' '` == 0 ]; then
rm -f ${GNU_KEYDIR}/$i
cp $GSA/../keys/$i ${GNU_KEYDIR}
chmod 600 ${GNU_KEYDIR}/$i
fi
done
# Tell rpm to use gpg to sign
if ! $GREP -q '%_signature gpg' $MACROS 2>/dev/null; then
echo '%_signature gpg' >> $MACROS
# Get gpg keys in place
mkdir -p ${GNU_KEYDIR}
checkrc
for i in pubring.gpg secring.gpg trustdb.gpg; do
if [ ! -f ${GNU_KEYDIR}/$i ] || [ `wc -c ${GNU_KEYDIR}/$i|cut -f 1 -d' '` == 0 ]; then
rm -f ${GNU_KEYDIR}/$i
cp $GSA/../keys/$i ${GNU_KEYDIR}
chmod 600 ${GNU_KEYDIR}/$i
fi
if ! $GREP -q '%_gpg_name' $MACROS 2>/dev/null; then
echo '%_gpg_name xCAT Automatic Signing Key' >> $MACROS
fi
# Sign the rpms that are not already signed. The "standard input reopened" warnings are normal.
echo "===> Signing RPMs..."
$XCATCOREDIR/build-utils/rpmsign.exp `find . -type f -name '*.rpm'` | grep -v -E '(already contains identical signature|was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
# Create the repodata dirs
echo "===> Creating repodata directories..."
for i in `find -mindepth 2 -maxdepth 2 -type d `; do
if [ -n "$VERBOSEMODE" ]; then
createrepo $i # specifying checksum so the repo will work on rhel5
else
createrepo $i >/dev/null
fi
rm -f $i/repodata/repomd.xml.asc
gpg -a --detach-sign --default-key 5619700D $i/repodata/repomd.xml
if [ ! -f $i/repodata/repomd.xml.key ]; then
cp $GSA/../keys/repomd.xml.key $i/repodata
fi
done
# Modify xcat-dep.repo files to point to the correct place
echo "===> Modifying the xcat-dep.repo files to point to the correct location..."
echo "===> Making sure that the mklocalrepo.sh file contains execute permission ..."
ls -ltr ${XCATCOREDIR}/${WORKING_TARGET_DIR}/mklocalrepo.sh
if [[ ! -x "${XCATCOREDIR}/${WORKING_TARGET_DIR}/mklocalrepo.sh" ]]; then
echo "===> --- found not execute, changing +x ..."
chmod +x ${XCATCOREDIR}/${WORKING_TARGET_DIR}/mklocalrepo.sh
fi
echo "===> Checking if 'replacelinks' is in the xcat-deps, removing if there ..."
if [[ -f ${XCATCOREDIR}/${WORKING_TARGET_DIR}/replacelinks ]]; then
rm -f ${XCATCOREDIR}/${WORKING_TARGET_DIR}/replacelinks
fi
fi
if [ "$OSNAME" == "AIX" ]; then
# Build the instoss file ------------------------------------------
cat >instoss << 'EOF'
#!/bin/ksh
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
# xCAT on AIX - prerequisite install script
cd `dirname $0`
PERLVER=`perl -v|grep 'This is perl'|cut -d' ' -f 4`
if [ "$PERLVER" == "v5.8.2" ]; then
OSVER='5.3'
elif [ "$PERLVER" == "v5.8.8" ]; then
OSVER='6.1'
aixver=`lslpp -lc|grep 'bos.rte:'|head -1|cut -d: -f3`
if [[ $aixver < '6.1.9.0' ]]; then
AIX61Y=0
else
AIX61Y=1
fi
elif [ "$PERLVER" == "v5.10.1" ]; then
OSVER='7.1'
aixver=`lslpp -lc|grep 'bos.rte:'|head -1|cut -d: -f3`
if [[ $aixver < '7.1.3.0' ]]; then
AIX71L=0
else
AIX71L=1
fi
else
echo "Error: the perl version of '$PERLVER' is not one that instoss understands. Exiting..."
exit 2
fi
cd $OSVER
# Have to install rpms 1 at a time, since some may be already installed.
# The only interdependency between the dep rpms so far is that net-snmp requires bash, and
# pyodbc requires unixODBC. (The bash dependency is taken care of automatically because it
# comes earlier in the alphabet.)
# first run /usr/sbin/updtvpkg to make sure any installp software is
# registered with RPM.
echo "Running updtvpkg. This could take a few minutes."
/usr/sbin/updtvpkg
echo "updtvpkg has completed."
# unixODBC is required by pyodbc, so install it first
rpm -Uvh unixODBC*
# Now install the bulk of the rpms, one at a time, in case some are already installed
for i in `ls *.rpm|grep -v -E '^tcl-|^tk-|^expect-|^unixODBC-|^xCAT-UI-deps|^perl-DBD-DB2Lite|^net-snmp'`; do
if [ "$i" == "perl-Net-DNS-0.66-1.aix5.3.ppc.rpm" ]; then
opts="--nodeps"
else
opts=""
fi
# On 7.1L and 6.1Y we need a newer version of perl-Net_SSLeay.pm
if [[ $AIX71L -eq 1 || $AIX61Y -eq 1 ]]; then
if [[ $i == perl-Net_SSLeay.pm-1.30-* ]]; then continue; fi # skip the old rpm
else
if [[ $i == perl-Net_SSLeay.pm-1.55-* ]]; then continue; fi # skip the new rpm
fi
echo rpm -Uvh $opts $i
rpm -Uvh $opts $i
done
# Have to upgrade all of the net-snmp rpms together because they depend on each other.
# Also, they require bash, so do it after the loop, rather than before
rpm -Uvh net-snmp*
EOF
# end of instoss file content ---------------------------------------------
# Tell rpm to use gpg to sign
if ! $GREP -q '%_signature gpg' $MACROS 2>/dev/null; then
echo '%_signature gpg' >> $MACROS
fi
if ! $GREP -q '%_gpg_name' $MACROS 2>/dev/null; then
echo '%_gpg_name xCAT Automatic Signing Key' >> $MACROS
fi
# Sign the rpms that are not already signed. The "standard input reopened" warnings are normal.
echo "===> Signing RPMs..."
$XCATCOREDIR/build-utils/rpmsign.exp `find . -type f -name '*.rpm'` | grep -v -E '(already contains identical signature|was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
chmod +x instoss
# Create the repodata dirs
echo "===> Creating repodata directories..."
for i in `find -mindepth 2 -maxdepth 2 -type d `; do
if [ -n "$VERBOSEMODE" ]; then
createrepo $i # specifying checksum so the repo will work on rhel5
else
createrepo $i >/dev/null
fi
rm -f $i/repodata/repomd.xml.asc
gpg -a --detach-sign --default-key 5619700D $i/repodata/repomd.xml
if [ ! -f $i/repodata/repomd.xml.key ]; then
cp $GSA/../keys/repomd.xml.key $i/repodata
fi
done
echo "===> Making sure that the mklocalrepo.sh file contains execute permission ..."
ls -ltr ${XCATCOREDIR}/${WORKING_TARGET_DIR}/mklocalrepo.sh
if [[ ! -x "${XCATCOREDIR}/${WORKING_TARGET_DIR}/mklocalrepo.sh" ]]; then
echo "===> --- found not execute, changing +x ..."
chmod +x ${XCATCOREDIR}/${WORKING_TARGET_DIR}/mklocalrepo.sh
fi
echo "===> Checking if 'replacelinks' is in the xcat-deps, removing if there ..."
if [[ -f ${XCATCOREDIR}/${WORKING_TARGET_DIR}/replacelinks ]]; then
rm -f ${XCATCOREDIR}/${WORKING_TARGET_DIR}/replacelinks
fi
# Get the permissions and group correct
if [ "$OSNAME" == "AIX" ]; then
# AIX
SYSGRP=system
YUM=aix
FRSDIR='2.x_AIX'
else
# Linux
SYSGRP=root
YUM=yum/devel
FRSDIR='2.x_Linux'
fi
SYSGRP=root
YUM=yum/devel
FRSDIR='2.x_Linux'
chgrp -R -h $SYSGRP *
chmod -R g+w *
# Change permission on all repodata files to be readable by all
chmod a+r */*/repodata/*.gz
chmod a+r */*/repodata/*.bz2
TARBALL_WORKING_DIR="${XCATCOREDIR}/${DESTDIR}"
echo "===> Building the tarball at: ${TARBALL_WORKING_DIR} ..."
#
@ -294,14 +288,13 @@ if [ -n "$VERBOSEMODE" ]; then
fi
echo "===> Creating $DFNAME ..."
if [ "$OSNAME" == "AIX" ]; then
tar $verbosetar -cf ${DFNAME%.gz} xcat-dep
rm -f $DFNAME
gzip ${DFNAME%.gz}
else
# Linux
tar $verbosetar -jcf $DFNAME xcat-dep
fi
tar $verbosetar -jcf $DFNAME xcat-dep
chmod a+r $DFNAME
# Modify all xcat-dep.repo files to point to the correct place: $YUM
echo "===> Modifying the xcat-dep.repo files to point to the correct 'yum/devel' location..."
find ${WORKING_TARGET_DIR} -type f -name "xcat-dep.repo" -exec sed -i s#/yum/xcat-dep#/${YUM}/xcat-dep#g {} \;
if [[ ${UP} -eq 0 ]]; then
echo "Upload not being done, set UP=1 to upload to xcat.org"

View File

@ -1,15 +1,15 @@
Select or Create an osimage Definition
======================================
Before creating an image on xCAT, the distro media should be prepared ahead. That can be ISOs or DVDs.
Before creating an image on xCAT, the distro media should be prepared. That can be ISOs or DVDs.
XCAT use 'copycds' command to create an image which will be available to install nodes. ``copycds`` will copy all contents of Distribution DVDs/ISOs or Service Pack DVDs/ISOs to a destination directory, and create several relevant osimage definitions by default.
XCAT uses ``copycds`` command to create an image which will be available to install nodes. ``copycds`` will copy all contents of Distribution DVDs/ISOs or Service Pack DVDs/ISOs to a destination directory, and create several relevant osimage definitions by default.
If using an ISO, copy it to (or NFS mount it on) the management node, and then run: ::
copycds <path>/<specific-distro>.iso
**Note**: while sle15 contains installer medium and packages medium, need ``copycds`` copy all contents of DVD1 of the installer medium and DVD1 of the packages medium, for example: ::
.. note:: While sle15 contains installer medium and packages medium, need ``copycds`` copy all contents of DVD1 of the installer medium and DVD1 of the packages medium, for example: ::
copycds SLE-15-Installer-DVD-ppc64le-GM-DVD1.iso SLE-15-Packages-ppc64le-GM-DVD1.iso
@ -41,11 +41,11 @@ In these osimage definitions shown above
* **<os>-<arch>-netboot-compute** is the default osimage definition used for diskless installation
* **<os>-<arch>-install-service** is the default osimage definition used for service node deployment which shall be used in hierarchical environment
**Note**: There are more things needed for **ubuntu ppc64le** osimages:
.. note:: Additional steps are needed for **ubuntu ppc64le** osimages:
For pre-18.04 version of Ubuntu for ppc64el, the initrd.gz shipped with the ISO does not support network booting. In order to install ubuntu with xCAT, you need to follow the steps below to complete the osimage definition.
For pre-16.04.02 version of Ubuntu for ppc64el, the ``initrd.gz`` shipped with the ISO does not support network booting. In order to install Ubuntu with xCAT, you need to follow the steps to complete the osimage definition.
* Download mini.iso from
* Download ``mini.iso`` from
[ubuntu 14.04.1]: http://xcat.org/files/netboot/ubuntu14.04.1/ppc64el/mini.iso
@ -59,7 +59,7 @@ For pre-18.04 version of Ubuntu for ppc64el, the initrd.gz shipped with the ISO
[ubuntu 16.04.1]: http://xcat.org/files/netboot/ubuntu16.04.1/ppc64el/mini.iso
* Mount mini.iso ::
* Mount ``mini.iso`` ::
mkdir /tmp/iso
mount -o loop mini.iso /tmp/iso
@ -69,11 +69,9 @@ For pre-18.04 version of Ubuntu for ppc64el, the initrd.gz shipped with the ISO
mkdir -p /install/<ubuntu-version>/ppc64el/install/netboot
cp /tmp/iso/install/initrd.gz /install/<ubuntu-version>/ppc64el/install/netboot
**[Below tips maybe helpful for you]**
**[Tips 1]**
If this is the same distro version as what your management node uses, create a .repo file in /etc/yum.repos.d with contents similar to: ::
If this is the same distro version as what your management node uses, create a ``.repo`` file in ``/etc/yum.repos.d`` with contents similar to: ::
[local-<os>-<arch>]
name=xCAT local <os> <version>
@ -81,7 +79,7 @@ If this is the same distro version as what your management node uses, create a .
enabled=1
gpgcheck=0
In this way, if you need to install some additional RPMs into your MN later, you can simply install them with ``yum``. Or if you are installing a software on your MN that depends some RPMs from this disto, those RPMs will be found and installed automatically.
This way, if you need to install some additional RPMs into your MN later, you can simply install them with ``yum``. Or if you are installing a software on your MN that depends some RPMs from this disto, those RPMs will be found and installed automatically.
**[Tips 2]**
@ -91,7 +89,7 @@ You can create/modify an osimage definition easily with any existing osimage def
Except the specified attributes *<attribute>*, the attributes of *<new osimage>* will inherit the values of template osimage *<existing osimage>*.
As an example, the following command creates a new osimage "myosimage.rh7.compute.netboot" based on the existing osimage "rhels7.4-ppc64le-netboot-compute" with some customized attributes ::
As an example, the following command creates a new osimage ``myosimage.rh7.compute.netboot`` based on the existing osimage ``rhels7.4-ppc64le-netboot-compute`` with some customized attributes ::
mkdef -t osimage -o myosimage.rh7.compute.netboot --template rhels7.4-ppc64le-netboot-compute synclists=/tmp/synclist otherpkgdir=/install/custom/osimage/myosimage.rh7.compute.netboot/3rdpkgs/ otherpkglist=/install/custom/osimage/myosimage.rh7.compute.netboot/3rd.pkglist

View File

@ -3,14 +3,14 @@
Using Postscript
----------------
xCAT automatically runs a few postscripts and postbootscripts that are delivered with xCAT to set up the nodes. You can also add your own scripts to further customize the nodes. This explains the xCAT support to do this.
xCAT automatically runs a few postscripts and postbootscripts that are delivered with xCAT to set up the nodes. You can also add your own scripts to further customize the nodes.
Types of scripts
~~~~~~~~~~~~~~~~
There are two types of scripts in the postscripts table ( postscripts and postbootscripts). The types are based on when in the install process they will be executed. Run the following for more information:
There are two types of scripts in the postscripts table ( postscripts and postbootscripts). The types are based on when in the install process they will be executed. Run the following for more information::
``man postscripts``
man postscripts
* **postscripts attribute** - List of scripts that should be run on this node after diskful installation or diskless boot.
@ -20,17 +20,17 @@ There are two types of scripts in the postscripts table ( postscripts and postbo
* **[SLES]**
Postscripts will be run after the reboot but before the init.d process. For Linux diskless deployment, the postscripts will be run at the init.d time, and xCAT will automatically add the list of postscripts from the postbootscripts attribute to run after postscripts list.
Postscripts will be run after the reboot but before the ``init.d`` process. For Linux diskless deployment, the postscripts will be run at the ``init.d`` time, and xCAT will automatically add the list of postscripts from the postbootscripts attribute to run after postscripts list.
* **postbootscripts attribute** - list of postbootscripts that should be run on this Linux node at the init.d time after diskful installation reboot or diskless boot
* **xCAT**, by default, for diskful installs only runs the postbootscripts on the install and not on reboot. In xCAT a site table attribute runbootscripts is available to change this default behavior. If set to yes, then the postbootscripts will be run on install and on reboot.
* **postbootscripts attribute** - list of postbootscripts that should be run on this Linux node at the ``init.d`` time after diskful installation reboot or diskless boot
* **xCAT**, by default, for diskful installs only runs the postbootscripts on the install and not on reboot. In xCAT a ``site`` table attribute ``runbootscripts`` is available to change this default behavior. If set to ``yes``, then the postbootscripts will be run on install and on reboot.
**xCAT automatically adds the postscripts from the xcatdefaults.postscripts attribute of the table to run first on the nodes after install or diskless boot.**
.. note:: xCAT automatically adds the postscripts from the xcatdefaults.postscripts attribute of the table to run first on the nodes after install or diskless boot.
Adding your own postscripts
~~~~~~~~~~~~~~~~~~~~~~~~~~~
To add your own script, place it in /install/postscripts on the management node. Make sure it is executable and world readable. Then add it to the postscripts table for the group of nodes you want it to be run on (or the "all" group if you want it run on all nodes in the appropriate attribute, according to when you want it to run).
To add your own script, place it in ``/install/postscripts`` on the management node. Make sure it is executable and world readable. Then add it to the ``postscripts`` table for the group of nodes you want it to be run on (or the ``all`` group if you want it run on all nodes).
To check what scripts will be run on your node during installation: ::
@ -42,11 +42,9 @@ You can pass parameters to the postscripts. For example: ::
script1 p1 p2,script2,....
``p1 p2`` are the parameters to ``script1``.
p1 p2 are the parameters to script1.
Postscripts could be placed in the subdirectories in /install/postscripts on management node, and specify "subdir/postscriptname" in the postscripts table to run the postscripts in the subdirectories. This feature could be used to categorize the postscripts for different purposes. Here is an example: ::
Postscripts could be placed in the subdirectories in ``/install/postscripts`` on management node, and specify ``subdir/postscriptname`` in the ``postscripts`` table to run the postscripts in the subdirectories. This feature could be used to categorize the postscripts for different purposes. For example: ::
mkdir -p /install/postscripts/subdir1
mkdir -p /install/postscripts/subdir2
@ -55,18 +53,15 @@ Postscripts could be placed in the subdirectories in /install/postscripts on man
chdef node1 -p postscripts=subdir1/postscript1,subdir2/postscript2
updatenode node1 -P
If some of your postscripts will affect the network communication between the management node and compute node, like restarting network or configuring bond, the postscripts execution might not be able to be finished successfully because of the network connection problems, even if we put this postscript be the last postscript in the list, xCAT still may not be able to update the node status to be "booted". The recommendation is to use the Linux "at" mechanism to schedule this network-killing postscript to be run at a later time. Here is an example:
If some of your postscripts will affect the network communication between the management node and compute node, like restarting network or configuring bond, the postscripts execution might not be able to be finished successfully because of the network connection problems. Even if we put this postscript be the last postscript in the list, xCAT still may not be able to update the node status to be ``booted``. The recommendation is to use the Linux ``at`` mechanism to schedule this network-killing postscript to be run at a later time. For example:
The user needs to add a postscript to customize the nics bonding setup, the nics bonding setup will break the network between the management node and compute node, then we could use "at" to run this nic bonding postscripts after all the postscripts processes have been finished.
The user needs to add a postscript to customize the nics bonding setup, the nics bonding setup will break the network between the management node and compute node. User could use ``at`` to run this nic bonding postscripts after all the postscripts processes have been finished.
We could write a script, say, /install/postscripts/nicbondscript, the nicbondscript simply calls the confignicsbond using **"at"**: ::
Write a script, ``/install/postscripts/nicbondscript``, the ``nicbondscript`` simply calls the ``confignicsbond`` using ``at``: ::
[root@xcatmn ~]#cat /install/postscripts/nicbondscript
#!/bin/bash
at -f ./confignicsbond now + 1 minute
[root@xcatmn ~]#
Then ::
@ -77,23 +72,23 @@ Recommended Postscript design
'''''''''''''''''''''''''''''
* Postscripts that you want to run anywhere, Linux, should be written in shell. This should be available on all OS's. If only on the service nodes, you can use Perl .
* Postscripts should log errors using the following command **local4** is the default xCAT syslog class. **logger -t xCAT -p local4.info "your info message**".
* Postscripts that you want to run anywhere on Linux, should be written in shell. This should be available on all OS's. If only on the service nodes, you can use Perl .
* Postscripts should log errors using the following command (``local4`` is the default xCAT syslog class). ``logger -t xCAT -p local4.info "your info message"``.
* Postscripts should have good and error exit codes (i.e 0 and 1).
* Postscripts should be well documented. At the top of the script, the first few lines should describe the function and inputs and output. You should have comments throughout the script. This is especially important if using regx.
* Postscripts should be well documented. At the top of the script, the first few lines should describe the function and inputs and output. You should have comments throughout the script. This is especially important if using ``regx``.
PostScript/PostbootScript execution
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When your script is executed on the node, all the attributes in the site table are exported as variables for your scripts to use. You can add extra attributes for yourself. See the sample mypostscript file below.
When your script is executed on the node, all the attributes in the ``site`` table are exported as variables for your scripts to use. You can add extra attributes for yourself. See the sample ``mypostscript`` file below.
To run the postscripts, a script is built, so the above exported variables can be input. You can usually find that script in /xcatpost on the node and for example in the Linux case it is call mypostscript. A good way to debug problems is to go to the node and just run mypostscript and see errors. You can also check the syslog on the Management Node for errors.
To run the postscripts, a script is built, so the above exported variables can be input. You can usually find that script in ``/xcatpost`` on the node and in the Linux case it is call ``mypostscript``. A good way to debug problems is to go to the node and just run ``mypostscript`` and see errors. You can also check the ``syslog`` on the Management Node for errors.
When writing you postscripts, it is good to follow the example of the current postscripts and write errors to syslog and in shell. See Suggestions for writing scripts.
When writing you postscripts, it is good to follow the example of the current postscripts and write errors to ``syslog`` and in shell. See Suggestions for writing scripts.
All attributes in the site table are exported and available to the postscript/postbootscript during execution. See the mypostscript file, which is generated and executed on the nodes to run the postscripts.
All attributes in the ``site`` table are exported and available to the postscript/postbootscript during execution. See the ``mypostscript`` file, which is generated and executed on the nodes to run the postscripts.
Example of mypostscript ::
Example of ``mypostscript`` ::
#subroutine used to run postscripts
run_ps () {
@ -216,7 +211,7 @@ Example of mypostscript ::
run_ps script2
# postscripts-end-here\n
The mypostscript file is generated according to the mypostscript.tmpl file.
The ``mypostscript`` file is generated according to the ``mypostscript.tmpl`` file.
.. _Using-the-mypostscript-template-label:
@ -226,38 +221,40 @@ Using the mypostscript template
Using the mypostscript template
'''''''''''''''''''''''''''''''
xCAT provides a way for the admin to customize the information that will be provided to the postscripts/postbootscripts when they run on the node. This is done by editing the mypostscript.tmpl file. The attributes that are provided in the shipped mypostscript.tmpl file should not be removed. They are needed by the default xCAT postscripts.
xCAT provides a way for the admin to customize the information that will be provided to the postscripts/postbootscripts when they run on the node. This is done by editing the ``mypostscript.tmpl`` file. The attributes that are provided in the shipped ``mypostscript.tmpl`` file should not be removed. They are needed by the default xCAT postscripts.
The mypostscript.tmpl, is shipped in the /opt/xcat/share/xcat/mypostscript directory.
The ``mypostscript.tmpl``, is shipped in the ``/opt/xcat/share/xcat/mypostscript`` directory.
If the admin customizes the mypostscript.tmpl, they should copy the mypostscript.tmpl to /install/postscripts/mypostscript.tmpl, and then edit it. The mypostscript for each node will be named mypostscript.<nodename>. The generated mypostscript.<nodename>. will be put in the /tftpboot/mypostscripts directory.
If the admin customizes the ``mypostscript.tmpl``, they should copy the ``mypostscript.tmpl`` to ``/install/postscripts/mypostscript.tmpl``, and then edit it. The ``mypostscript`` for each node will be named ``mypostscript.<nodename>``. The generated ``mypostscript.<nodename>``. will be put in the ``/tftpboot/mypostscripts directory``.
site table precreatemypostscripts attribute
'''''''''''''''''''''''''''''''''''''''''''
If the site table precreatemypostscripts attribute is set to 1 or yes, it will instruct xCAT at nodeset and updatenode time to query the db once for all of the nodes passed into the command and create the mypostscript file for each node and put them in a directory in $TFTPDIR(for example /tftpboot). The created mypostscript.<nodename>. file in the /tftpboot/mypostscripts directory will not be regenerated unless another nodeset or updatenode command is run to that node. This should be used when the system definition has stabilized. It saves time on the updatenode or reboot by not regenerating the mypostscript file.
If the site table ``precreatemypostscripts`` attribute is set to ``1`` or ``yes``, it will instruct xCAT at ``nodeset`` and ``updatenode`` time to query the db once for all of the nodes passed into the command and create the ``mypostscript`` file for each node and put them in a directory in ``$TFTPDIR`` (for example ``/tftpboot``). The created ``mypostscript.<nodename>``. file in the ``/tftpboot/mypostscripts`` directory will not be regenerated unless another ``nodeset`` or ``updatenode`` command is run to that node. This should be used when the system definition has stabilized. It saves time on the ``updatenode`` or reboot by not regenerating the ``mypostscript`` file.
If the precreatemyposcripts attribute is yes, and a database change is made or xCAT code is upgraded, then you should run a new nodeset or updatenode to regenerate the /tftpboot/mypostscript/mypostscript.<nodename>. file to pick up the latest database setting. The default for precreatemypostscripts is no/0.
If the ``precreatemyposcripts`` attribute is ``yes``, and a database change is made or xCAT code is upgraded, then you should run a new ``nodeset`` or ``updatenode`` to regenerate the ``/tftpboot/mypostscript/mypostscript.<nodename>`` file to pick up the latest database setting. The default for ``precreatemypostscripts`` is ``no/0``.
When you run nodeset or updatenode, it will search the **/install/postscripts/mypostscript.tmpl** first. If the **/install/postscripts/mypostscript.tmpl** exists, it will use that template to generate the mypostscript for each node. Otherwise, it will use **/opt/xcat/share/xcat/mypostscript/mypostscript.tmpl**.
When you run ``nodeset`` or ``updatenode``, it will search the ``/install/postscripts/mypostscript.tmpl`` first. If the ``/install/postscripts/mypostscript.tmpl`` exists, it will use that template to generate the ``mypostscript`` for each node. Otherwise, it will use ``/opt/xcat/share/xcat/mypostscript/mypostscript.tmpl``.
Content of the template for mypostscript
''''''''''''''''''''''''''''''''''''''''
**The attributes that are defined in the shipped mypostscript.tmpl file** should not be removed. The xCAT default postscripts rely on that information to run successfully. **The following will explain the entries in the mypostscript.tmpl file**.
.. note:: The attributes that are defined in the shipped mypostscript.tmpl file should not be removed. The xCAT default postscripts rely on that information to run successfully.
The SITE_TABLE_ALL_ATTRIBS_EXPORT line in the file directs the code to export all attributes defined in the site table.
Note: the attributes are not always defined exactly as in the site table to avoid conflict with other table attributes of the same name. For example, the site table master attribute is named SITEMASTER in the generated mypostscript file. ::
The following will explain the entries in the ``mypostscript.tmpl`` file.
The ``SITE_TABLE_ALL_ATTRIBS_EXPORT`` line in the file directs the code to export all attributes defined in the ``site`` table.
The attributes are not always defined exactly as in the ``site`` table to avoid conflict with other table attributes of the same name. For example, the site table master attribute is named SITEMASTER in the generated mypostscript file. ::
#SITE_TABLE_ALL_ATTRIBS_EXPORT#
The following line exports ENABLESSHBETWEENNODES by running the internal xCAT routine (enablesshbetweennodes). ::
The following line exports ``ENABLESSHBETWEENNODES`` by running the internal xCAT routine (``enablesshbetweennodes``). ::
ENABLESSHBETWEENNODES=#Subroutine:xCAT::Template::enablesshbetweennodes:$NODE#
export ENABLESSHBETWEENNODES
**tabdump(<TABLENAME>)** is used to get all the information in the **<TABLENAME>** table ::
``tabdump(<TABLENAME>)`` is used to get all the information in the ``<TABLENAME>`` table ::
tabdump(networks)
@ -271,7 +268,7 @@ These lines get a comma separated list of the groups to which the node belongs.
GROUP=#TABLE:nodelist:$NODE:groups#
export GROUP
These lines reads the nodesres table, the given attributes (nfsserver,installnic,primarynic,xcatmaster,routenames) for the node **($NODE)**, and exports it. ::
These lines reads the ``nodesres`` table, the given attributes (``nfsserver``, ``installnic``, ``primarynic``, ``xcatmaster``, ``routenames``) for the node ``($NODE)``, and exports it. ::
NFSSERVER=#TABLE:noderes:$NODE:nfsserver#
export NFSSERVER
@ -284,11 +281,11 @@ These lines reads the nodesres table, the given attributes (nfsserver,installnic
NODEROUTENAMES=#TABLE:noderes:$NODE:routenames#
export NODEROUTENAMES
The following entry exports multiple variables from the routes table. Not always set. ::
The following entry exports multiple variables from the ``routes`` table. Not always set. ::
#ROUTES_VARS_EXPORT#
The following lines export nodetype table attributes. ::
The following lines export ``nodetype`` table attributes. ::
OSVER=#TABLE:nodetype:$NODE:os#
export OSVER
@ -304,17 +301,17 @@ The following adds the current directory to the path for the postscripts. ::
PATH=`dirname $0`:$PATH
export PATH
The following sets the NODESETSTATE by running the internal xCAT getnodesetstate script. ::
The following sets the ``NODESETSTATE`` by running the internal xCAT ``getnodesetstate`` script. ::
NODESETSTATE=#Subroutine:xCAT::Postage::getnodesetstate:$NODE#
export NODESETSTATE
The following says the postscripts are not being run as a result of updatenode.(This is changed =1, when updatenode runs). ::
The following says the postscripts are not being run as a result of ``updatenode``. (This is changed ``=1``, when ``updatenode`` runs). ::
UPDATENODE=0
export UPDATENODE
The following sets the NTYPE to compute,service or MN. ::
The following sets the ``NTYPE`` to compute, service or MN. ::
NTYPE=$NTYPE
export NTYPE
@ -324,7 +321,7 @@ The following sets the mac address. ::
MACADDRESS=#TABLE:mac:$NODE:mac#
export MACADDRESS
If vlan is setup, then the #VLAN_VARS_EXPORT# line will provide the following exports: ::
If vlan is setup, then the ``#VLAN_VARS_EXPORT#`` line will provide the following exports: ::
VMNODE='YES'
export VMNODE
@ -334,7 +331,7 @@ If vlan is setup, then the #VLAN_VARS_EXPORT# line will provide the following ex
..
#VLAN_VARS_EXPORT#
If monitoring is setup, then the #MONITORING_VARS_EXPORT# line will provide: ::
If monitoring is setup, then the ``#MONITORING_VARS_EXPORT#`` line will provide: ::
MONSERVER=11.10.34.108
export MONSERVER
@ -342,7 +339,7 @@ If monitoring is setup, then the #MONITORING_VARS_EXPORT# line will provide: ::
export MONMASTER
#MONITORING_VARS_EXPORT#
The OSIMAGE_VARS_EXPORT# line will provide, for example: ::
The ``#OSIMAGE_VARS_EXPORT#`` line will provide, for example: ::
OSPKGDIR=/install/<os>/<arch>
export OSPKGDIR
@ -352,7 +349,7 @@ The OSIMAGE_VARS_EXPORT# line will provide, for example: ::
#OSIMAGE_VARS_EXPORT#
THE NETWORK_FOR_DISKLESS_EXPORT# line will provide diskless networks information, if defined. ::
THE ``#NETWORK_FOR_DISKLESS_EXPORT#`` line will provide diskless networks information, if defined. ::
NETMASK=255.255.255.0
export NETMASK
@ -361,9 +358,9 @@ THE NETWORK_FOR_DISKLESS_EXPORT# line will provide diskless networks information
..
#NETWORK_FOR_DISKLESS_EXPORT#
Note: the **#INCLUDE_POSTSCRIPTS_LIST#** and the **#INCLUDE_POSTBOOTSCRIPTS_LIST#** sections in **/tftpboot/mypostscript(mypostbootscripts)** on the Management Node will contain all the postscripts and postbootscripts defined for the node. When running an **updatenode** command for only some of the scripts , you will see in the **/xcatpost/mypostscript** file on the node, the list has been redefined during the execution of updatenode to only run the requested scripts. For example, if you run **updatenode <nodename> -P** syslog.
Note: the ``#INCLUDE_POSTSCRIPTS_LIST#`` and the ``#INCLUDE_POSTBOOTSCRIPTS_LIST#`` sections in ``/tftpboot/mypostscript(mypostbootscripts)`` on the Management Node will contain all the postscripts and postbootscripts defined for the node. When running an ``updatenode`` command for only some of the scripts , you will see in the ``/xcatpost/mypostscript`` file on the node, the list has been redefined during the execution of ``updatenode`` to only run the requested scripts. For example, if you run ``updatenode <nodename> -P syslog``.
The **#INCLUDE_POSTSCRIPTS_LIST#** flag provides a list of postscripts defined for this **$NODE**. ::
The ``#INCLUDE_POSTSCRIPTS_LIST#`` flag provides a list of postscripts defined for this ``$NODE``. ::
#INCLUDE_POSTSCRIPTS_LIST#
@ -378,7 +375,7 @@ For example, you will see in the generated file the following stanzas: ::
syncfiles
# node-postscripts-end-here
The **#INCLUDE_POSTBOOTSCRIPTS_LIST#** provides a list of postbootscripts defined for this **$NODE**. ::
The ``#INCLUDE_POSTBOOTSCRIPTS_LIST#`` provides a list of postbootscripts defined for this ``$NODE``. ::
#INCLUDE_POSTBOOTSCRIPTS_LIST#
@ -394,7 +391,7 @@ For example, you will see in the generated file the following stanzas: ::
Kinds of variables in the template
'''''''''''''''''''''''''''''''''''
**Type 1:** For the simple variable, the syntax is as follows. The mypostscript.tmpl has several examples of this. **$NODE** is filled in by the code. **UPDATENODE** is changed to 1, when the postscripts are run by ``updatenode``. **$NTYPE** is filled in as either compute,service or MN. ::
**Type 1:** For the simple variable, the syntax is as follows. The ``mypostscript.tmpl`` has several examples of this. ``$NODE`` is filled in by the code. ``UPDATENODE`` is changed to 1, when the postscripts are run by ``updatenode``. ``$NTYPE`` is filled in as either ``compute``, ``service`` or ``MN``. ::
NODE=$NODE
export NODE
@ -403,11 +400,11 @@ Kinds of variables in the template
NTYPE=$NTYPE
export NTYPE
**Type 2:** This is the syntax to get the value of one attribute from the **<tablename>** and its key is **$NODE**. It does not support tables with two keys. Some of the tables with two keys are **(litefile,prodkey,deps,monsetting,mpa,networks)**. ::
**Type 2:** This is the syntax to get the value of one attribute from the ``<tablename>`` and its key is ``$NODE``. It does not support tables with two keys. Some of the tables with two keys are ``litefile``, ``prodkey``, ``deps``, ``monsetting``, ``mpa``, ``networks``. ::
VARNAME=#TABLE:tablename:$NODE:attribute#
For example, to get the new updatestatus attribute from the nodelist table: ::
For example, to get the new ``updatestatus`` attribute from the ``nodelist`` table: ::
UPDATESTATUS=#TABLE:nodelist:$NODE:updatestatus#
export UPDATESTATUS
@ -418,20 +415,20 @@ For example, to get the new updatestatus attribute from the nodelist table: ::
or
VARNAME=#Subroutine:modulename::subroutinename#
Examples in the mypostscript.tmpl are the following: ::
Examples in the ``mypostscript.tmpl`` are the following: ::
NODESETSTATE=#Subroutine:xCAT::Postage::getnodesetstate:$NODE#
export NODESETSTATE
ENABLESSHBETWEENNODES=#Subroutine:xCAT::Template::enablesshbetweennodes:$NODE#
export ENABLESSHBETWEENNODES
Note: Type 3 is not an open interface to add extensions to the template.
.. note:: Type 3 is not an open interface to add extensions to the template.
**Type 4:** The syntax is #FLAG#. When parsing the template, the code generates all entries defined by **#FLAG#**, if they are defined in the database. For example: To export all values of all attributes from the site table. The tag is ::
**Type 4:** The syntax is ``#FLAG#``. When parsing the template, the code generates all entries defined by ``#FLAG#``, if they are defined in the database. For example: To export all values of all attributes from the ``site`` table. The tag is ::
#SITE_TABLE_ALL_ATTRIBS_EXPORT#
For the **#SITE_TABLE_ALL_ATTRIBS_EXPORT#** flag, the related subroutine will get the attributes' values and deal with the special case. such as : the site.master should be exported as **"SITEMASTER"**. And if the noderes.xcatmaster exists, the noderes.xcatmaster should be exported as **"MASTER"**, otherwise, we also should export site.master as the **"MASTER"**.
For the ``#SITE_TABLE_ALL_ATTRIBS_EXPORT#`` flag, the related subroutine will get the attributes' values and deal with the special case. such as : the ``site.master`` should be exported as ``"SITEMASTER"``. And if the ``noderes.xcatmaster`` exists, the ``noderes.xcatmaster`` should be exported as ``"MASTER"``, otherwise, we also should export ``site.master`` as the ``"MASTER"``.
Other examples are: ::
@ -442,11 +439,9 @@ Other examples are: ::
#INCLUDE_POSTSCRIPTS_LIST# - includes the list of all postscripts for the node
#INCLUDE_POSTBOOTSCRIPTS_LIST# - includes the list of all postbootscripts for the node
Note: Type4 is not an open interface to add extensions to the templatel.
.. note:: Type4 is not an open interface to add extensions to the template.
**Type 5:** Get all the data from the specified table. The **<TABLENAME>** should not be a node table, like nodelist. This should be handles with TYPE 2 syntax to get specific attributes for the **$NODE**. tabdump would result in too much data for a nodetype table. Also the auditlog, eventlog should not be in tabdump for the same reason. site table should not be specified, it is already provided with the **#SITE_TABLE_ALL_ATTRIBS_EXPORT#** flag. It can be used to get the data from the two key tables (like switch). ::
The syntax is:
**Type 5:** Get all the data from the specified table. The ``<TABLENAME>`` should not be a node table, like ``nodelist``. This should be handles with TYPE 2 syntax to get specific attributes for the ``$NODE``. ``tabdump`` would result in too much data for a ``nodetype`` table. Also the ``auditlog``, ``eventlog`` should not be in ``tabdump`` for the same reason. ``site`` table should not be specified, it is already provided with the ``#SITE_TABLE_ALL_ATTRIBS_EXPORT#`` flag. It can be used to get the data from the two key tables (like ``switch``). The syntax is: ::
tabdump(<TABLENAME>)
@ -455,7 +450,7 @@ Edit mypostscript.tmpl
**Add new attributes into mypostscript.tmpl**
When you add new attributes into the template, you should edit the **/install/postscripts/mypostscript.tmpl** which you created by copying **/opt/xcat/share/xcat/mypostscript/mypostscript.tmpl**. Make all additions before the **# postscripts-start-here** section. xCAT will first look in **/install/postscripts/mypostscript.tmpl** for a file and then if not found will use the one in **/opt/xcat/share/xcat/mypostcript/mypostscript.tmpl**.
When you add new attributes into the template, you should edit the ``/install/postscripts/mypostscript.tmpl`` which you created by copying ``/opt/xcat/share/xcat/mypostscript/mypostscript.tmpl``. Make all additions before the ``# postscripts-start-here`` section. xCAT will first look in ``/install/postscripts/mypostscript.tmpl`` for a file and then, if not found, will use the one in ``/opt/xcat/share/xcat/mypostcript/mypostscript.tmpl``.
For example: ::
@ -467,11 +462,11 @@ For example: ::
## The following flag postscripts-end-here must not be deleted.
# postscripts-end-here
Note: If you have a hierarchical cluster, you must copy your new mypostscript.tmpl to **/install/postscripts/mypostscript.tmpl** on the service nodes, unless **/install/postscripts** directory is mounted from the MN to the service node.
.. note:: If you have a hierarchical cluster, you must copy your new ``mypostscript.tmpl`` to ``/install/postscripts/mypostscript.tmpl`` on the service nodes, unless ``/install/postscripts`` directory is mounted from the MN to the service node.
**Remove attribute from mypostscript.tmpl**
If you want to remove an attribute that you have added, you should remove all the related lines or comment them out with ##. For example, comment out the added lines. ::
If you want to remove an attribute that you have added, you should remove all the related lines or comment them out with ``##``. For example, comment out the added lines. ::
##UPDATESTATUS=#TABLE:nodelist:$NODE:updatestatus#
##export UPDATESTATUS
@ -481,32 +476,30 @@ Test the new template
There are two quick ways to test the template.
#.
If the node is up: ::
1. If the node is up ::
updatenode <nodename> -P syslog
updatenode <nodename> -P syslog
Check your generated template : ::
Check your generated ``mypostscript`` on the compute node: ::
Check the generated mypostscript file on compute node /xcatpost.
vi /xcatpost/mypostscript
#.
Another way, is set the precreate option ::
2. Set the ``precreatemypostscripts`` option ::
chdef -t site -o clustersite precreatemypostscripts=1
Then run ::
Then run ::
nodeset <nodename> ....
Check your generated template ::
Check your generated ``mypostscript`` ::
vi /tftpboot/mypostscripts/mypostscript.<nodename>
Sample /xcatpost/mypostscript
'''''''''''''''''''''''''''''''
This is an example of the generated postscript for a servicenode install. It is found in /xcatpost/mypostscript on the node. ::
This is an example of the generated postscript for a servicenode install. It is found in ``/xcatpost/mypostscript`` on the node. ::
# global value to store the running status of the postbootscripts,the value
#is non-zero if one postbootscript failed

View File

@ -1,5 +1,5 @@
Manage Virtual Machine (VM)
============================
===========================
Now the PowerKVM hypervisor "kvmhost1" is ready, this section introduces the VM management in xCAT, including examples on how to create, remove and clone VMs.
@ -37,11 +37,9 @@ After the VM object is created, several key attributes need to be specified with
chdef vm1 vmhost=kvmhost1
4. the virtual memory size, with the unit "Megabit". Specify 1GB memory to "vm1" here: ::
4. the virtual memory size (in Megabytes): ::
chdef vm1 vmmemory=1024
**Note**: For diskless node, the **vmmemory** should be at least 2048 MB, otherwise the node cannot boot up.
chdef vm1 vmmemory=2048
5. Define the virtual network card, it should be set to the bridge "br0" which has been created in the hypervisor. If no bridge is specified, no network device will be created for the VM node "vm1": ::
@ -62,27 +60,27 @@ After the VM object is created, several key attributes need to be specified with
B. Create storage on a device of hypervisor
The format is 'phy:/dev/sdb1': ::
The format is ``phy:/dev/sdb1``: ::
chdef vm1 vmstorage=phy:/dev/sdb1
C. Create storage on a directory of hypervisor
The format is 'dir:///var/lib/libvirt/images': ::
The format is ``dir:///var/lib/libvirt/images``: ::
chdef vm1 vmstorage=dir:///var/lib/libvirt/images
**Note**: The attribute **vmstorage** is only valid for diskful VM node.
.. note:: The attribute **vmstorage** is only valid for diskful VM node.
8. Define the **console** attributes for VM: ::
chdef vm1 serialport=0 serialspeed=115200
9. (optional)For monitoring and access the VM with vnc client, set **vidpassword** value: ::
9. (Optional) For monitoring and access the VM with vnc client, set **vidpassword** value: ::
chtab node=vm1 vm.vidpassword=abc123
10. (optional)For assigning PCI devices to the VM, set **othersettings** value: ::
10. (Optional) For assigning PCI devices to the VM, set **othersettings** value: ::
chtab node=vm1 vm.othersettings="devpassthrough:0000:01:00.2"
@ -133,7 +131,7 @@ When "vm1" is created successfully, a VM hard disk file with a name like "vm1.sd
lsdef vm1 -i mac
Now a VM "vm1" is created, it can be provisioned like any other nodes in xCAT. The VM node can be powered on by: ::
Once a VM "vm1" is created, it can be provisioned like any other node in xCAT. The VM node can be powered on by: ::
rpower vm1 on
@ -164,9 +162,9 @@ When the VM has been created and powered on, choose one of the following methods
makegocons vm1
rcons vm1
* Connect to virtual machine through vnc console
* Connect to virtual machine through ``vnc`` console
In order to connect the virtual machine's vnc server, a new set of credentials need to be generated by running: ::
In order to connect the virtual machine's ``vnc`` server, a new set of credentials need to be generated by running: ::
xcatclient getrvidparms vm1
vm1: method: kvm
@ -176,10 +174,10 @@ When the VM has been created and powered on, choose one of the following methods
vm1: server: kvmhost1
vm1: vidport: 5900
**Note**: Now just pick a favorite vnc client to connect the hypervisor, with the password generated by ``getrvidparms``. If the vnc client complains "the password is not valid", the reason might be that the hypervisor and headnode clocks are out of sync! Please try to sync them by running ``ntpdate <ntp server>`` on both the hypervisor and the headnode.
.. note:: Now just pick a favorite ``vnc`` client to connect the hypervisor, with the password generated by ``getrvidparms``. If the ``vnc`` client complains "the password is not valid", the reason might be that the hypervisor and headnode clocks are out of sync! Please try to sync them by running ``ntpdate <ntp server>`` on both the hypervisor and the headnode.
* Use wvid on management node
* Use ``wvid`` on management node
Make sure **firewalld** service is stopped, disable it if not: ::
@ -214,7 +212,7 @@ Clone the virtual machine
**Clone** is an operation that creating a VM from an existed one by inheriting most of its attributes and data.
The general step of **clone** a VM is like this: first creating a **VM master** , then creating a VM with the newly created **VM master** in **attaching** or **detaching** mode.
Steps to **clone** a VM: first create a **VM master** , then create a VM with the newly created **VM master** in **attaching** or **detaching** mode.
**In attaching mode**

View File

@ -14,7 +14,6 @@ Execute ``mkdef`` command to define the node: ::
The manually defined node will be like this::
# lsdef cn1
Object name: cn1
bmc=50.0.101.1
bmcpassword=admin
@ -33,28 +32,26 @@ The manually defined node will be like this::
``mkdef --template`` can be used to create node definitions easily from the typical node definition templates or existing node definitions, some examples:
* creating node definition "cn2" with an existing node definition "cn1" ::
* creating node definition "cn2" from an existing node definition "cn1" ::
# mkdef -t node -o cn2 --template cn1 mac=66:55:44:33:22:11 ip=172.12.139.2 bmc=172.11.139.2
1 object definitions have been created or modified.
mkdef -t node -o cn2 --template cn1 mac=66:55:44:33:22:11 ip=172.12.139.2 bmc=172.11.139.2
except the attributes specified(``mac``, ``ip`` and ``bmc`` attribute here), other attibutes of the newly created node "cn2" inherit the values of template node "cn1"
except for the attributes specified (``mac``, ``ip`` and ``bmc``), other attributes of the newly created node "cn2" inherit the values of template node "cn1"
* creating a node definition "cn2" with the template "ppc64le-openbmc-template"(openbmc controlled ppc64le node) shipped by xCAT ::
* creating a node definition "cn2" with the template "ppc64le-openbmc-template" (openbmc controlled ppc64le node) shipped by xCAT ::
# mkdef -t node -o cn2 --template ppc64le-openbmc-template mac=66:55:44:33:22:11 ip=172.12.139.2 bmc=172.11.139.2 bmcpassword=USERID bmcusername=PASSW0RD
1 object definitions have been created or modified.
mkdef -t node -o cn2 --template ppc64le-openbmc-template mac=66:55:44:33:22:11 ip=172.12.139.2 bmc=172.11.139.2 bmcusername=root bmcpassword=0penBmc
the unspecified attributes of newly created node "cn2" will be assigned with the default values in the template
to list all the node definition templates available in xCAT, run ::
# lsdef -t node --template
lsdef -t node --template
to display the full definition of template "ppc64le-openbmc-template", run ::
# lsdef -t node --template ppc64le-openbmc-template
lsdef -t node --template ppc64le-openbmc-template
the mandatory attributes, which must be specified while creating definitions with templates, are denoted with the value ``MANDATORY:<attribute description>`` in template definition.
the mandatory attributes, which must be specified while creating definitions with templates, are denoted with the value ``MANDATORY:<attribute description>`` in template definition.
the optional attributes, which can be specified optionally, are denoted with the value ``OPTIONAL:<attribute description>`` in template definition

View File

@ -5,7 +5,7 @@ Management Node info::
MN Hostname: xcat1
MN NIC info for Management Network(Host network): eth1, 10.0.1.1/16
MN NIC info for Service Network(FSP/BMC nework): eth2, 50.0.1.1/16
MN NIC info for Service Network(FSP/BMC network): eth2, 50.0.1.1/16
Dynamic IP range for Hosts: 10.0.100.1-10.0.100.100
Dynamic IP range for FSP/BMC: 50.0.100.1-50.0.100.100

View File

@ -0,0 +1,137 @@
########
addkit.1
########
.. highlight:: perl
****
NAME
****
\ **addkit**\ - Adds product software Kits to an xCAT cluster environmnet.
********
SYNOPSIS
********
\ **addkit**\ [\ **-? | -h | -**\ **-help**\ ] [\ **-v | -**\ **-version**\ ]
\ **addkit**\ [\ **-i | -**\ **-inspection**\ ] \ *kitlist*\
\ **addkit**\ [\ **-V | -**\ **-verbose**\ ] [\ **-p | -**\ **-path**\ \ *path*\ ] \ *kitlist*\
***********
DESCRIPTION
***********
The \ **addkit**\ command installs a kit on the xCAT management node from a kit tarfile or directory.
It creates xCAT database definitions for the kit, kitrepo, and kitcomponent.
\ **Note:**\ xCAT Kit support is ONLY available for Linux operating systems.
*******
OPTIONS
*******
\ **-h|-**\ **-help**\
Display usage message.
\ **-V|-**\ **-verbose**\
Verbose mode.
\ **-v|-**\ **-version**\
Command version.
\ **-i|-**\ **-inspection**\
Show the summary of the given kits
\ **-p|-**\ **-path**\ \ *path*\
The destination directory to which the contents of the kit tarfiles and/or kit deploy directories will be copied. When this option is not specified, the default destination directory will be formed from the installdir site attribute with ./kits subdirectory.
\ *kitlist*\
A comma delimited list of kit_tarball_files or kit_deploy_directories to be added to the xCAT environment. Each entry can be an absolute or relative path. See xCAT documentation for more information on building kits.
************
RETURN VALUE
************
0 The command completed successfully.
1 An error has occurred.
********
EXAMPLES
********
1. To add kits from tarball files:
.. code-block:: perl
addkit kit-test1.tar.bz2,kit-test2.tar.bz2
2. To add kits from directories:
.. code-block:: perl
addkit kit-test1,kit-test2
3. To add kits from tarball \ *kit-test1.tar.bz2*\ to target path \ */install/test*\ :
.. code-block:: perl
addkit -p /install/test kit-test1.tar.bz2
4. To see general information about kit \ *kit-test1.tar.bz2*\ without adding the kit to xCAT:
.. code-block:: perl
addkit -i kit-test1.tar.bz2
********
SEE ALSO
********
lskit(1)|lskit.1, rmkit(1)|rmkit.1, addkitcomp(1)|addkitcomp.1, rmkitcomp(1)|rmkitcomp.1, chkkitcomp(1)|chkkitcomp.1

View File

@ -0,0 +1,154 @@
############
addkitcomp.1
############
.. highlight:: perl
****
NAME
****
\ **addkitcomp**\ - Assign Kit components to an xCAT osimage.
********
SYNOPSIS
********
\ **addkitcomp**\ [\ **-? | -h | -**\ **-help**\ ] [\ **-v | -**\ **-version**\ ]
\ **addkitcomp**\ [\ **-V | -**\ **-verbose**\ ] [\ **-a | -**\ **-adddeps**\ ] [\ **-f | -**\ **-force**\ ] [\ **-n | -**\ **-noupgrade**\ ] [\ **-**\ **-noscripts**\ ] \ **-i**\ \ *osimage*\ \ *kitcompname_list*\
***********
DESCRIPTION
***********
The \ **addkitcomp**\ command will assign kit components to an xCAT osimage. The kit component meta rpm, package rpm and deploy parameters will be added to osimage's otherpkg.pkglist and postbootscripts will be added to osimages's postbootscripts attribute.
\ **Note:**\ xCAT Kit support is ONLY available for Linux operating systems.
*******
OPTIONS
*******
\ **-a|-**\ **-adddeps**\
Assign kitcomponent dependencies to the osimage.
\ **-h|-**\ **-help**\
Display usage message.
\ **-V|-**\ **-verbose**\
Verbose mode.
\ **-v|-**\ **-version**\
Command version.
\ **-f|-**\ **-force**\
Add kit component to osimage even if there is a mismatch in OS, version, arch, serverrole, or kitcompdeps
\ **-i**\ \ *osimage*\
The osimage name that the kit component is assigning to.
\ **-n|-**\ **-noupgrade**\
1. Allow multiple versions of kitcomponent to be installed into the osimage, instead of kitcomponent upgrade.
2. Kit components added by addkitcomp -n will be installed separately behind all other ones which have been added.
\ **-**\ **-noscripts**\
Do not add kitcomponent's postbootscripts to osimage
\ *kitcompname_list*\
A comma-delimited list of valid full kit component names or kit component basenames that are to be added to the osimage.
************
RETURN VALUE
************
0 The command completed successfully.
1 An error has occurred.
********
EXAMPLES
********
1. To add a single kit component to osimage "rhels6.2-ppc64-netboot-compute":
.. code-block:: perl
addkitcomp -i rhels6.2-ppc64-netboot-compute comp-test1-1.0-1-rhels-6.2-ppc64
2. To add a kit component to osimage with dependencies, use the -a (addeps) option:
.. code-block:: perl
addkitcomp -a -i rhels6.2-ppc64-netboot-compute comp-test2-1.0-1-rhels-6.2-ppc64
3. To add a kit component to osimage with incompatable osarch, osversion or ostype, use the -f (force) option:
.. code-block:: perl
addkitcomp -f -i rhels6.2-ppc64-netboot-compute comp-test1-1.0-1-rhels-6.2-ppc64
4. To add a new version of kit component to osimage without upgrade, use the -n (noupgrade) option:
.. code-block:: perl
addkitcomp -n -i rhels6.2-ppc64-netboot-compute comp-test2-1.0-1-rhels-6.2-ppc64
********
SEE ALSO
********
lskit(1)|lskit.1, addkit(1)|addkit.1, rmkit(1)|rmkit.1, rmkitcomp(1)|rmkitcomp.1, chkkitcomp(1)|chkkitcomp.1

View File

@ -0,0 +1,372 @@
##########
buildkit.1
##########
.. highlight:: perl
****
NAME
****
\ **buildkit**\ - Used to build a software product Kit which may be used to install software in an xCAT cluster.
********
SYNOPSIS
********
\ **buildkit**\ [\ **-? | -h | -**\ **-help**\ ] [\ **-v | -**\ **-version**\ ]
To build a new Kit
\ **buildkit**\ [\ **-V | -**\ **-verbose]**\ \ *subcommand*\ [\ *kit_name*\ ] [\ *repo_name*\ | \ **all**\ ] [\ **-l | -**\ **-kitloc**\ \ *kit_location*\ ]
To add packages to an existing Kit.
\ **buildkit**\ [\ **-V | -**\ **-verbose**\ ] \ *addpkgs*\ \ *kit_tarfile*\ [\ **-p | -**\ **-pkgdir**\ \ *package_directory_list*\ ] [\ **-k | -**\ **-kitversion**\ \ *version*\ ] [\ **-r | -**\ **-kitrelease**\ \ *release*\ ] [\ **-l | -**\ **-kitloc**\ \ *kit_location*\ ]
***********
DESCRIPTION
***********
The \ **buildkit**\ command provides a collection of utilities that may be used to package a software product as a Kit tarfile that can be used to install software on the nodes of an xCAT cluster. A Kit contains the product software packages, configuration and control information, and install and customization scripts.
Note: The xCAT support for Kits is only available for Linux operating systems.
You will need to run the \ **buildkit**\ command several times with different subcommands to step through the process of building a kit:
By default the \ **buildkit**\ subcommands will operate in the current working directory, (ie. look for files, create directories etc.). You could specify a different location by using the "\ **-l | -**\ **-kitloc**\ \ *kit_location*\ " option.
The \ *kit_location*\ is the full path name of the directory that contains the kit files. You would use the same location value for all the buildkit subcommands.
For example, to create a new kit named "prodkit" in the directory /home/mykits/ \ *either*\ run:
1.
If no location is provided then the command will create a subdirectory called "prodkit" in the current directory "/home/mykits" and the new kit files will be created there.
\ **cd /home/mykits**\
\ **buildkit create prodkit**\
or
2.
If a location is provided then the Kit files will be created there. Note that the Kit name does not necessarily have to be the directory name where the kit files are located.
\ **buidkit create prodkit -l /home/mykits/prodkit**\
In both cases the /home/mykits/prodkit directory is created and the inital files for the kit are created in that directory.
The following example illustrates the basic process for building a new Kit. In this example we are building a Kit named "mytstkit".
1.
Change to the directory where you wish to create the Kit.
2.
Create a template directory for your kit:
\ **buildkit create mytstkit**\
3.
Change directory to the new "mytstkit" subdirectory that was just created.
\ **cd mytstkit**\
4.
Edit the buildkit configuration file for your kit:
\ **vi buildkit.conf**\
(See xCAT Kit documentation for details.)
5.
Create all required files, scripts, plugins, and packages for your kit.
6.
Validate your kit build configuration and fix any errors that are reported:
\ **buildkit chkconfig**\
7.
List the repos defined in your buildkit configuration file:
\ **buildkit listrepo**\
8.
For each repo name listed, build the repository. Note that if you need to build repositories for OS distributions, versions, or architectures that do not match the current system, you may need to copy your kit template directory to an appropriate server to build that repository, and then copy the results back to your main build server. For example, to build a repo named "rhels6.3" you would run the following command.
\ **buildkit buildrepo rhels6.3**\
or, you can build all of the repos at one time if there are no OS or architecture dependencies for kitcomponent package builds or kitpackage builds:
\ **buildkit buildrepo all**\
9.
Build the kit tar file:
\ **buildkit buildtar**\
*******
OPTIONS
*******
\ **-h |-**\ **-help**\
Display usage message.
\ **-k|-**\ **-kitversion**\ \ *version*\
Product version.
\ **-l|-**\ **-kitloc**\ \ *kit_location*\
The directory location of the Kit files.
\ **-p|-**\ **-pkgdir**\ \ *package_directory_list*\
A comma-separated list of directory locations for product RPMs.
\ **-r|-**\ **-kitrelease**\ \ *release*\
Product release.
\ **-V |-**\ **-verbose**\
Verbose mode.
\ **-v|-**\ **-version**\
Command version.
************
SUB-COMMANDS
************
\ **create**\ \ *kit_basename*\
Creates a new kit build directory structure for kit \ *kit_basename*\ using the location specified on the command line or the current directory. The sample kit files from /opt/xcat/share/xcat/kits/kit_template are copied over, and the buildkit.conf file is modified for the specified \ *kit_basename*\ .
\ **chkconfig**\
Reads the buildkit.conf file, verifies that the file syntax is correct and that all specified files exist.
\ **listrepo**\
Reads the buildkit.conf file, lists all Kit package repositories listed in the file, and reports the build status for each repository.
\ **buildrepo**\ {\ *repo_name*\ | \ **all**\ }
Reads the buildkit.conf file, and builds the specified Kit package repository. The built packages are placed in the directory <kit_location>/build/kit_repodir/\ *repo_name*\ . If \ **all**\ is specified, all kit repositories are built.
\ **cleanrepo**\ {\ *repo_name*\ | \ **all**\ }
Reads the buildkit.conf file, and deletes all the package files and package meta data files from the <kit_location>/build/kit_repodir/\ *repo_name*\ directory. If \ **all**\ is specified, all kit repository files are deleted.
\ **buildtar**\
Reads the buildkit.conf file, validates that all kit repositories have been built, and builds the Kit tar file <kit_location>/\ *kitname*\ .tar.bz2.
\ **cleantar**\
Reads the <kit_location>/buildkit.conf file and \ *deletes*\ the following:
- Kit tar files matching <kit_location>/\ *kit_name\\*.tar.bz2*\ .
- <kit_location>/build/\ *kit_name*\
- <kit_location>/rpmbuild
- <kit_location>/tmp
- <kit_location>/debbuild
Caution: Make sure you back up any tar files you would like to keep before running this subcommand.
\ **cleanall**\
Equivalent to running \ **buildkit cleanrepo all**\ and \ **buildkit cleantar**\ .
\ **addpkgs**\
\ *kit_tarfile*\ {\ **-p**\ | \ **-**\ **-pkgdir**\ \ *package_directory_list*\ } [\ **-k**\ | \ **-**\ **-kitversion**\ \ *version*\ ] [\ **-r**\ | \ **-**\ **-kitrelease**\ \ *release*\ ]
Add product package rpms to a previously built kit tar file. This is used for partial product kits that are built and shipped separately from the product packages, and are identified with a \ *kit_tarfile*\ name of \ *kitname*\ .\ **NEED_PRODUCT_PKGS.tar.bz2**\ . Optionally, change the kit release and version values when building the new kit tarfile. If kitcomponent version and/or release values are defaulted to the kit values, those will also be changed and new kitcomponent rpms will be built. If kit or kitcomponent scripts, plugins, or other files specify name, release, or version substitution strings, these will all be replaced with the new values when built into the new complete kit tarfile \ *kit_location*\ /\ *new_kitname*\ .\ **tar.bz2**\ .
************
RETURN VALUE
************
<B>0
The command completed successfully.
<B>1
An error has occurred.
********
EXAMPLES
********
1.
To create the sample kit shipped with the xCAT-buildkit rpm on a RHELS 6.3 server and naming it \ **mykit**\ , run the following commands:
\ **cd /home/myuserid/kits**\
\ **buildkit create mykit**\
\ **cd mykit**\
\ **vi buildkit.conf**\
\ **buildkit chkconfig**\
\ **buildkit listrepo**\
\ **buildkit buildrepo all**\
\ **buildkit buildtar**\
2.
To clean up a kit repository directory after build failures on a RHELS 6.3 server to prepare for a new kit repository build, run:
\ **buildkit cleanrepo rhels6.3**\
3.
To clean up all kit build files, including a previously built kit tar file, run
\ **buildkit cleanall**\
4.
To create a kit named "tstkit" located in /home/foobar/tstkit instead of the current working directory.
\ **buildkit create tstkit -l /home/foobar/tstkit**\
*****
FILES
*****
/opt/xcat/bin/buildkit
/opt/xcat/share/xcat/kits/kit_template
/opt/xcat/share/xcat/kits/kitcomponent.spec.template
<kit location>/buildkit.conf
<kit location>/build/\ *kitname*\ /kit.conf
<kit location>/\ *kitname*\ .tar.bz2
********
SEE ALSO
********
addkit(1), lskit(1), rmkit(1), addkitcomp(1), rmkitcomp(1), chkkitcomp(1)

View File

@ -0,0 +1,106 @@
############
chkkitcomp.1
############
.. highlight:: perl
****
NAME
****
\ **chkkitcomp**\ - Check if Kit components are compatible with an xCAT osimage.
********
SYNOPSIS
********
\ **chkkitcomp**\ [\ **-? | -h | -**\ **-help**\ ] [\ **-v | -**\ **-version**\ ]
\ **chkkitcomp**\ [\ **-V | -**\ **-verbose**\ ] \ **-i**\ \ *osimage*\ \ *kitcompname_list*\
***********
DESCRIPTION
***********
The \ **chkkitcomp**\ command will check if the kit components are compatible with the xCAT osimage.
This command will ignore the current osimage.kitcomponents setting and check if the kitcompname_list is compatible with the osimage and kit component dependencies.
\ **Note:**\ xCAT Kit support is ONLY available for Linux operating systems.
*******
OPTIONS
*******
\ **-h|-**\ **-help**\
Display usage message.
\ **-V|-**\ **-verbose**\
Verbose mode.
\ **-v|-**\ **-version**\
Command version.
\ **-i**\ \ *osimage*\
The name of the osimage to check against.
\ *kitcompname_list*\
A comma-delimited list of valid full kit component names or kit component basenames that are to be checked against the osimage.
************
RETURN VALUE
************
0 The command completed successfully.
1 An error has occurred.
********
EXAMPLES
********
1. To check if a kit component, \ *comp-test1-1.0-1-rhels-6.2-ppc64*\ can be added to osimage \ *rhels6.2-ppc64-netboot-compute*\ :
.. code-block:: perl
chkkitcomp -i rhels6.2-ppc64-netboot-compute comp-test1-1.0-1-rhels-6.2-ppc64
********
SEE ALSO
********
lskit(1)|lskit.1, addkit(1)|addkit.1, rmkit(1)|rmkit.1, addkitcomp(1)|addkitcomp.1, rmkitcomp(1)|rmkitcomp.1

View File

@ -0,0 +1,250 @@
#######
lskit.1
#######
.. highlight:: perl
****
NAME
****
\ **lskit**\ - Lists information for one or more Kits.
********
SYNOPSIS
********
\ **lskit**\ [\ **-V**\ | \ **-**\ **-verbose**\ ] [\ **-F**\ | \ **-**\ **-framework**\ \ *kitattr_names*\ ] [\ **-x**\ | \ **-**\ **-xml**\ | \ **-**\ **-XML**\ ] [\ **-K**\ | \ **-**\ **-kitattr**\ \ *kitattr_names*\ ] [\ **-R**\ | \ **-**\ **-repoattr**\ \ *repoattr_names*\ ] [\ **-C**\ | \ **-**\ **-compattr**\ \ *compattr_names*\ ] [\ *kit_names*\ ]
\ **lskit**\ [\ **-?**\ | \ **-h**\ | \ **-**\ **-help**\ | \ **-v**\ | \ **-**\ **-version**\ ]
\ **lskit**\ [\ **-F**\ | \ **-**\ **-framework**\ \ *kit_path_name*\ ]
***********
DESCRIPTION
***********
The \ **lskit**\ command is used to list information for one or more kits. A kit is a special kind of package that is used to install a software product on one or more nodes in an xCAT cluster.
Note: The xCAT support for Kits is only available for Linux operating systems.
The \ **lskit**\ command outputs the following info for each kit: the kit's basic info, the kit's repositories, and the kit's components. The command outputs the info in two formats: human-readable format (default), and XML format. Use the -x option to view the info in XML format.
Input to the command can specify any number or combination of the input options.
*******
OPTIONS
*******
\ **-F|-**\ **-framework**\ \ *kit_path_name*\
Use this option to display the framework values of the specified Kit tarfile. This information is retreived directly from the tarfile and can be done before the Kit has been defined in the xCAT database. This option cannot be combined with other options.
\ **-K|-**\ **-kitattr**\ \ *kitattr_names*\
Where \ *kitattr_names*\ is a comma-delimited list of kit attribute names. The names correspond to attribute names in the \ **kit**\ table. The \ **lskit**\ command will only display the specified kit attributes.
\ **-R|-**\ **-repoattr**\ \ *repoattr_names*\
Where \ *repoattr_names*\ is a comma-delimited list of kit repository attribute names. The names correspond to attribute names in the \ **kitrepo**\ table. The \ **lskit**\ command will only display the specified kit repository attributes.
\ **-C|-**\ **-compattr**\ \ *compattr_names*\
where \ *compattr_names*\ is a comma-delimited list of kit component attribute names. The names correspond to attribute names in the \ **kitcomponent**\ table. The \ **lskit**\ command will only display the specified kit component attributes.
\ *kit_names*\
is a comma-delimited list of kit names. The \ **lskit**\ command will only display the kits matching these names.
\ **-x|-**\ **-xml|-**\ **-XML**\
Need XCATXMLTRACE=1 env when using -x|--xml|--XML, for example: XCATXMLTRACE=1 lskit -x testkit-1.0.0
Return the output with XML tags. The data is returned as:
.. code-block:: perl
<data>
<kitinfo>
...
</kitinfo>
</data>
...
<data>
<kitinfo>
...
</kitinfo>
</data>
Each <kitinfo> tag contains info for one kit. The info inside <kitinfo> is structured as follows:
.. code-block:: perl
The <kit> sub-tag contains the kit's basic info.
The <kitrepo> sub-tags store info about the kit's repositories.
The <kitcomponent> sub-tags store info about the kit's components.
The data inside <kitinfo> is returned as:
.. code-block:: perl
<kitinfo>
<kit>
...
</kit>
<kitrepo>
...
</kitrepo>
...
<kitcomponent>
...
</kitcomponent>
...
</kitinfo>
\ **-V|-**\ **-verbose**\
Display additional progress and error messages.
\ **-v|-**\ **-version**\
Command Version.
\ **-?|-h|-**\ **-help**\
Display usage message.
************
RETURN VALUE
************
0 The command completed successfully.
1 An error has occurred.
********
EXAMPLES
********
1. To list all kits, enter:
.. code-block:: perl
lskit
2. To list the kit "kit-test1-1.0-Linux", enter:
.. code-block:: perl
lskit kit-test1-1.0-Linux
3. To list the kit "kit-test1-1.0-Linux" for selected attributes, enter:
.. code-block:: perl
lskit -K basename,description -R kitreponame -C kitcompname kit-test1-1.0-Linux
4. To list the framework value of a Kit tarfile.
.. code-block:: perl
lskit -F /myhome/mykits/pperte-1.3.0.2-0-x86_64.tar.bz2
Output is similar to:
.. code-block:: perl
Extracting the kit.conf file from /myhome/mykits/pperte-1.3.0.2-0-x86_64.tar.bz2. Please wait.
kitframework=2
compatible_kitframeworks=0,1,2
5. To list kit "testkit-1.0-1" with XML tags, enter:
.. code-block:: perl
XCATXMLTRACE=1 lskit -x testkit-1.0-1
*****
FILES
*****
/opt/xcat/bin/lskit
********
SEE ALSO
********
lskitcomp(1)|lskitcomp.1, lskitdeployparam(1)|lskitdeployparam.1, addkit(1)|addkit.1, rmkit(1)|rmkit.1, addkitcomp(1)|addkitcomp.1, rmkitcomp(1)|rmkitcomp.1

View File

@ -0,0 +1,247 @@
###########
lskitcomp.1
###########
.. highlight:: perl
****
NAME
****
\ **lskitcomp**\ - Used to list information for one or more kit components.
********
SYNOPSIS
********
\ **lskitcomp**\ [\ **-V**\ | \ **-**\ **-verbose**\ ] [\ **-x**\ | \ **-**\ **-xml**\ | \ **-**\ **-XML**\ ] [\ **-C**\ | \ **-**\ **-compattr**\ \ *compattr_names*\ ] [\ **-O**\ | \ **-**\ **-osdistro**\ \ *os_distro*\ ] [\ **-S**\ | \ **-**\ **-serverrole**\ \ *server_role*\ ] [\ *kitcomp_names*\ ]
\ **lskitcomp**\ [\ **-?**\ | \ **-h**\ | \ **-**\ **-help**\ | \ **-v**\ | \ **-**\ **-version**\ ]
***********
DESCRIPTION
***********
The \ **lskitcomp**\ command is used to list information for one or more kit components. A kit is made up of one or more kit components. Each kit component is a meta package used to install a software product component on one or more nodes in an xCAT cluster.
The \ **lskitcomp**\ command outputs the kit component info in two formats: human-readable format (default), and XML format. Use the -x option to view the info in XML format.
Input to the command can specify any number or combination of the input options.
Note: The xCAT support for Kits is only available for Linux operating systems.
*******
OPTIONS
*******
\ **-C|-**\ **-compattr**\ \ *compattr_names*\
where \ *compattr_names*\ is a comma-delimited list of kit component attribute names. The names correspond to attribute names in the \ **kitcomponent**\ table. The \ **lskitcomp**\ command will only display the specified kit component attributes.
\ **-O|-**\ **-osdistro**\ \ *os_distro*\
where \ *os_distro*\ is the name of an osdistro in \ **osdistro**\ table. The \ **lskitcomp**\ command will only display the kit components matching the specified osdistro.
\ **-S|-**\ **-serverrole**\ \ *server_role*\
where \ *server_role*\ is the name of a server role. The typical server roles are: mgtnode, servicenode, computenode, loginnode, storagennode. The \ **lskitcomp**\ command will only display the kit components matching the specified server role.
\ *kitcomp_names*\
is a comma-delimited list of kit component names. The \ **lskitcomp**\ command will only display the kit components matching the specified names.
\ **-x|-**\ **-xml|-**\ **-XML**\
Need XCATXMLTRACE=1 env when using -x|--xml|--XML.
Return the output with XML tags. The data is returned as:
.. code-block:: perl
<data>
<kitinfo>
...
</kitinfo>
</data>
...
<data>
<kitinfo>
...
</kitinfo>
</data>
Each <kitinfo> tag contains info for a group of kit components belonging to the same kit. The info inside <kitinfo> is structured as follows:
.. code-block:: perl
The <kit> sub-tag contains the kit's name.
The <kitcomponent> sub-tags store info about the kit's components.
The data inside <kitinfo> is returned as:
.. code-block:: perl
<kitinfo>
<kit>
...
</kit>
<kitcomponent>
...
</kitcomponent>
...
</kitinfo>
\ **-V|-**\ **-verbose**\
Display additional progress and error messages.
\ **-v|-**\ **-version**\
Command Version.
\ **-?|-h|-**\ **-help**\
Display usage message.
************
RETURN VALUE
************
0 The command completed successfully.
1 An error has occurred.
********
EXAMPLES
********
1.
To list all kit components, enter:
.. code-block:: perl
lskitcomp
2.
To list the kit component "comp-server-1.0-1-rhels-6-x86_64", enter:
.. code-block:: perl
lskitcomp comp-server-1.0-1-rhels-6-x86_64
3.
To list the kit component "comp-server-1.0-1-rhels-6-x86_64" for selected kit component attributes, enter:
.. code-block:: perl
lskitcomp -C kitcompname,desc comp-server-1.0-1-rhels-6-x86_64
4.
To list kit components compatible with "rhels-6.2-x86_64" osdistro, enter:
.. code-block:: perl
lskitcomp -O rhels-6.2-x86_64
5.
To list kit components compatible with "rhels-6.2-x86_64" osdistro and "computenode" server role, enter:
.. code-block:: perl
lskitcomp -O rhels-6.2-x86_64 -S computenode
6.
To list the kit component "testkit-compute-1.0-1-ubuntu-14.04-ppc64el" with XML tags, enter:
.. code-block:: perl
XCATXMLTRACE=1 lskitcomp -x testkit-compute-1.0-1-ubuntu-14.04-ppc64el
*****
FILES
*****
/opt/xcat/bin/lskitcomp
********
SEE ALSO
********
lskit(1)|lskit.1, lskitdeployparam(1)|lskitdeployparam.1, addkit(1)|addkit.1, rmkit(1)|rmkit.1, addkitcomp(1)|addkitcomp.1, rmkitcomp(1)|rmkitcomp.1

View File

@ -0,0 +1,162 @@
##################
lskitdeployparam.1
##################
.. highlight:: perl
****
NAME
****
\ **lskitdeployparam**\ - Lists the deployment parameters for one or more Kits or Kit components
********
SYNOPSIS
********
\ **lskitdeployparam**\ [\ **-V**\ | \ **-**\ **-verbose**\ ] [\ **-x**\ | \ **-**\ **-xml**\ | \ **-**\ **-XML**\ ] [\ **-k**\ | \ **-**\ **-kitname**\ \ *kit_names*\ ] [\ **-c**\ | \ **-**\ **-compname**\ \ *comp_names*\ ]
\ **lskitdeployparam**\ [\ **-?**\ | \ **-h**\ | \ **-**\ **-help**\ | \ **-v**\ | \ **-**\ **-version**\ ]
***********
DESCRIPTION
***********
The \ **lskitdeployparam**\ command is used to list the kit deployment parameters for one or more kits, or one or more kit components. Kit deployment parameters are used to customize the installation or upgrade of kit components.
The \ **lskitdeployparam**\ command outputs the kit component information in two formats: human-readable format (default), and XML format. Use the -x option to view the information in XML format.
Input to the command can specify any combination of the input options.
Note: The xCAT support for Kits is only available for Linux operating systems.
*******
OPTIONS
*******
\ **-k|-**\ **-kitname**\ \ *kit_names*\
Where \ *kit_names*\ is a comma-delimited list of kit names. The \ **lskitdeployparam**\ command will only display the deployment parameters for the kits with the matching names.
\ **-c|-**\ **-compname**\ \ *comp_names*\
Where \ *comp_names*\ is a comma-delimited list of kit component names. The \ **lskitdeployparam**\ command will only display the deployment parameters for the kit components with the matching names.
\ **-x|-**\ **-xml|-**\ **-XML**\
Return the output with XML tags. The data is returned as:
.. code-block:: perl
<data>
<kitdeployparam>
<name>KIT_KIT1_PARAM1</name>
<value>value11</value>
</kitdeployparam>
</data>
<data>
<kitdeployparam>
<name>KIT_KIT1_PARAM2</name>
<value>value12</value>
</kitdeployparam>
</data>
...
\ **-V|-**\ **-verbose**\
Display additional progress and error messages.
\ **-v|-**\ **-version**\
Command Version.
\ **-?|-h|-**\ **-help**\
Display usage message.
************
RETURN VALUE
************
0 The command completed successfully.
1 An error has occurred.
********
EXAMPLES
********
1.
To list kit deployment parameters for kit "kit-test1-1.0-Linux", enter:
.. code-block:: perl
lskitdeployparam -k kit-test1-1.0-Linux
2.
To list kit deployment parameters for kit component "comp-server-1.0-1-rhels-6-x86_64", enter:
.. code-block:: perl
lskitdeployparam -c comp-server-1.0-1-rhels-6-x86_64
*****
FILES
*****
/opt/xcat/bin/lskitdeployparam
********
SEE ALSO
********
lskit(1)|lskit.1, lskitcomp(1)|lskitcomp.1, addkit(1)|addkit.1, rmkit(1)|rmkit.1, addkitcomp(1)|addkitcomp.1, rmkitcomp(1)|rmkitcomp.1

View File

@ -0,0 +1,151 @@
#######
rmkit.1
#######
.. highlight:: perl
****
NAME
****
\ **rmkit**\ - Remove Kits from xCAT
********
SYNOPSIS
********
\ **rmkit**\ [\ **-? | -h | -**\ **-help**\ ] [\ **-v | -**\ **-version**\ ]
\ **rmkit**\ [\ **-V | -**\ **-verbose**\ ] [\ **-f | -**\ **-force**\ ] [\ **-t | -**\ **-test**\ ] \ *kitlist*\
***********
DESCRIPTION
***********
The \ **rmkit**\ command removes kits on the xCAT management node from kit names.
Note: The xCAT support for Kits is only available for Linux operating systems.
*******
OPTIONS
*******
\ **-h|-**\ **-help**\
Display usage message.
\ **-V|-**\ **-verbose**\
Verbose mode.
\ **-v|-**\ **-version**\
Command version.
\ **-f|-**\ **-force**\
Remove this kit even there is any component in this kit is listed by osimage.kitcomponents. If this option is not specified, this kit will not be removed if any kit components listed in an osimage.kitcomponents
\ **-t|-**\ **-test**\
Test if kitcomponents in this kit are used by osimage
\ *kitlist*\
A comma delimited list of kits that are to be removed from the xCAT cluster. Each entry can be a kitname or kit basename. For kit basename, rmkit command will remove all the kits that have that kit basename.
************
RETURN VALUE
************
0 The command completed successfully.
1 An error has occurred.
********
EXAMPLES
********
1. To remove two kits from tarball files.
.. code-block:: perl
rmkit kit-test1,kit-test2
Output is similar to:
.. code-block:: perl
Kit kit-test1-1.0-Linux,kit-test2-1.0-Linux was successfully removed.
2. To remove two kits from tarball files even the kit components in them are still being used by osimages.
.. code-block:: perl
rmkit kit-test1,kit-test2 --force
Output is similar to:
.. code-block:: perl
Kit kit-test1-1.0-Linux,kit-test2-1.0-Linux was successfully removed.
3. To list kitcomponents in this kit used by osimage
.. code-block:: perl
rmkit kit-test1,kit-test2 -t
Output is similar to:
.. code-block:: perl
kit-test1-kitcomp-1.0-Linux is being used by osimage osimage-test
Following kitcomponents are in use: kit-test1-kitcomp-1.0-Linux
********
SEE ALSO
********
lskit(1)|lskit.1, addkit(1)|addkit.1, addkitcomp(1)|addkitcomp.1, rmkitcomp(1)|rmkitcomp.1, chkkitcomp(1)|chkkitcomp.1

View File

@ -0,0 +1,162 @@
###########
rmkitcomp.1
###########
.. highlight:: perl
****
NAME
****
\ **rmkitcomp**\ - Remove Kit components from an xCAT osimage.
********
SYNOPSIS
********
\ **rmkitcomp**\ [\ **-? | -h | -**\ **-help**\ ] [\ **-v | -**\ **-version**\ ]
\ **rmkitcomp**\ [\ **-V | -**\ **-verbose**\ ] [\ **-u | -**\ **-uninstall**\ ] [\ **-f | -**\ **-force**\ ] [\ **-**\ **-noscripts**\ ] \ **-i**\ \ *osimage*\ \ *kitcompname_list*\
***********
DESCRIPTION
***********
The \ **rmkitcomp**\ command removes kit components from an xCAT osimage. All the kit component attribute values that are contained in the osimage will be removed, and the kit component meta rpm and package rpm could be uninstalled by \ **-u|-**\ **-uninstall**\ option.
Note: The xCAT support for Kits is only available for Linux operating systems.
*******
OPTIONS
*******
\ **-u|-**\ **-uninstall**\
All the kit component meta rpms and package rpms in otherpkglist will be uninstalled during genimage for stateless image and updatenode for stateful nodes.
\ **-h|-**\ **-help**\
Display usage message.
\ **-V|-**\ **-verbose**\
Verbose mode.
\ **-v|-**\ **-version**\
Command version.
\ **-f|-**\ **-force**\
Remove this kit component from osimage no matter it is a dependency of other kit components.
\ **-**\ **-noscripts**\
Do not remove kitcomponent's postbootscripts from osimage
\ **-i**\ \ *osimage*\
osimage name that include this kit component.
\ *kitcompname_list*\
A comma-delimited list of valid full kit component names or kit component basenames that are to be removed from the osimage. If a basename is specified, all kitcomponents matching that basename will be removed from the osimage.
************
RETURN VALUE
************
0 The command completed successfully.
1 An error has occurred.
********
EXAMPLES
********
1. To remove a kit component from osimage
.. code-block:: perl
rmkitcomp -i rhels6.2-ppc64-netboot-compute comp-test1-1.0-1-rhels-6.2-ppc64
Output is similar to:
.. code-block:: perl
kitcomponents comp-test1-1.0-1-rhels-6.2-ppc64 were removed from osimage rhels6.2-ppc64-netboot-compute successfully
2. To remove a kit component even it is still used as a dependency of other kit component.
.. code-block:: perl
rmkitcomp -f -i rhels6.2-ppc64-netboot-compute comp-test1-1.0-1-rhels-6.2-ppc64
Output is similar to:
.. code-block:: perl
kitcomponents comp-test1-1.0-1-rhels-6.2-ppc64 were removed from osimage rhels6.2-ppc64-netboot-compute successfully
3. To remove a kit component from osimage and also remove the kit component meta RPM and package RPM. So in next genimage for statelss image and updatenode for stateful nodes, the kit component meta RPM and package RPM will be uninstalled.
.. code-block:: perl
rmkitcomp -u -i rhels6.2-ppc64-netboot-compute comp-test1-1.0-1-rhels-6.2-ppc64
Output is similar to:
.. code-block:: perl
kitcomponents comp-test1-1.0-1-rhels-6.2-ppc64 were removed from osimage rhels6.2-ppc64-netboot-compute successfully
********
SEE ALSO
********
lskit(1)|lskit.1, addkit(1)|addkit.1, rmkit(1)|rmkit.1, addkitcomp(1)|addkitcomp.1, chkkitcomp(1)|chkkitcomp.1

View File

@ -1,71 +1,69 @@
Workflow Guide
==============
If xCAT looks suitable for your requirement, following steps are recommended procedure to set up an xCAT cluster.
If xCAT looks suitable for your requirement, following steps are recommended to set up an xCAT cluster.
#. Find a server as your xCAT management node
#. Find a server for xCAT management node
The server can be a bare-metal server or a virtual machine. The major factor for selecting a server is the number of machines in your cluster. The bigger the cluster is, the performance of server need to be better.
The server can be a bare-metal server or a virtual machine. The major factor for selecting a server is the number of machines in your cluster. The bigger the cluster is, the performance of server need to be better.
``NOTE``: The architecture of xCAT management node is recommended to be same as the target compute node in the cluster.
The architecture of xCAT management node is recommended to be same as the target compute node in the cluster.
#. Install xCAT on your selected server
The server which installed xCAT will be the **xCAT Management Node**.
The server where xCAT is installed will be the **xCAT Management Node**.
Refer to the doc: :doc:`xCAT Install Guide <../guides/install-guides/index>` to learn how to install xCAT on a server.
Refer to the doc: :doc:`xCAT Install Guide </guides/install-guides/index>` to learn how to install xCAT on a server.
#. Start to use xCAT management node
Refer to the doc: :doc:`xCAT Admin Guide </guides/admin-guides/index>` to learn how to manage xCAT Management server.
Refer to the doc: :doc:`xCAT Admin Guide <../guides/admin-guides/index>`.
#. Discover target compute nodes in the cluster
#. Discover target nodes in the cluster
Define the target nodes in the xCAT database before managing them.
You have to define the target nodes in the xCAT database before managing them.
For a small cluster (less than 5), you can collect the information of target nodes one by one and then define them manually through ``mkdef`` command.
For a small cluster (less than 5), you can collect the information of target nodes one by one and then define them manually through ``mkdef`` command.
For a bigger cluster, you can use the automatic method to discover the target nodes. The discovered nodes will be defined to xCAT database. You can use ``lsdef`` to display them.
For a bigger cluster, you can use the automatic method to discover the target nodes. The discovered nodes will be defined to xCAT database. You can use ``lsdef`` to display them.
Refer to the doc: :doc:`xCAT discovery Guide </guides/admin-guides/manage_clusters/ppc64le/discovery/index>` to learn how to discover and define compute nodes.
Refer to the doc: :doc:`xCAT discovery Guide <../guides/admin-guides/manage_clusters/ppc64le/discovery/index>` to learn how to discover and define compute nodes.
#. Perform hardware control operations against the target compute nodes
#. Try to perform the hardware control against the target nodes
Verify the hardware control for defined nodes. e.g. ``rpower <node> stat``.
Now you have the node definition. Verify the hardware control for defined nodes is working. e.g. ``rpower <node> stat``.
Refer to the doc: :doc:`Hardware Management <../guides/admin-guides/manage_clusters/ppc64le/management/index>` to learn how to perform the remote hardware control.
Refer to the doc: :doc:`Hardware Management </guides/admin-guides/manage_clusters/ppc64le/management/index>` to learn how to perform the remote hardware control.
#. Deploy OS on the target nodes
* Prepare the OS images
* Customize the OS images (Optional)
* Perform the OS deployment
* Prepare the OS images
* Customize the OS images (Optional)
* Perform the OS deployment
Refer to the doc: :doc:`Diskful Install <../guides/admin-guides/manage_clusters/ppc64le/diskful/index>`, :doc:`Diskless Install <../guides/admin-guides/manage_clusters/ppc64le/diskless/index>` to learn how to deploy OS for a target node.
Refer to the doc: :doc:`Diskful Install </guides/admin-guides/manage_clusters/ppc64le/diskful/index>`, :doc:`Diskless Install </guides/admin-guides/manage_clusters/ppc64le/diskless/index>` to learn how to deploy OS for a target node.
#. Update the OS after the deployment
You may require to update the OS of certain target nodes after the OS deployment, try the ``updatenode`` command. ``updatenode`` command can execute the following tasks for target nodes:
You may require to update the OS of certain target nodes after the OS deployment, try the ``updatenode`` command. ``updatenode`` command can execute the following tasks for target nodes:
* Install additional software/application for the target nodes
* Sync some files to the target nodes
* Run some postscript for the target nodes
Refer to the doc: :doc:`Updatenode <../guides/admin-guides/manage_clusters/ppc64le/updatenode>` to learn how to use ``updatenode`` command.
Refer to the doc: :doc:`Updatenode </guides/admin-guides/manage_clusters/ppc64le/updatenode>` to learn how to use ``updatenode`` command.
#. Run parallel commands
When managing a cluster with hundreds or thousands of nodes, operating on many nodes in parallel might be necessary. xCAT has some parallel commands for that.
When managing a cluster with hundreds or thousands of nodes, operating on many nodes in parallel might be necessary. xCAT has some parallel commands for that.
* Parallel shell
* Parallel copy
* Parallel ping
Refer to the :doc:`/guides/admin-guides/manage_clusters/ppc64le/parallel_cmd` to learn how to use parallel commands.
Refer to the :doc:`/guides/admin-guides/manage_clusters/ppc64le/parallel_cmd` to learn how to use parallel commands.
#. Contribute to xCAT (Optional)
While using xCAT, if you find something (code, documentation, ...) that can be improved and you want to contribute that to xCAT, do that for your and other xCAT users benefit. And welcome to xCAT community!
While using xCAT, if you find something (code, documentation, ...) that can be improved and you want to contribute that to xCAT, do that for your and other xCAT users benefit. And welcome to xCAT community!
Refer to the :doc:`/developers/index` to learn how to contribute to xCAT community.

View File

@ -39,10 +39,6 @@ xCAT consists of two software packages: ``xcat-core`` and ``xcat-dep``
*This is the latest GA (Generally Availability) build that has been tested thoroughly*
* **Latest Snapshot Builds**
*This is the latest snapshot of the GA version build that may contain bug fixes but has not yet been tested thoroughly*
* **Development Builds**
*This is the snapshot builds of the new version of xCAT in development. This version has not been released yet, use as your own risk*

4149
xCAT-buildkit/bin/buildkit Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,285 @@
=head1 NAME
B<buildkit> - Used to build a software product Kit which may be used to install software in an xCAT cluster.
=head1 SYNOPSIS
B<buildkit> [B<-?>|B<-h>|B<--help>] [B<-v>|B<--version>]
To build a new Kit
B<buildkit> [B<-V>|B<--verbose]> I<subcommand> [I<kit_name>] [I<repo_name> | B<all>] [B<-l>|B<--kitloc> I<kit_location>]
To add packages to an existing Kit.
B<buildkit> [B<-V>|B<--verbose>] I<addpkgs> I<kit_tarfile> [B<-p>|B<--pkgdir> I<package_directory_list>] [B<-k>|B<--kitversion> I<version>] [B<-r>|B<--kitrelease> I<release>] [B<-l>|B<--kitloc> I<kit_location>]
=head1 DESCRIPTION
The B<buildkit> command provides a collection of utilities that may be used to package a software product as a Kit tarfile that can be used to install software on the nodes of an xCAT cluster. A Kit contains the product software packages, configuration and control information, and install and customization scripts.
Note: The xCAT support for Kits is only available for Linux operating systems.
You will need to run the B<buildkit> command several times with different subcommands to step through the process of building a kit:
By default the B<buildkit> subcommands will operate in the current working directory, (ie. look for files, create directories etc.). You could specify a different location by using the "B<-l | --kitloc> I<kit_location>" option.
The I<kit_location> is the full path name of the directory that contains the kit files. You would use the same location value for all the buildkit subcommands.
For example, to create a new kit named "prodkit" in the directory /home/mykits/ I<either> run:
=over 4
=item 1.
If no location is provided then the command will create a subdirectory called "prodkit" in the current directory "/home/mykits" and the new kit files will be created there.
B<cd /home/mykits>
B<buildkit create prodkit>
or
=item 2.
If a location is provided then the Kit files will be created there. Note that the Kit name does not necessarily have to be the directory name where the kit files are located.
B<buidkit create prodkit -l /home/mykits/prodkit>
=back
In both cases the /home/mykits/prodkit directory is created and the inital files for the kit are created in that directory.
The following example illustrates the basic process for building a new Kit. In this example we are building a Kit named "mytstkit".
=over 4
=item 1.
Change to the directory where you wish to create the Kit.
=item 2.
Create a template directory for your kit:
B<buildkit create mytstkit>
=item 3.
Change directory to the new "mytstkit" subdirectory that was just created.
B<cd mytstkit>
=item 4.
Edit the buildkit configuration file for your kit:
B<vi buildkit.conf>
(See xCAT Kit documentation for details.)
=item 5.
Create all required files, scripts, plugins, and packages for your kit.
=item 6.
Validate your kit build configuration and fix any errors that are reported:
B<buildkit chkconfig>
=item 7.
List the repos defined in your buildkit configuration file:
B<buildkit listrepo>
=item 8.
For each repo name listed, build the repository. Note that if you need to build repositories for OS distributions, versions, or architectures that do not match the current system, you may need to copy your kit template directory to an appropriate server to build that repository, and then copy the results back to your main build server. For example, to build a repo named "rhels6.3" you would run the following command.
B<buildkit buildrepo rhels6.3>
or, you can build all of the repos at one time if there are no OS or architecture dependencies for kitcomponent package builds or kitpackage builds:
B<buildkit buildrepo all>
=item 9.
Build the kit tar file:
B<buildkit buildtar>
=back
=head1 OPTIONS
=over 10
=item B<-h |--help>
Display usage message.
=item B<-k|--kitversion> I<version>
Product version.
=item B<-l|--kitloc> I<kit_location>
The directory location of the Kit files.
=item B<-p|--pkgdir> I<package_directory_list>
A comma-separated list of directory locations for product RPMs.
=item B<-r|--kitrelease> I<release>
Product release.
=item B<-V |--verbose>
Verbose mode.
=item B<-v|--version>
Command version.
=back
=head1 SUB-COMMANDS
=over 10
=item B<create> I<kit_basename>
Creates a new kit build directory structure for kit I<kit_basename> using the location specified on the command line or the current directory. The sample kit files from /opt/xcat/share/xcat/kits/kit_template are copied over, and the buildkit.conf file is modified for the specified I<kit_basename>.
=item B<chkconfig>
Reads the buildkit.conf file, verifies that the file syntax is correct and that all specified files exist.
=item B<listrepo>
Reads the buildkit.conf file, lists all Kit package repositories listed in the file, and reports the build status for each repository.
=item B<buildrepo> {I<repo_name> | B<all>}
Reads the buildkit.conf file, and builds the specified Kit package repository. The built packages are placed in the directory <kit_location>/build/kit_repodir/I<repo_name>. If B<all> is specified, all kit repositories are built.
=item B<cleanrepo> {I<repo_name> | B<all>}
Reads the buildkit.conf file, and deletes all the package files and package meta data files from the <kit_location>/build/kit_repodir/I<repo_name> directory. If B<all> is specified, all kit repository files are deleted.
=item B<buildtar>
Reads the buildkit.conf file, validates that all kit repositories have been built, and builds the Kit tar file <kit_location>/I<kitname>.tar.bz2.
=item B<cleantar>
Reads the <kit_location>/buildkit.conf file and I<deletes> the following:
=over 4
- Kit tar files matching <kit_location>/I<kit_name*.tar.bz2>.
- <kit_location>/build/I<kit_name>
- <kit_location>/rpmbuild
- <kit_location>/tmp
- <kit_location>/debbuild
=back
Caution: Make sure you back up any tar files you would like to keep before running this subcommand.
=item B<cleanall>
Equivalent to running B<buildkit cleanrepo all> and B<buildkit cleantar>.
=item B<addpkgs>
I<kit_tarfile> {B<-p> | B<--pkgdir> I<package_directory_list>} [B<-k> | B<--kitversion> I<version>] [B<-r> | B<--kitrelease> I<release>]
Add product package rpms to a previously built kit tar file. This is used for partial product kits that are built and shipped separately from the product packages, and are identified with a I<kit_tarfile> name of I<kitname>.B<NEED_PRODUCT_PKGS.tar.bz2>. Optionally, change the kit release and version values when building the new kit tarfile. If kitcomponent version and/or release values are defaulted to the kit values, those will also be changed and new kitcomponent rpms will be built. If kit or kitcomponent scripts, plugins, or other files specify name, release, or version substitution strings, these will all be replaced with the new values when built into the new complete kit tarfile I<kit_location>/I<new_kitname>.B<tar.bz2>.
=back
=head1 RETURN VALUE
=over 3
=item <B>0
The command completed successfully.
=item <B>1
An error has occurred.
=back
=head1 EXAMPLES
=over 3
=item 1.
To create the sample kit shipped with the xCAT-buildkit rpm on a RHELS 6.3 server and naming it B<mykit>, run the following commands:
B<cd /home/myuserid/kits>
B<buildkit create mykit>
B<cd mykit>
B<vi buildkit.conf>
B<buildkit chkconfig>
B<buildkit listrepo>
B<buildkit buildrepo all>
B<buildkit buildtar>
=item 2.
To clean up a kit repository directory after build failures on a RHELS 6.3 server to prepare for a new kit repository build, run:
B<buildkit cleanrepo rhels6.3>
=item 3.
To clean up all kit build files, including a previously built kit tar file, run
B<buildkit cleanall>
=item 4.
To create a kit named "tstkit" located in /home/foobar/tstkit instead of the current working directory.
B<buildkit create tstkit -l /home/foobar/tstkit>
=back
=head1 FILES
/opt/xcat/bin/buildkit
/opt/xcat/share/xcat/kits/kit_template
/opt/xcat/share/xcat/kits/kitcomponent.spec.template
<kit location>/buildkit.conf
<kit location>/build/I<kitname>/kit.conf
<kit location>/I<kitname>.tar.bz2
=head1 SEE ALSO
addkit(1), lskit(1), rmkit(1), addkitcomp(1), rmkitcomp(1), chkkitcomp(1)

View File

@ -35,6 +35,8 @@ xCAT-buildkit provides the buildkit tool and sample kit files to build an xCAT k
# Convert pods to man pages and html pages
mkdir -p share/man/man1
mkdir -p share/doc/man1
pod2man pods/man1/buildkit.1.pod > share/man/man1/buildkit.1
pod2html pods/man1/buildkit.1.pod > share/doc/man1/buildkit.1.html
%install
rm -rf $RPM_BUILD_ROOT
@ -44,18 +46,30 @@ mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/man/man1
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/man1
# These were built dynamically in the build phase
cp share/man/man1/* $RPM_BUILD_ROOT/%{prefix}/share/man/man1
chmod 444 $RPM_BUILD_ROOT/%{prefix}/share/man/man1/*
cp share/doc/man1/* $RPM_BUILD_ROOT/%{prefix}/share/doc/man1
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/man1/*
%ifos linux
cp -aR share/xcat/kits/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits/
#chmod -R 644 $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits/*
find $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits -type d -exec chmod 755 {} \;
find $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits -type f -exec chmod 644 {} \;
cp -a lib/perl/xCAT/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT
#chmod -R 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/*
find $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT -type d -exec chmod 755 {} \;
find $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT -type f -exec chmod 644 {} \;
cp -a bin/* $RPM_BUILD_ROOT/%{prefix}/bin/
chmod -R 755 $RPM_BUILD_ROOT/%{prefix}/bin/*
%else
cp -hpR share/xcat/kits/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits/
chmod -R 644 $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits/*
cp -hpR lib/perl/xCAT/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/
chmod -R 755 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/*
cp -hpR bin/* $RPM_BUILD_ROOT/%{prefix}/bin/
chmod -R 755 $RPM_BUILD_ROOT/%{prefix}/bin/*
%endif
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-buildkit

View File

@ -92,6 +92,14 @@ opt/xcat/bin/xcatclient opt/xcat/bin/lshwconn
opt/xcat/bin/xcatclientnnr opt/xcat/sbin/makeroutes
opt/xcat/bin/xcatclientnnr opt/xcat/sbin/snmove
opt/xcat/bin/xcatclientnnr opt/xcat/bin/lsxcatd
opt/xcat/bin/xcatclientnnr opt/xcat/bin/lskit
opt/xcat/bin/xcatclientnnr opt/xcat/bin/addkit
opt/xcat/bin/xcatclientnnr opt/xcat/bin/rmkit
opt/xcat/bin/xcatclientnnr opt/xcat/bin/lskitcomp
opt/xcat/bin/xcatclientnnr opt/xcat/bin/addkitcomp
opt/xcat/bin/xcatclientnnr opt/xcat/bin/rmkitcomp
opt/xcat/bin/xcatclientnnr opt/xcat/bin/chkkitcomp
opt/xcat/bin/xcatclientnnr opt/xcat/bin/lskitdeployparam
opt/xcat/bin/xcatclient opt/xcat/bin/postage
opt/xcat/bin/xcatclient opt/xcat/bin/cfghost
opt/xcat/bin/xcatclientnnr opt/xcat/bin/cfgve

View File

@ -0,0 +1,79 @@
=head1 NAME
B<addkit> - Adds product software Kits to an xCAT cluster environmnet.
=head1 SYNOPSIS
B<addkit> [B<-?>|B<-h>|B<--help>] [B<-v>|B<--version>]
B<addkit> [B<-i>|B<--inspection>] I<kitlist>
B<addkit> [B<-V>|B<--verbose>] [B<-p>|B<--path> I<path>] I<kitlist>
=head1 DESCRIPTION
The B<addkit> command installs a kit on the xCAT management node from a kit tarfile or directory.
It creates xCAT database definitions for the kit, kitrepo, and kitcomponent.
B<Note:> xCAT Kit support is ONLY available for Linux operating systems.
=head1 OPTIONS
=over 10
=item B<-h|--help>
Display usage message.
=item B<-V|--verbose>
Verbose mode.
=item B<-v|--version>
Command version.
=item B<-i|--inspection>
Show the summary of the given kits
=item B<-p|--path> I<path>
The destination directory to which the contents of the kit tarfiles and/or kit deploy directories will be copied. When this option is not specified, the default destination directory will be formed from the installdir site attribute with ./kits subdirectory.
=item I<kitlist>
A comma delimited list of kit_tarball_files or kit_deploy_directories to be added to the xCAT environment. Each entry can be an absolute or relative path. See xCAT documentation for more information on building kits.
=back
=head1 RETURN VALUE
0 The command completed successfully.
1 An error has occurred.
=head1 EXAMPLES
1. To add kits from tarball files:
addkit kit-test1.tar.bz2,kit-test2.tar.bz2
2. To add kits from directories:
addkit kit-test1,kit-test2
3. To add kits from tarball I<kit-test1.tar.bz2> to target path I</install/test>:
addkit -p /install/test kit-test1.tar.bz2
4. To see general information about kit I<kit-test1.tar.bz2> without adding the kit to xCAT:
addkit -i kit-test1.tar.bz2
=head1 SEE ALSO
L<lskit(1)|lskit.1>, L<rmkit(1)|rmkit.1>, L<addkitcomp(1)|addkitcomp.1>, L<rmkitcomp(1)|rmkitcomp.1>, L<chkkitcomp(1)|chkkitcomp.1>

View File

@ -0,0 +1,90 @@
=head1 NAME
B<addkitcomp> - Assign Kit components to an xCAT osimage.
=head1 SYNOPSIS
B<addkitcomp> [B<-?>|B<-h>|B<--help>] [B<-v>|B<--version>]
B<addkitcomp> [B<-V>|B<--verbose>] [B<-a>|B<--adddeps>] [B<-f>|B<--force>] [B<-n>|B<--noupgrade>] [B<--noscripts>] B<-i> I<osimage> I<kitcompname_list>
=head1 DESCRIPTION
The B<addkitcomp> command will assign kit components to an xCAT osimage. The kit component meta rpm, package rpm and deploy parameters will be added to osimage's otherpkg.pkglist and postbootscripts will be added to osimages's postbootscripts attribute.
B<Note:> xCAT Kit support is ONLY available for Linux operating systems.
=head1 OPTIONS
=over 10
=item B<-a|--adddeps>
Assign kitcomponent dependencies to the osimage.
=item B<-h|--help>
Display usage message.
=item B<-V|--verbose>
Verbose mode.
=item B<-v|--version>
Command version.
=item B<-f|--force>
Add kit component to osimage even if there is a mismatch in OS, version, arch, serverrole, or kitcompdeps
=item B<-i> I<osimage>
The osimage name that the kit component is assigning to.
=item B<-n|--noupgrade>
1. Allow multiple versions of kitcomponent to be installed into the osimage, instead of kitcomponent upgrade.
2. Kit components added by addkitcomp -n will be installed separately behind all other ones which have been added.
=item B<--noscripts>
Do not add kitcomponent's postbootscripts to osimage
=item I<kitcompname_list>
A comma-delimited list of valid full kit component names or kit component basenames that are to be added to the osimage.
=back
=head1 RETURN VALUE
0 The command completed successfully.
1 An error has occurred.
=head1 EXAMPLES
1. To add a single kit component to osimage "rhels6.2-ppc64-netboot-compute":
addkitcomp -i rhels6.2-ppc64-netboot-compute comp-test1-1.0-1-rhels-6.2-ppc64
2. To add a kit component to osimage with dependencies, use the -a (addeps) option:
addkitcomp -a -i rhels6.2-ppc64-netboot-compute comp-test2-1.0-1-rhels-6.2-ppc64
3. To add a kit component to osimage with incompatable osarch, osversion or ostype, use the -f (force) option:
addkitcomp -f -i rhels6.2-ppc64-netboot-compute comp-test1-1.0-1-rhels-6.2-ppc64
4. To add a new version of kit component to osimage without upgrade, use the -n (noupgrade) option:
addkitcomp -n -i rhels6.2-ppc64-netboot-compute comp-test2-1.0-1-rhels-6.2-ppc64
=head1 SEE ALSO
L<lskit(1)|lskit.1>, L<addkit(1)|addkit.1>, L<rmkit(1)|rmkit.1>, L<rmkitcomp(1)|rmkitcomp.1>, L<chkkitcomp(1)|chkkitcomp.1>

View File

@ -0,0 +1,61 @@
=head1 NAME
B<chkkitcomp> - Check if Kit components are compatible with an xCAT osimage.
=head1 SYNOPSIS
B<chkkitcomp> [B<-?>|B<-h>|B<--help>] [B<-v>|B<--version>]
B<chkkitcomp> [B<-V>|B<--verbose>] B<-i> I<osimage> I<kitcompname_list>
=head1 DESCRIPTION
The B<chkkitcomp> command will check if the kit components are compatible with the xCAT osimage.
This command will ignore the current osimage.kitcomponents setting and check if the kitcompname_list is compatible with the osimage and kit component dependencies.
B<Note:> xCAT Kit support is ONLY available for Linux operating systems.
=head1 OPTIONS
=over 10
=item B<-h|--help>
Display usage message.
=item B<-V|--verbose>
Verbose mode.
=item B<-v|--version>
Command version.
=item B<-i> I<osimage>
The name of the osimage to check against.
=item I<kitcompname_list>
A comma-delimited list of valid full kit component names or kit component basenames that are to be checked against the osimage.
=back
=head1 RETURN VALUE
0 The command completed successfully.
1 An error has occurred.
=head1 EXAMPLES
1. To check if a kit component, I<comp-test1-1.0-1-rhels-6.2-ppc64> can be added to osimage I<rhels6.2-ppc64-netboot-compute>:
chkkitcomp -i rhels6.2-ppc64-netboot-compute comp-test1-1.0-1-rhels-6.2-ppc64
=head1 SEE ALSO
L<lskit(1)|lskit.1>, L<addkit(1)|addkit.1>, L<rmkit(1)|rmkit.1>, L<addkitcomp(1)|addkitcomp.1>, L<rmkitcomp(1)|rmkitcomp.1>

View File

@ -0,0 +1,168 @@
=head1 NAME
B<lskit> - Lists information for one or more Kits.
=head1 SYNOPSIS
B<lskit> [B<-V> | B<--verbose>] [B<-F> | B<--framework> I<kitattr_names>] [B<-x> | B<--xml> | B<--XML>] [B<-K> | B<--kitattr> I<kitattr_names>] [B<-R> | B<--repoattr> I<repoattr_names>] [B<-C> | B<--compattr> I<compattr_names>] [I<kit_names>]
B<lskit> [B<-?> | B<-h> | B<--help> | B<-v> | B<--version>]
B<lskit> [B<-F> | B<--framework> I<kit_path_name>]
=head1 DESCRIPTION
The B<lskit> command is used to list information for one or more kits. A kit is a special kind of package that is used to install a software product on one or more nodes in an xCAT cluster.
Note: The xCAT support for Kits is only available for Linux operating systems.
The B<lskit> command outputs the following info for each kit: the kit's basic info, the kit's repositories, and the kit's components. The command outputs the info in two formats: human-readable format (default), and XML format. Use the -x option to view the info in XML format.
Input to the command can specify any number or combination of the input options.
=head1 OPTIONS
=over 10
=item B<-F|--framework> I<kit_path_name>
Use this option to display the framework values of the specified Kit tarfile. This information is retreived directly from the tarfile and can be done before the Kit has been defined in the xCAT database. This option cannot be combined with other options.
=item B<-K|--kitattr> I<kitattr_names>
Where I<kitattr_names> is a comma-delimited list of kit attribute names. The names correspond to attribute names in the B<kit> table. The B<lskit> command will only display the specified kit attributes.
=item B<-R|--repoattr> I<repoattr_names>
Where I<repoattr_names> is a comma-delimited list of kit repository attribute names. The names correspond to attribute names in the B<kitrepo> table. The B<lskit> command will only display the specified kit repository attributes.
=item B<-C|--compattr> I<compattr_names>
where I<compattr_names> is a comma-delimited list of kit component attribute names. The names correspond to attribute names in the B<kitcomponent> table. The B<lskit> command will only display the specified kit component attributes.
=item I<kit_names>
is a comma-delimited list of kit names. The B<lskit> command will only display the kits matching these names.
=item B<-x|--xml|--XML>
Need XCATXMLTRACE=1 env when using -x|--xml|--XML, for example: XCATXMLTRACE=1 lskit -x testkit-1.0.0
Return the output with XML tags. The data is returned as:
<data>
<kitinfo>
...
</kitinfo>
</data>
...
<data>
<kitinfo>
...
</kitinfo>
</data>
Each <kitinfo> tag contains info for one kit. The info inside <kitinfo> is structured as follows:
The <kit> sub-tag contains the kit's basic info.
The <kitrepo> sub-tags store info about the kit's repositories.
The <kitcomponent> sub-tags store info about the kit's components.
The data inside <kitinfo> is returned as:
<kitinfo>
<kit>
...
</kit>
<kitrepo>
...
</kitrepo>
...
<kitcomponent>
...
</kitcomponent>
...
</kitinfo>
=item B<-V|--verbose>
Display additional progress and error messages.
=item B<-v|--version>
Command Version.
=item B<-?|-h|--help>
Display usage message.
=back
=head1 RETURN VALUE
=over 3
=item 0
The command completed successfully.
=item 1
An error has occurred.
=back
=head1 EXAMPLES
=over 3
=item 1.
To list all kits, enter:
lskit
=item 2.
To list the kit "kit-test1-1.0-Linux", enter:
lskit kit-test1-1.0-Linux
=item 3.
To list the kit "kit-test1-1.0-Linux" for selected attributes, enter:
lskit -K basename,description -R kitreponame -C kitcompname kit-test1-1.0-Linux
=item 4.
To list the framework value of a Kit tarfile.
lskit -F /myhome/mykits/pperte-1.3.0.2-0-x86_64.tar.bz2
Output is similar to:
Extracting the kit.conf file from /myhome/mykits/pperte-1.3.0.2-0-x86_64.tar.bz2. Please wait.
kitframework=2
compatible_kitframeworks=0,1,2
=item 5.
To list kit "testkit-1.0-1" with XML tags, enter:
XCATXMLTRACE=1 lskit -x testkit-1.0-1
=back
=head1 FILES
/opt/xcat/bin/lskit
=head1 SEE ALSO
L<lskitcomp(1)|lskitcomp.1>, L<lskitdeployparam(1)|lskitdeployparam.1>, L<addkit(1)|addkit.1>, L<rmkit(1)|rmkit.1>, L<addkitcomp(1)|addkitcomp.1>, L<rmkitcomp(1)|rmkitcomp.1>

View File

@ -0,0 +1,156 @@
=head1 NAME
B<lskitcomp> - Used to list information for one or more kit components.
=head1 SYNOPSIS
B<lskitcomp> [B<-V> | B<--verbose>] [B<-x> | B<--xml> | B<--XML>] [B<-C> | B<--compattr> I<compattr_names>] [B<-O> | B<--osdistro> I<os_distro>] [B<-S> | B<--serverrole> I<server_role>] [I<kitcomp_names>]
B<lskitcomp> [B<-?> | B<-h> | B<--help> | B<-v> | B<--version>]
=head1 DESCRIPTION
The B<lskitcomp> command is used to list information for one or more kit components. A kit is made up of one or more kit components. Each kit component is a meta package used to install a software product component on one or more nodes in an xCAT cluster.
The B<lskitcomp> command outputs the kit component info in two formats: human-readable format (default), and XML format. Use the -x option to view the info in XML format.
Input to the command can specify any number or combination of the input options.
Note: The xCAT support for Kits is only available for Linux operating systems.
=head1 OPTIONS
=over 10
=item B<-C|--compattr> I<compattr_names>
where I<compattr_names> is a comma-delimited list of kit component attribute names. The names correspond to attribute names in the B<kitcomponent> table. The B<lskitcomp> command will only display the specified kit component attributes.
=item B<-O|--osdistro> I<os_distro>
where I<os_distro> is the name of an osdistro in B<osdistro> table. The B<lskitcomp> command will only display the kit components matching the specified osdistro.
=item B<-S|--serverrole> I<server_role>
where I<server_role> is the name of a server role. The typical server roles are: mgtnode, servicenode, computenode, loginnode, storagennode. The B<lskitcomp> command will only display the kit components matching the specified server role.
=item I<kitcomp_names>
is a comma-delimited list of kit component names. The B<lskitcomp> command will only display the kit components matching the specified names.
=item B<-x|--xml|--XML>
Need XCATXMLTRACE=1 env when using -x|--xml|--XML.
Return the output with XML tags. The data is returned as:
<data>
<kitinfo>
...
</kitinfo>
</data>
...
<data>
<kitinfo>
...
</kitinfo>
</data>
Each <kitinfo> tag contains info for a group of kit components belonging to the same kit. The info inside <kitinfo> is structured as follows:
The <kit> sub-tag contains the kit's name.
The <kitcomponent> sub-tags store info about the kit's components.
The data inside <kitinfo> is returned as:
<kitinfo>
<kit>
...
</kit>
<kitcomponent>
...
</kitcomponent>
...
</kitinfo>
=item B<-V|--verbose>
Display additional progress and error messages.
=item B<-v|--version>
Command Version.
=item B<-?|-h|--help>
Display usage message.
=back
=head1 RETURN VALUE
=over 3
=item 0
The command completed successfully.
=item 1
An error has occurred.
=back
=head1 EXAMPLES
=over 3
=item 1.
To list all kit components, enter:
lskitcomp
=item 2.
To list the kit component "comp-server-1.0-1-rhels-6-x86_64", enter:
lskitcomp comp-server-1.0-1-rhels-6-x86_64
=item 3.
To list the kit component "comp-server-1.0-1-rhels-6-x86_64" for selected kit component attributes, enter:
lskitcomp -C kitcompname,desc comp-server-1.0-1-rhels-6-x86_64
=item 4.
To list kit components compatible with "rhels-6.2-x86_64" osdistro, enter:
lskitcomp -O rhels-6.2-x86_64
=item 5.
To list kit components compatible with "rhels-6.2-x86_64" osdistro and "computenode" server role, enter:
lskitcomp -O rhels-6.2-x86_64 -S computenode
=item 6.
To list the kit component "testkit-compute-1.0-1-ubuntu-14.04-ppc64el" with XML tags, enter:
XCATXMLTRACE=1 lskitcomp -x testkit-compute-1.0-1-ubuntu-14.04-ppc64el
=back
=head1 FILES
/opt/xcat/bin/lskitcomp
=head1 SEE ALSO
L<lskit(1)|lskit.1>, L<lskitdeployparam(1)|lskitdeployparam.1>, L<addkit(1)|addkit.1>, L<rmkit(1)|rmkit.1>, L<addkitcomp(1)|addkitcomp.1>, L<rmkitcomp(1)|rmkitcomp.1>

View File

@ -0,0 +1,107 @@
=head1 NAME
B<lskitdeployparam> - Lists the deployment parameters for one or more Kits or Kit components
=head1 SYNOPSIS
B<lskitdeployparam> [B<-V> | B<--verbose>] [B<-x> | B<--xml> | B<--XML>] [B<-k> | B<--kitname> I<kit_names>] [B<-c> | B<--compname> I<comp_names>]
B<lskitdeployparam> [B<-?> | B<-h> | B<--help> | B<-v> | B<--version>]
=head1 DESCRIPTION
The B<lskitdeployparam> command is used to list the kit deployment parameters for one or more kits, or one or more kit components. Kit deployment parameters are used to customize the installation or upgrade of kit components.
The B<lskitdeployparam> command outputs the kit component information in two formats: human-readable format (default), and XML format. Use the -x option to view the information in XML format.
Input to the command can specify any combination of the input options.
Note: The xCAT support for Kits is only available for Linux operating systems.
=head1 OPTIONS
=over 10
=item B<-k|--kitname> I<kit_names>
Where I<kit_names> is a comma-delimited list of kit names. The B<lskitdeployparam> command will only display the deployment parameters for the kits with the matching names.
=item B<-c|--compname> I<comp_names>
Where I<comp_names> is a comma-delimited list of kit component names. The B<lskitdeployparam> command will only display the deployment parameters for the kit components with the matching names.
=item B<-x|--xml|--XML>
Return the output with XML tags. The data is returned as:
<data>
<kitdeployparam>
<name>KIT_KIT1_PARAM1</name>
<value>value11</value>
</kitdeployparam>
</data>
<data>
<kitdeployparam>
<name>KIT_KIT1_PARAM2</name>
<value>value12</value>
</kitdeployparam>
</data>
...
=item B<-V|--verbose>
Display additional progress and error messages.
=item B<-v|--version>
Command Version.
=item B<-?|-h|--help>
Display usage message.
=back
=head1 RETURN VALUE
=over 3
=item 0
The command completed successfully.
=item 1
An error has occurred.
=back
=head1 EXAMPLES
=over 3
=item 1.
To list kit deployment parameters for kit "kit-test1-1.0-Linux", enter:
lskitdeployparam -k kit-test1-1.0-Linux
=item 2.
To list kit deployment parameters for kit component "comp-server-1.0-1-rhels-6-x86_64", enter:
lskitdeployparam -c comp-server-1.0-1-rhels-6-x86_64
=back
=head1 FILES
/opt/xcat/bin/lskitdeployparam
=head1 SEE ALSO
L<lskit(1)|lskit.1>, L<lskitcomp(1)|lskitcomp.1>, L<addkit(1)|addkit.1>, L<rmkit(1)|rmkit.1>, L<addkitcomp(1)|addkitcomp.1>, L<rmkitcomp(1)|rmkitcomp.1>

View File

@ -0,0 +1,83 @@
=head1 NAME
B<rmkit> - Remove Kits from xCAT
=head1 SYNOPSIS
B<rmkit> [B<-?>|B<-h>|B<--help>] [B<-v>|B<--version>]
B<rmkit> [B<-V>|B<--verbose>] [B<-f>|B<--force>] [B<-t>|B<--test>] I<kitlist>
=head1 DESCRIPTION
The B<rmkit> command removes kits on the xCAT management node from kit names.
Note: The xCAT support for Kits is only available for Linux operating systems.
=head1 OPTIONS
=over 10
=item B<-h|--help>
Display usage message.
=item B<-V|--verbose>
Verbose mode.
=item B<-v|--version>
Command version.
=item B<-f|--force>
Remove this kit even there is any component in this kit is listed by osimage.kitcomponents. If this option is not specified, this kit will not be removed if any kit components listed in an osimage.kitcomponents
=item B<-t|--test>
Test if kitcomponents in this kit are used by osimage
=item I<kitlist>
A comma delimited list of kits that are to be removed from the xCAT cluster. Each entry can be a kitname or kit basename. For kit basename, rmkit command will remove all the kits that have that kit basename.
=back
=head1 RETURN VALUE
0 The command completed successfully.
1 An error has occurred.
=head1 EXAMPLES
1. To remove two kits from tarball files.
rmkit kit-test1,kit-test2
Output is similar to:
Kit kit-test1-1.0-Linux,kit-test2-1.0-Linux was successfully removed.
2. To remove two kits from tarball files even the kit components in them are still being used by osimages.
rmkit kit-test1,kit-test2 --force
Output is similar to:
Kit kit-test1-1.0-Linux,kit-test2-1.0-Linux was successfully removed.
3. To list kitcomponents in this kit used by osimage
rmkit kit-test1,kit-test2 -t
Output is similar to:
kit-test1-kitcomp-1.0-Linux is being used by osimage osimage-test
Following kitcomponents are in use: kit-test1-kitcomp-1.0-Linux
=head1 SEE ALSO
L<lskit(1)|lskit.1>, L<addkit(1)|addkit.1>, L<addkitcomp(1)|addkitcomp.1>, L<rmkitcomp(1)|rmkitcomp.1>, L<chkkitcomp(1)|chkkitcomp.1>

View File

@ -0,0 +1,90 @@
=head1 NAME
B<rmkitcomp> - Remove Kit components from an xCAT osimage.
=head1 SYNOPSIS
B<rmkitcomp> [B<-?>|B<-h>|B<--help>] [B<-v>|B<--version>]
B<rmkitcomp> [B<-V>|B<--verbose>] [B<-u>|B<--uninstall>] [B<-f>|B<--force>] [B<--noscripts>] B<-i> I<osimage> I<kitcompname_list>
=head1 DESCRIPTION
The B<rmkitcomp> command removes kit components from an xCAT osimage. All the kit component attribute values that are contained in the osimage will be removed, and the kit component meta rpm and package rpm could be uninstalled by B<-u|--uninstall> option.
Note: The xCAT support for Kits is only available for Linux operating systems.
=head1 OPTIONS
=over 10
=item B<-u|--uninstall>
All the kit component meta rpms and package rpms in otherpkglist will be uninstalled during genimage for stateless image and updatenode for stateful nodes.
=item B<-h|--help>
Display usage message.
=item B<-V|--verbose>
Verbose mode.
=item B<-v|--version>
Command version.
=item B<-f|--force>
Remove this kit component from osimage no matter it is a dependency of other kit components.
=item B<--noscripts>
Do not remove kitcomponent's postbootscripts from osimage
=item B<-i> I<osimage>
osimage name that include this kit component.
=item I<kitcompname_list>
A comma-delimited list of valid full kit component names or kit component basenames that are to be removed from the osimage. If a basename is specified, all kitcomponents matching that basename will be removed from the osimage.
=back
=head1 RETURN VALUE
0 The command completed successfully.
1 An error has occurred.
=head1 EXAMPLES
1. To remove a kit component from osimage
rmkitcomp -i rhels6.2-ppc64-netboot-compute comp-test1-1.0-1-rhels-6.2-ppc64
Output is similar to:
kitcomponents comp-test1-1.0-1-rhels-6.2-ppc64 were removed from osimage rhels6.2-ppc64-netboot-compute successfully
2. To remove a kit component even it is still used as a dependency of other kit component.
rmkitcomp -f -i rhels6.2-ppc64-netboot-compute comp-test1-1.0-1-rhels-6.2-ppc64
Output is similar to:
kitcomponents comp-test1-1.0-1-rhels-6.2-ppc64 were removed from osimage rhels6.2-ppc64-netboot-compute successfully
3. To remove a kit component from osimage and also remove the kit component meta RPM and package RPM. So in next genimage for statelss image and updatenode for stateful nodes, the kit component meta RPM and package RPM will be uninstalled.
rmkitcomp -u -i rhels6.2-ppc64-netboot-compute comp-test1-1.0-1-rhels-6.2-ppc64
Output is similar to:
kitcomponents comp-test1-1.0-1-rhels-6.2-ppc64 were removed from osimage rhels6.2-ppc64-netboot-compute successfully
=head1 SEE ALSO
L<lskit(1)|lskit.1>, L<addkit(1)|addkit.1>, L<rmkit(1)|rmkit.1>, L<addkitcomp(1)|addkitcomp.1>, L<chkkitcomp(1)|chkkitcomp.1>

View File

@ -249,6 +249,14 @@ ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/cfghost
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/cfgve
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/lsve
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/rmosdistro
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/lskit
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/addkit
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/rmkit
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/lskitcomp
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/addkitcomp
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/rmkitcomp
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/chkkitcomp
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/lskitdeployparam
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/lskmodules
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/nodeimport
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/nodediscoverstart

View File

@ -271,14 +271,16 @@ fi
LAN_MED_TYPE="802.3"
if [ ! -z "$ISOPENBMC" ]; then
# Overvide the default value for OpenBMC
LAN_MED_TYPE="Other LAN"
# For OpenBMC, the value of "Channel Medium Type" attribute could be "Other LAN" for FW drivers prior to OP940.01
# and "802.3" for FW drivers OP940.01 and later
LAN_MED_TYPE="802.3|Other LAN"
fi
# Loop through channels and pick the one to communicate on
while [ -z "$LANCHAN" ]; do
logger -s -t $log_label -p local4.info "Auto detecting LAN channel..."
for TLANCHAN in {1..16}; do
# Try to get the channel information; then get the MAC which is used for the channel
if ipmitool channel info $TLANCHAN 2> /dev/null | grep "$LAN_MED_TYPE" > /dev/null 2>&1 && ipmitool raw 0xc 2 $TLANCHAN 5 0 0 > /dev/null 2>&1; then
if ipmitool channel info $TLANCHAN 2> /dev/null | grep -E "$LAN_MED_TYPE" > /dev/null 2>&1 && ipmitool raw 0xc 2 $TLANCHAN 5 0 0 > /dev/null 2>&1; then
LANCHAN=$TLANCHAN
break;
fi;

View File

@ -15,10 +15,12 @@ from . import exceptions as xcat_exception
class RestSession(object):
def __init__(self):
def __init__(self, auth=None):
self.session = requests.Session()
self.cookies = None
self.auth = None
# If userid and password were passed in, use them for basic authorization
# This is required to connect to BMC with OP940 level, ignored for lower OP levels
self.auth = auth
def request(self, method, url, headers, data=None, timeout=30):

View File

@ -248,12 +248,12 @@ RSPCONFIG_APIS = {
EVENTLOG_URLS = {
"list": "/logging/enumerate",
"clear_all": "/logging/action/deleteAll",
"clear_all": "/logging/action/DeleteAll",
"resolve": "/logging/entry/{}/attr/Resolved",
}
RAS_POLICY_TABLE = "/opt/ibm/ras/lib/policyTable.json"
RAS_POLICY_MSG = "Install the OpenBMC RAS package to obtain more details logging messages."
RAS_POLICY_MSG = "Install the OpenBMC RAS package to obtain more detailed logging messages."
RAS_NOT_FOUND_MSG = " Not found in policy table: "
RESULT_OK = 'ok'
@ -279,7 +279,7 @@ class OpenBMCRest(object):
# print back to xcatd or just stdout
self.messager = kwargs.get('messager')
self.session = rest.RestSession()
self.session = rest.RestSession((self.username,self.password))
self.root_url = HTTP_PROTOCOL + self.bmcip + PROJECT_URL
self.download_root_url = HTTP_PROTOCOL + self.bmcip + '/'

View File

@ -25,6 +25,8 @@ use xCAT::TableUtils;
my $PYTHON_AGENT_FILE = "/opt/xcat/lib/python/agent/agent.py";
my $header = HTTP::Headers->new('Content-Type' => 'application/json');
# Currently not used, example of header to use for authorization
#my $header = HTTP::Headers->new('X-Auth-Token' => 'xfMHrrxdMgbiITnX0TlN');
sub new {
my $async = shift;
@ -44,8 +46,16 @@ sub send_request {
my $method = shift;
my $url = shift;
my $content = shift;
my $username = shift;
my $password = shift;
my $request = HTTP::Request->new( $method, $url, $header, $content );
if (defined $username and defined $password) {
# If username and password were passed in use authorization_basic()
# This is required to connect to BMC with OP940 level, ignored for
# lower OP levels
$request->authorization_basic($username, $password);
}
my $id = $async->add_with_opts($request, {});
return $id;
}

View File

@ -65,7 +65,7 @@ sub start {
if ($OS =~ /AIX/) {
$res_gmond = `/etc/rc.d/init.d/gmond restart 2>&1`;
} else {
$res_gmond = `/etc/init.d/gmond restart 2>&1`;
$res_gmond = `systemctl restart gmond 2>&1`;
}
my $tmp;
@ -90,9 +90,9 @@ sub start {
$res_gmetad = `/etc/rc.d/init.d/gmetad restart 2>&1`;
}
} else {
$tmp = `/etc/init.d/gmetad status | grep running`;
$tmp = `systemctl status gmetad| grep running`;
if (!$tmp) {
$res_gmetad = `/etc/init.d/gmetad restart 2>&1`;
$res_gmetad = `systemctl restart gmetad 2>&1`;
}
}
@ -166,7 +166,7 @@ sub start {
$result = `XCATBYPASS=Y $::XCATROOT/bin/xdsh $rec /etc/rc.d/init.d/gmond restart 2>&1`;
}
else {
$result = `XCATBYPASS=Y $::XCATROOT/bin/xdsh $rec /etc/init.d/gmond restart 2>&1`;
$result = `XCATBYPASS=Y $::XCATROOT/bin/xdsh $rec systemctl restart gmond 2>&1`;
}
}
@ -787,7 +787,7 @@ sub stop {
if ($OS =~ /AIX/) {
$res_gmond = `/etc/rc.d/init.d/gmond stop 2>&1`;
} else {
$res_gmond = `/etc/init.d/gmond stop 2>&1`;
$res_gmond = `systemctl stop gmond 2>&1`;
}
if ($?) {
if ($callback) {
@ -805,7 +805,7 @@ sub stop {
if ($OS =~ /AIX/) {
$res_gmetad = `/etc/rc.d/init.d/gmetad stop 2>&1`;
} else {
$res_gmetad = `/etc/init.d/gmetad stop 2>&1`;
$res_gmetad = `systemctl stop gmetad 2>&1`;
}
if ($?) {
@ -867,7 +867,7 @@ sub stop {
if ($OS =~ /AIX/) {
$result = `XCATBYPASS=Y $::XCATROOT/bin/xdsh $rec /etc/rc.d/init.d/gmond stop 2>&1`;
} else {
$result = `XCATBYPASS=Y $::XCATROOT/bin/xdsh $rec /etc/init.d/gmond stop 2>&1`;
$result = `XCATBYPASS=Y $::XCATROOT/bin/xdsh $rec systemctl stop gmond 2>&1`;
}
}

View File

@ -1160,8 +1160,10 @@ sub bmcdiscovery_ipmi {
$mtm = '' if ($mtm =~ /^0+$/);
$serial = '' if ($serial =~ /^0+$/);
unless (($mtm or $serial) or $ipmac{$ip}) {
xCAT::MsgUtils->message("W", { data => ["BMC Type/Model and/or Serial and MAC Address is unavailable for $ip"] }, $::CALLBACK);
# To constract a node name need either mac or both mtm and serial
# Exit if mac AND one of mtm or serial is missing
if (!($mtm and $serial) and !$ipmac{$ip}) {
xCAT::MsgUtils->message("W", { data => ["BMC Type/Model and Serial or MAC Address is unavailable for $ip"] }, $::CALLBACK);
return;
}
@ -1292,8 +1294,10 @@ sub bmcdiscovery_openbmc{
$mtm = '' if ($mtm =~ /^0+$/);
$serial = '' if ($serial =~ /^0+$/);
unless (($mtm or $serial) or $ipmac{$ip}) {
xCAT::MsgUtils->message("W", { data => ["Could not obtain Valid Model Type and/or Serial Number and MAC Address for BMC at $ip"] }, $::CALLBACK);
# To constract a node name need either mac or both mtm and serial
# Exit if mac AND one of mtm or serial is missing
if (!($mtm and $serial) and !$ipmac{$ip}) {
xCAT::MsgUtils->message("W", { data => ["BMC Type/Model and Serial or MAC Address is unavailable for $ip"] }, $::CALLBACK);
return;
}

View File

@ -33,7 +33,7 @@ $::KITFRAMEWORK = "2";
$::COMPATIBLE_KITFRAMEWORKS = "0,1,2";
my $debianflag = 0;
my $tempstring = xCAT::Utils->osver();
my $tempstring = xCAT::Utils->osver(all);
if ($tempstring =~ /debian/ || $tempstring =~ /ubuntu/) {
$debianflag = 1;
@ -99,6 +99,12 @@ sub process_request
$::PID = $$;
}
my ($sysos, $sysver) = split /,/, $tempstring;
if ( ($sysos =~ /rh/) && ($sysver ge 8) ) {
$callback->({ error => ["KITs are not supported on rhel8 or above"], errorcode => [1] });
return 1;
}
my $command = $request->{command}->[0];
my $rc;

View File

@ -49,7 +49,6 @@ if (Sys::Virt->VERSION =~ /^0\.[10]\./) {
use XML::Simple;
$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
use Data::Dumper;
use POSIX "WNOHANG";
use Storable qw(freeze thaw store_fd fd_retrieve);
use IO::Select;
@ -3887,20 +3886,12 @@ sub process_request {
$confdata = {};
unless ($command eq 'rscan') {
xCAT::VMCommon::grab_table_data($noderange, $confdata, $callback);
# Add debug info for issue 1958, the rmvm issue
my $test_file_fd;
open($test_file_fd, ">> $::XCATROOT//share/xcat/tools/autotest/result/$command.$$.rec");
print $test_file_fd "====================start==========================\n";
my $kvmdatatab = xCAT::Table->new("kvm_nodedata", -create => 0); #grab any pertinent pre-existing xml
if ($kvmdatatab) {
$confdata->{kvmnodedata} = $kvmdatatab->getNodesAttribs($noderange, [qw/xml/]);
print $test_file_fd Dumper($confdata->{kvmnodedata});
} else {
$confdata->{kvmnodedata} = {};
print $test_file_fd "***Error: Can not open kvm_nodedata table==\n";
}
print $test_file_fd "====================end==========================\n";
close $test_file_fd;
}
if ($command eq 'mkvm' or ($command eq 'clonevm' and (grep { "$_" eq '-b' } @exargs)) or ($command eq 'rpower' and (grep { "$_" eq "on" or $_ eq "boot" or $_ eq "reset" } @exargs))) {
xCAT::VMCommon::requestMacAddresses($confdata, $noderange);

View File

@ -205,7 +205,7 @@ my %status_info = (
},
REVENTLOG_CLEAR_REQUEST => {
method => "POST",
init_url => "$openbmc_project_url/logging/action/deleteAll",
init_url => "$openbmc_project_url/logging/action/DeleteAll",
data => "[]",
},
REVENTLOG_CLEAR_RESPONSE => {
@ -269,7 +269,7 @@ my %status_info = (
RFLASH_SET_PRIORITY_REQUEST => {
method => "PUT",
init_url => "$openbmc_project_url/software",
data => "false", # Priority state of 0 sets image to active
data => "0", # Priority state of 0 sets image to active
},
RFLASH_SET_PRIORITY_RESPONSE => {
process => \&rflash_response,
@ -2452,7 +2452,7 @@ sub gen_send_request {
}
process_debug_info($node, $debug_info);
}
my $handle_id = xCAT::OPENBMC->send_request($async, $method, $request_url, $content);
my $handle_id = xCAT::OPENBMC->send_request($async, $method, $request_url, $content, $node_info{$node}{username}, $node_info{$node}{password});
$handle_id_node{$handle_id} = $node;
$node_info{$node}{cur_status} = $next_status{ $node_info{$node}{cur_status} };
@ -2576,9 +2576,9 @@ sub deal_with_response {
# Set attribute call returned with 404, display an error
$error = "$::RESPONSE_NOT_FOUND - Requested endpoint does not exist or may indicate function is not supported on this OpenBMC firmware.";
} elsif ($node_info{$node}{cur_status} eq "RSPCONFIG_API_CONFIG_QUERY_RESPONSE") {
# Query attribute call came back with 404. If this is for Power Supply Redundency,
# Query attribute call came back with 404. If this is for PowerSupplyRedundancy,
# send request with a new path RSPCONFIG_GET_PSR_REQUEST, response processing will print the value
if ($response_info->{'data'}->{'description'} =~ /PowerSupplyRedundancy/) {
if ($::RSPCONFIG_CONFIGURED_API_KEY eq "RSPCONFIG_POWERSUPPLY_REDUNDANCY") {
$node_info{$node}{cur_status} = "RSPCONFIG_GET_PSR_REQUEST";
$next_status{RSPCONFIG_GET_PSR_REQUEST} = "RSPCONFIG_GET_PSR_RESPONSE";
gen_send_request($node);
@ -2621,6 +2621,66 @@ sub deal_with_response {
#-------------------------------------------------------
=head3 mask_password2
return a string with masked password
This function is usefull when password is easily known
and can be passed into this function
Input:
$string: string containing password the needs masking
$password: password to mask
=cut
#-------------------------------------------------------
sub mask_password2 {
my $string = shift;
my $password = shift;
# Replace all occurences of password string with "xxxxxx"
$string =~ s/$password/xxxxxx/g;
return $string;
}
#-------------------------------------------------------
=head3 mask_password
return a string with masked password
This function is usefull when password is not easily known
and is only expected to be part of URL like "https://<user>:<pw>@...."
Input:
$string: string containing password the needs masking
=cut
#-------------------------------------------------------
sub mask_password {
my $string = shift;
# Replace password string with "xxxxxx", if part of URL
# Password is between ":" and "@" found in the string after "https://"
#
my $url_start = index($string,"https://");
if ($url_start > 0) {
my $colon_index = index($string, ":", $url_start+length("https://"));
if ($colon_index > 0) {
my $at_index = index($string, "@", $colon_index);
if ($at_index > 0) {
# Replace string beteen ":" and "@" with "xxxxxx" to mask password
substr($string, $colon_index+1, $at_index-$colon_index-1) = "xxxxxx";
}
}
}
return $string;
}
#-------------------------------------------------------
=head3 process_debug_info
print debug info and add to log
@ -2639,6 +2699,7 @@ sub process_debug_info {
$debug_msg = "";
}
$debug_msg = mask_password($debug_msg);
xCAT::SvrUtils::sendmsg("$flag_debug $debug_msg", $callback, $ts_node);
xCAT::MsgUtils->trace(0, "D", "$flag_debug $node $debug_msg");
}
@ -3785,7 +3846,7 @@ sub rspconfig_response {
if ($node_info{$node}{cur_status} eq "RSPCONFIG_PASSWD_VERIFY") {
if ($status_info{RSPCONFIG_PASSWD_VERIFY}{argv} ne $node_info{$node}{password}) {
xCAT::SvrUtils::sendmsg("Current BMC password is incorrect, cannot set the new password.", $callback, $node);
xCAT::SvrUtils::sendmsg([1, "Current BMC password is incorrect, cannot set the new password."], $callback, $node);
$wait_node_num--;
return;
}
@ -4212,7 +4273,7 @@ sub rspconfig_dump_response {
sub dump_download_process {
my $node = shift;
my $request_url = "$http_protocol://" . $node_info{$node}{bmc};
my $request_url = "$http_protocol://" . $node_info{$node}{username} . ":" . $node_info{$node}{password} . "@" . $node_info{$node}{bmc};
my $content_login = '{ "data": [ "' . $node_info{$node}{username} .'", "' . $node_info{$node}{password} . '" ] }';
my $content_logout = '{ "data": [ ] }';
my $cjar_id = "/tmp/_xcat_cjar.$node";
@ -4235,12 +4296,12 @@ sub dump_download_process {
my $curl_login_result = `$curl_login_cmd -s`;
my $h;
if (!$curl_login_result) {
xCAT::SvrUtils::sendmsg([1, "Did not receive response from OpenBMC after running command '$curl_login_cmd'"], $callback, $node);
xCAT::SvrUtils::sendmsg([1, "Did not receive response from OpenBMC after running command '" . mask_password2($curl_login_cmd, $node_info{$node}{password}) . "'"], $callback, $node);
return 1;
}
eval { $h = from_json($curl_login_result) };
if ($@) {
xCAT::SvrUtils::sendmsg([1, "Received wrong format response for command '$curl_login_cmd': $curl_login_result)"], $callback, $node);
xCAT::SvrUtils::sendmsg([1, "Received wrong format response for command '" . mask_password2($curl_login_cmd, $node_info{$node}{password}) . "': $curl_login_result)"], $callback, $node);
return 1;
}
if ($h->{message} eq $::RESPONSE_OK) {
@ -4876,7 +4937,7 @@ sub rflash_response {
sub rflash_upload {
my ($node, $callback) = @_;
my $request_url = "$http_protocol://" . $node_info{$node}{bmc};
my $request_url = "$http_protocol://" . $node_info{$node}{username} . ":" . $node_info{$node}{password} . "@" . $node_info{$node}{bmc};
my $content_login = '{ "data": [ "' . $node_info{$node}{username} .'", "' . $node_info{$node}{password} . '" ] }';
my $content_logout = '{ "data": [ ] }';
my $cjar_id = "/tmp/_xcat_cjar.$node";
@ -4900,7 +4961,7 @@ sub rflash_upload {
my $curl_login_result = `$curl_login_cmd -s`;
my $h;
if (!$curl_login_result) {
my $curl_error = "$::FAILED_UPLOAD_MSG. Did not receive response from OpenBMC after running command '$curl_login_cmd'";
my $curl_error = "$::FAILED_UPLOAD_MSG. Did not receive response from OpenBMC after running command '" . mask_password2($curl_login_cmd, $node_info{$node}{password}) . "'";
xCAT::SvrUtils::sendmsg([1, "$curl_error"], $callback, $node);
print RFLASH_LOG_FILE_HANDLE "$curl_error\n";
$node_info{$node}{rst} = "$curl_error";
@ -4908,7 +4969,7 @@ sub rflash_upload {
}
eval { $h = from_json($curl_login_result) }; # convert command output to hash
if ($@) {
my $curl_error = "$::FAILED_UPLOAD_MSG. Received wrong format response for command '$curl_login_cmd': $curl_login_result";
my $curl_error = "$::FAILED_UPLOAD_MSG. Received wrong format response for command '" . mask_password2($curl_login_cmd, $node_info{$node}{password}) . "': $curl_login_result";
xCAT::SvrUtils::sendmsg([1, "$curl_error"], $callback, $node);
# Before writing error to log, make it a single line
$curl_error =~ tr{\n}{ };
@ -4944,7 +5005,7 @@ sub rflash_upload {
}
my $curl_upload_result = `$upload_cmd`;
if (!$curl_upload_result) {
my $curl_error = "$::FAILED_UPLOAD_MSG. Did not receive response from OpenBMC after running command '$upload_cmd'";
my $curl_error = "$::FAILED_UPLOAD_MSG. Did not receive response from OpenBMC after running command '" . mask_password($upload_cmd) . "'";
xCAT::SvrUtils::sendmsg([1, "$curl_error"], $callback, $node);
print RFLASH_LOG_FILE_HANDLE "$curl_error\n";
$node_info{$node}{rst} = "$curl_error";
@ -4952,7 +5013,7 @@ sub rflash_upload {
}
eval { $h = from_json($curl_upload_result) }; # convert command output to hash
if ($@) {
my $curl_error = "$::FAILED_UPLOAD_MSG. Received wrong format response from command '$upload_cmd': $curl_upload_result";
my $curl_error = "$::FAILED_UPLOAD_MSG. Received wrong format response from command '" . mask_password($upload_cmd) ."': $curl_upload_result";
xCAT::SvrUtils::sendmsg([1, "$curl_error"], $callback, $node);
# Before writing error to log, make it a single line
$curl_error =~ tr{\n}{ };

View File

@ -362,6 +362,8 @@ sub rinstall {
# We got an error with the nodeset
my @successnodes;
my @failurenodes;
my @failuresns;
my $snfailure;
# copy into a temporary variable to avoid of circular reference
my @lines = @$res;
foreach my $line (@lines) {
@ -384,9 +386,39 @@ sub rinstall {
}
return 1;
}
if ($line =~ /Unable to dispatch hierarchical sub-command to (\S+):3001/) {
$snfailure=1;
push @failuresns,$1;
}
xCAT::MsgUtils->message("I", $rsp, $callback);
}
# if only provision one node and failed nodeset, will exit the command
# instead of continue with rnetboot/rsetboot, rpower.
if ( (scalar(@nodes) == 1) ) {
#exit the command if it's service node failure
if ($snfailure) {
my $node = $nodes[0];
my $nrtab = xCAT::Table->new('noderes');
my $nrents = $nrtab->getNodeAttribs($node, [qw(servicenode)]);
my $nodesn = $nrents->{servicenode};
foreach my $tmpsn (@failuresns) {
if ($nodesn eq $tmpsn) {
$rsp->{error}->[0] = "Unable connect to Service node $nodesn, failed to run 'nodeset' against the node: @nodes";
$rsp->{errorcode}->[0] = 1;
xCAT::MsgUtils->message("E", $rsp, $callback);
return 1;
}
}
} else {
$rsp->{error}->[0] = "Failed to run 'nodeset' against the node: @nodes";
$rsp->{errorcode}->[0] = 1;
xCAT::MsgUtils->message("E", $rsp, $callback);
return 1;
}
}
foreach my $node (@failurenodes) {
delete $nodes{$node};
}

View File

@ -0,0 +1,11 @@
@^minimal-environment
chrony
net-tools
nfs-utils
openssh-server
rsync
util-linux
wget
python3
tar
bzip2

View File

@ -0,0 +1,59 @@
#version=CentOS8
# Use text install
text
# Use network installation
%include /tmp/repos
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Network information
#KICKSTARTNET#
# Root password
rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password#
# Not run the Setup Agent on first boot
firstboot --disable
# Do not configure the X Window System
skipx
# System services
#services --enabled="chronyd"
# System timezone
timezone #TABLE:site:key=timezone:value# --isUtc
# Partition clearing information
zerombr
clearpart --all --initlabel
#XCAT_PARTITION_START#
%include /tmp/partitionfile
#XCAT_PARTITION_END#
# Do not configure any iptables rules
firewall --disable
selinux --disable
reboot
%packages
#INCLUDE_DEFAULT_PKGLIST#
%end
%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
%end
%pre
{
echo "Running Kickstart Pre-installation script..."
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/pre.rhels8#
} &>>/tmp/pre-install.log
%end
%post --interpreter=/bin/bash
mkdir -p /var/log/xcat/
cat /tmp/pre-install.log >>/var/log/xcat/xcat.log
{
echo "Running Kickstart Post-installation script..."
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.xcat.ng#
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.rhels8#
} &>>/var/log/xcat/xcat.log
%end

View File

@ -0,0 +1 @@
../rh/compute.rhels8.ppc64le.exlist

View File

@ -0,0 +1 @@
../rh/compute.rhels8.ppc64le.pkglist

View File

@ -0,0 +1 @@
../rh/compute.rhels8.ppc64le.postinstall

View File

@ -0,0 +1 @@
../rh/compute.rhels8.x86_64.exlist

View File

@ -0,0 +1 @@
../rh/compute.rhels8.x86_64.pkglist

View File

@ -0,0 +1 @@
../rh/compute.rhels8.x86_64.postinstall

View File

@ -2,7 +2,7 @@
#
# go-xcat - Install xCAT automatically.
#
# Version 1.0.41
# Version 1.0.44
#
# Copyright (C) 2016 - 2019 International Business Machines
# Eclipse Public License, Version 1.0 (EPL-1.0)
@ -23,8 +23,10 @@
# - xCAT uninstallation
# 2019-03-22 GONG Jie <gongjie@linux.vnet.ibm.com>
# - Better debug log when reading repository failed
# 2019-07-24 Mark Gurevich <gurevich@us.ibm.com>
# - Removed references to buildkit
# 2019-08-15 Mark Gurevich <gurevich@us.ibm.com>
# - Added conserver-xcat to uninstall list
# 2019-10-23 Mark Gurevich <gurevich@us.ibm.com>
# - Display a list of packages that could not be uninstalled
#
function usage()
@ -163,24 +165,26 @@ GO_XCAT_CORE_PACKAGE_LIST=()
GO_XCAT_DEP_PACKAGE_LIST=()
# The package list of all the packages should be installed
GO_XCAT_INSTALL_LIST=(perl-xCAT xCAT xCAT-client
GO_XCAT_INSTALL_LIST=(perl-xCAT xCAT xCAT-buildkit xCAT-client
xCAT-genesis-scripts-ppc64 xCAT-genesis-scripts-x86_64 xCAT-server
elilo-xcat grub2-xcat ipmitool-xcat syslinux-xcat
xCAT-genesis-base-ppc64 xCAT-genesis-base-x86_64 xnba-undi yaboot-xcat)
# For Debian/Ubuntu, it will need a sightly different package list
# For Debian/Ubuntu, it will need a sight different package list
type dpkg >/dev/null 2>&1 &&
GO_XCAT_INSTALL_LIST=(perl-xcat xcat xcat-client
GO_XCAT_INSTALL_LIST=(perl-xcat xcat xcat-buildkit xcat-client
xcat-genesis-scripts-amd64 xcat-genesis-scripts-ppc64 xcat-server
elilo-xcat grub2-xcat ipmitool-xcat syslinux-xcat
xcat-genesis-base-amd64 xcat-genesis-base-ppc64 xnba-undi)
# The package list of all the packages should be installed
# The package list of all the packages should be uninstalled
GO_XCAT_UNINSTALL_LIST=("${GO_XCAT_INSTALL_LIST[@]}"
goconserver xCAT-SoftLayer xCAT-confluent xCAT-csm xCAT-genesis-builder
xCAT-openbmc-py xCAT-probe xCAT-test xCAT-vlan xCATsn xCAT-UI-deps)
xCAT-openbmc-py xCAT-probe xCAT-test xCAT-vlan xCATsn xCAT-UI-deps
xCAT-buildkit conserver-xcat)
# For Debian/Ubuntu, it will need a sight different package list
type dpkg >/dev/null 2>&1 &&
GO_XCAT_UNINSTALL_LIST=("${GO_XCAT_INSTALL_LIST[@]}"
goconserver xcat-confluent xcat-probe xcat-test xcat-vlan xcatsn)
goconserver xcat-confluent xcat-probe xcat-test xcat-vlan xcatsn
xcat-buildkit conserver-xcat)
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
export PATH
@ -1574,6 +1578,7 @@ function remove_package_apt()
local -a yes=()
[[ "$1" = "-y" ]] && yes=("-y") && shift
apt-get --allow-unauthenticated remove "${yes[@]}" "$@"
warn_if_bad "$?" "Unable to remove xCAT packages: "`apt --installed list 2>&1 | grep xcat | cut -d '/' -f 1`
}
function remove_package()
@ -1588,6 +1593,7 @@ function purge_package_apt()
local -a yes=()
[[ "$1" = "-y" ]] && yes=("-y") && shift
apt-get --allow-unauthenticated purge "${yes[@]}" "$@"
warn_if_bad "$?" "Unable to purge xCAT packages: "`apt --installed list 2>&1 | grep xcat | cut -d '/' -f 1`
}
function purge_package_others()
@ -2090,22 +2096,17 @@ case "${GO_XCAT_ACTION}" in
debug_logger <<-EOF
xCAT has been completely uninstalled!
xCAT has been uninstalled.
To install again - https://xcat.org/download.html
EOF
;;
"uninstall")
debug_trace uninstall_xcat -y
boo_boo_if_bad "$?"
debug_logger <<-EOF
xCAT has been uninstalled!
==========================
If you intend to install xCAT again, please follow the guideline on the
xcat.org website.
https://xcat.org/download.html
xCAT has been uninstalled.
To install again - https://xcat.org/download.html
EOF
;;
esac

View File

@ -1,6 +1,9 @@
SN_setup_case
tabdump_servicenode
reg_linux_diskless_installation_hierarchy
tabdump_servicenode
reg_linux_diskfull_installation_hierarchy
tabdump_servicenode
updatenode_P_script1
updatenode_P_script1_script2
updatenode_P_script2
@ -22,6 +25,7 @@ updatenode_syncfile_MERGE
updatenode_v
updatenode_without_flag
updatenode_without_options
tabdump_servicenode
xdcp_nonroot_user
xdcp_src_dst
xdsh_E
@ -37,6 +41,7 @@ xdsh_permission_denied
xdsh_q
xdsh_regular_command
xdsh_t
tabdump_servicenode
assign_certain_command_permission
chdef_dynamic_group
chdef_group
@ -52,21 +57,25 @@ chdef_t_network
chdef_t_node
chdef_t_o_error
chdef_z
tabdump_servicenode
chtab_d
chtab_h
chtab_modify_key
chtab_modify_node
chtab_null
chtab_v
tabdump_servicenode
confignetwork_secondarynic_nicips_updatenode_false
confignetwork_secondarynic_nicnetworks_updatenode_false
confignetwork_secondarynic_nictype_updatenode_false
tabdump_servicenode
copycds_a
copycds_a_err
copycds_iso
copycds_n
copycds_n_a
copycds_n_err
tabdump_servicenode
disable_root_permission_in_policy_table
dumpxCATdb_a_p_nullskiptables
dumpxCATdb_a_p_nullskiptables_V
@ -77,10 +86,12 @@ dumpxCATdb_p_nullskiptables
dumpxCATdb_p_nullskiptables_V
dumpxCATdb_p_skiptables
dumpxCATdb_v
tabdump_servicenode
encrypted_passwd_md5_diskfull
encrypted_passwd_openssl_diskfull
encrypted_passwd_sha256_diskfull
encrypted_passwd_sha512_diskfull
tabdump_servicenode
gettab_H
gettab_err
gettab_h
@ -88,6 +99,7 @@ gettab_key_table
getmacs_d
getmacs_f_D
getmacs_noderange
tabdump_servicenode
lsdef_a
lsdef_null
lsdef_t
@ -99,6 +111,7 @@ lsdef_t_w
lslite_h
lslite_i
lslite_noderange
tabdump_servicenode
lsxcatd_a
lsxcatd_d
lsxcatd_h
@ -108,11 +121,13 @@ makedhcp_a_d
makedhcp_d
makedhcp_n
makedhcp_remote_network
tabdump_servicenode
makedns
makedns_d_node
makedns_h
makedns_n
makedns_n_noderange
tabdump_servicenode
makehost_n_r
makehosts_d
makehosts_h
@ -122,6 +137,7 @@ makehosts_n
makehosts_n_noderange
makehosts_null
makeknownhosts_node_d
tabdump_servicenode
makentp_h
makentp_v
mkdef_null
@ -132,12 +148,14 @@ mkdef_regex_nicsip
mkdef_rhels73
mkdef_t_o_error
mkdef_z
tabdump_servicenode
nodeadd_err_symbol
nodeadd_h
nodeadd_noderange
nodeadd_noderange_nodetype
nodeadd_null
nodeadd_v
tabdump_servicenode
nodech_delete
nodech_error_node
nodech_error_table
@ -154,10 +172,12 @@ nodech_noderange_table_include
nodech_noderange_table_unequal
nodech_noderange_table_uninclude
nodech_v
tabdump_servicenode
nodegrpch_err
nodegrpch_groups
nodegrpch_h
nodegrpch_v
tabdump_servicenode
nodels_H
nodels_S
nodels_b
@ -178,6 +198,7 @@ nodels_table_include
nodels_tablevalue
nodels_tablevalue_tablecolumn
nodels_v
tabdump_servicenode
noderange_10-20
noderange_XCAT_NODE_PREFIX
noderange_XCAT_NODE_SUFFIX
@ -191,6 +212,7 @@ noderm_err_node
noderm_h
noderm_noderange
noderm_null
tabdump_servicenode
nodeset_check_warninginfo
nodeset_errorcommand
nodeset_grub2
@ -199,6 +221,7 @@ nodeset_yaboot
nodeset_stat
nodestat_err_node
nodestat_usage
tabdump_servicenode
packimage_h
packimage_v
pping_h
@ -219,11 +242,13 @@ regnotif_h
regnotif_null
regnotif_o
regnotif_v
tabdump_servicenode
restorexCAT_h
restorexCATdb_a_p_V
restorexCATdb_p_V
restorexCATdb_v
restorexCATdb_wrongpath
tabdump_servicenode
rinv_all
rinv_bus
rinv_config
@ -233,6 +258,7 @@ rinv_serial
rinv_noderange_err
rmdef_null
rmdef_t_err
tabdump_servicenode
rpower_boot
rpower_err_noderange
rpower_noderange
@ -240,17 +266,24 @@ rpower_noderange_nodeps
rpower_off
rpower_on
rpower_stat
tabdump_servicenode
rscan_noderange
tabdump_servicenode
rscan_w
tabdump_servicenode
rscan_x
rscan_x_w
tabdump_servicenode
rscan_z
rscan_z_w
tabdump_servicenode
run_command_with_XCATBYPASS
runcmdinstaller_h
tabdump_servicenode
rvitals_all
rvitals_lcds
rvitals_noderange_err
tabdump_servicenode
tabdump_d
tabdump_d_nodehm
tabdump_f_d
@ -266,6 +299,7 @@ tabdump_w_lt
tabdump_w_match
tabdump_w_ne
tabdump_w_notmatch
tabdump_servicenode
tabgrep_err
tabgrep_h
tabgrep_node
@ -281,6 +315,7 @@ tabrestore_err
tabrestore_h
tabrestore_null
tabrestore_table
tabdump_servicenode
unregnotif_f
unregnotif_h
unregnotif_null
@ -290,6 +325,7 @@ xcatconfig_u_check_xcatsslversion_rhels_sles
xcatd_restart
xcatd_start
xcatd_stop
tabdump_servicenode
xcatstanzafile_attribute
xcatstanzafile_colon
xcatstanzafile_defaultvalue
@ -298,3 +334,4 @@ xcatstanzafile_normal
xcatstanzafile_objtype
xcatstanzafile_specificvalue
xcatstanzafile_tab
tabdump_servicenode

View File

@ -1,13 +1,13 @@
start:rspconfig_record_firmware_level
description: Record the firmware level for the start of each testcase
description: Record the firmware level for the start of each testcase to display in the output
hcp:openbmc
label:cn_bmc_ready,hctrl_openbmc
cmd: rinv $$CN firm
check:rc==0
end
start:rspconfig_get_all
description: Check that we can get all the attributes from the BMC
start:rspconfig_get_all_network
description: Check that we can get all the network related attributes from the BMC
os:Linux
hcp:openbmc
label:cn_bmc_ready,hctrl_openbmc
@ -70,7 +70,168 @@ check:output=~$$CN: BMC Setting BMC Hostname...
cmd:rspconfig $$CN hostname
check:rc==0
check:output=~$$CN: BMC Hostname:
cmd:rm /tmp/xcattest.rspconfig.hostname
AutoReboot
check:rc==0
end
start:rspconfig_admin_passwd_error
description: Check the error handling for changing of BMC password
hcp: openbmc
label:cn_bmc_ready,hctrl_openbmc
cmd: rspconfig $$CN admin_passwd=abc
check:rc==1
check:output=~$$CN: Error: Invalid parameter for option admin_passwd: abc
cmd: rspconfig $$CN admin_passwd=abc,xyz
check:rc==1
check:output=~Current BMC password is incorrect, cannot set the new password.
end
start:rspconfig_admin_passwd
description: Check the setting of BMC password to the same value
hcp: openbmc
label:cn_bmc_ready,hctrl_openbmc
cmd: rspconfig $$CN admin_passwd=0penBmc,0penBmc
check:rc==0
check:output=~$$CN: BMC Setting Password
end
start:rspconfig_autoreboot
description: Check the getting and setting of autoreboot attribute
hcp: openbmc
label:cn_bmc_ready,hctrl_openbmc
cmd: rspconfig $$CN autoreboot
check:rc==0
check:output=~$$CN: BMC AutoReboot
cmd: rspconfig $$CN autoreboot=0
check:rc==0
check:output=~$$CN: BMC Setting BMC AutoReboot
cmd: rspconfig $$CN autoreboot=1
check:rc==0
check:output=~$$CN: BMC Setting BMC AutoReboot
cmd: rspconfig $$CN autoreboot=
check:rc==1
check:output=~$$CN: Error: Invalid value '' for 'autoreboot', Valid values: 0,1
cmd: rspconfig $$CN autoreboot=2
check:rc==1
check:output=~$$CN: Error: Invalid value '2' for 'autoreboot', Valid values: 0,1
end
start:rspconfig_bootmode
description: Check the getting and setting of bootmode attribute
hcp: openbmc
label:cn_bmc_ready,hctrl_openbmc
cmd: rspconfig $$CN bootmode=safe
check:rc==0
check:output=~$$CN: BMC Setting BMC BootMode
cmd: rspconfig $$CN bootmode
check:rc==0
check:output=~$$CN: BMC BootMode: Safe
cmd: rspconfig $$CN bootmode=regular
check:rc==0
check:output=~$$CN: BMC Setting BMC BootMode
cmd: rspconfig $$CN bootmode=abc
check:rc==1
check:output=~$$CN: Error: Invalid value 'abc' for 'bootmode', Valid values: regular,safe,setup
end
start:rspconfig_dump
description: Check dump generation, download and removal
hcp: openbmc
label:cn_bmc_ready,hctrl_openbmc
#Clear old dumps for this node
cmd: rm -f /var/log/xcat/dump/*$$CN*
#Generate new dump
cmd: rspconfig $$CN dump
check:rc==0
check:output=~Capturing BMC Diagnostic information, this will take some time
check:output=~$$CN: Dump requested. Target ID is
check:output=~Downloading dump
#Verify dump was downloaded to proper directory
cmd: ls -l /var/log/xcat/dump/*$$CN*
check:rc==0
#Remove last generated dump
cmd: rspconfig mid05tor12cn03 dump -l | tail -1 | cut -d ' ' -f2 | tr -d "[]" | xargs -i{} rspconfig $$CN dump -c {}
check:rc==0
check:output=clear
end
start:rspconfig_ntpservers
description: Check the getting and setting of ntpservers attribute
hcp: openbmc
label:cn_bmc_ready,hctrl_openbmc
cmd: rspconfig $$CN ntpservers
check:rc==0
check:output=~$$CN: BMC NTP Servers
cmd: rspconfig $$CN ntpservers=1.1.1.1
check:rc==0
check:output=~$$CN: BMC NTP Servers: 1.1.1.1
cmd: rspconfig $$CN ntpservers=
check:rc==0
check:output=~$$CN: BMC NTP Servers: None
end
start:rspconfig_powerrestorepolicy
description: Check the getting and setting of powerrestorepolicy attribute
hcp: openbmc
label:cn_bmc_ready,hctrl_openbmc
cmd: rspconfig $$CN powerrestorepolicy
check:rc==0
check:output=~$$CN: BMC PowerRestorePolicy
cmd: rspconfig $$CN powerrestorepolicy=always_on
check:rc==0
check:output=~$$CN: BMC Setting BMC PowerRestorePolicy
cmd: rspconfig $$CN powerrestorepolicy=always_off
check:rc==0
check:output=~$$CN: BMC Setting BMC PowerRestorePolicy
cmd: rspconfig $$CN powerrestorepolicy=restore
check:rc==0
check:output=~$$CN: BMC Setting BMC PowerRestorePolicy
cmd: rspconfig $$CN powerrestorepolicy
check:rc==0
check:output=~$$CN: BMC PowerRestorePolicy: Restore
cmd: rspconfig $$CN powerrestorepolicy=
check:rc==1
check:output=~$$CN: Error: Invalid value '' for 'powerrestorepolicy', Valid values: always_off,always_on,restore
cmd: rspconfig $$CN powerrestorepolicy=abc
check:rc==1
check:output=~$$CN: Error: Invalid value 'abc' for 'powerrestorepolicy', Valid values: always_off,always_on,restore
end
start:rspconfig_powersupplyredundancy
description: Check the getting and setting of powersupplyredundancy attribute
hcp: openbmc
label:cn_bmc_ready,hctrl_openbmc
cmd: rspconfig $$CN powersupplyredundancy=disabled
check:rc==1
check:output=~Error: 404 Not Found - Requested endpoint does not exist or may indicate function is not supported on this OpenBMC firmware.
cmd: rspconfig $$CN powersupplyredundancy
check:rc==0
check:output=~$$CN: BMC PowerSupplyRedundancy: Disabled
end
start:rspconfig_sshcfg
description: Check the copying of ssh keys to the BMC
hcp: openbmc
label:cn_bmc_ready,hctrl_openbmc
cmd: rspconfig $$CN sshcfg
check:rc==0
check:output=~$$CN: ssh keys copied to
end
start:rspconfig_timesyncmethod
description: Check the getting and setting of timesyncmethod attribute
hcp: openbmc
label:cn_bmc_ready,hctrl_openbmc
cmd: rspconfig $$CN timesyncmethod=manual
check:rc==0
check:output=~$$CN: BMC Setting BMC TimeSyncMethod
cmd: rspconfig $$CN timesyncmethod
check:rc==0
check:output=~$$CN: BMC TimeSyncMethod: Manual
cmd: rspconfig $$CN timesyncmethod=ntp
check:rc==0
check:output=~$$CN: BMC Setting BMC TimeSyncMethod
cmd: rspconfig $$CN timesyncmethod=abc
check:rc==1
check:output=~$$CN: Error: Invalid value 'abc' for 'timesyncmethod', Valid values: manual,ntp
end

View File

@ -43,6 +43,7 @@ function check_destiny() {
runcmd $cmd;
cmd="makenetworks";
runcmd $cmd;
ip addr show
makehosts ${TESTNODE}
grep ${TESTNODE} /etc/hosts
cmd="nodeset ${TESTNODE} shell";

View File

@ -31,6 +31,8 @@ stop:yes
cmd:arc_all=`uname -a`; code=`lsb_release -sc`;if [[ $arc_all =~ "ppc64le" ]]; then arch="ppc64el";else arch="x86_64";fi; cp "/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-$arch.sources.list" "/etc/apt/sources.list"
cmd:apt-get clean;apt-get update
check:rc==0
cmd:arc_all=`uname -a`; if [[ $arc_all =~ "x86_64" ]]; then echo '* libraries/restart-without-asking boolean true' | debconf-set-selections; fi
cmd:debconf-show libssl1.1
cmd:cp /core-*-snap.tar.bz2 /install_xCAT_xcat-core.tar.bz2
check:rc==0
cmd:cp /xcat-dep*.tar.bz2 /install_xCAT_xcat-dep.tar.bz2

View File

@ -47,6 +47,7 @@ check:rc==0
cmd:chdef -t node $$CN -p postscripts=enablekdump
check:rc==0
cmd:rmimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
@ -70,7 +71,11 @@ check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$CN "echo 'echo 1 > /proc/sys/kernel/sysrq; echo c > /proc/sysrq-trigger' > /tmp/kdump.trigger"
cmd:xdsh $$CN "chmod 755 /tmp/kdump.trigger"
cmd:xdsh $$CN "rpm -q at"
cmd:xdsh $$CN "service atd start"
check:rc==0
cmd:xdsh $$CN "at now +1 minutes <<< /tmp/kdump.trigger"
cmd:sleep 300

View File

@ -43,6 +43,7 @@ cmd:xdsh $$CN "apt-get clean all"
check:rc==0
cmd:xdsh $$CN "apt-get update"
check:rc==0
cmd:arc_all=`uname -a`; if [[ $arc_all =~ "x86_64" ]]; then xdsh $$CN "echo '* libraries/restart-without-asking boolean true' | debconf-set-selections"; fi
cmd:xdsh $$CN "apt-get -y install build-essential dpkg-dev dh-make debhelper fakeroot gnupg lintian pbuilder quilt reprepro libsoap-lite-perl libdbi-perl"
check:rc==0
cmd:xdsh $$CN "rm -rf /oldxcat"

View File

@ -223,6 +223,7 @@ check:rc!=0
cmd:chdef -t node -o testnode1 ip=
check:rc==0
cmd:cp -f /etc/hosts.xcattestbak /etc/hosts
cmd:sleep 2
cmd:getent hosts testnode1 | grep testnode1
check:rc!=0
cmd:nodeset testnode1 osimage=rhels6.99-x86_64-install-compute

View File

@ -24,6 +24,7 @@ end
start:rscan_w
label:others,hctrl_hmc
hcp:hmc
cmd:lsdef -t node all -z > /tmp/all.stanza
cmd:lsdef -t node -l $$CN -z > /tmp/$$CN.stanza
check:rc==0
cmd:perl -pi -e 's/$$CN/testnode/g' /tmp/$$CN.stanza
@ -37,14 +38,16 @@ check:output=~hmc\s+__GETNODEATTR($$CN,hcp)__+\s+\w{4}-\w{3}\s+\w{7}
cmd:lsdef -l $$CN
check:rc==0
check:output=~hcp=__GETNODEATTR($$CN,hcp)__
cmd:rmdef $$CN,testnode
cmd:perl -pi -e 's/testnode/$$CN/g' /tmp/$$CN.stanza
cmd:cat /tmp/$$CN.stanza | mkdef -z
cmd:rmdef all
cmd:cat /tmp/all.stanza | mkdef -z
cmd:chtab -d node=$$SN servicenode
cmd:rm -f /tmp/all.stanza
cmd:rm -f /tmp/$$CN.stanza
end
start:rscan_x_w
label:others,hctrl_hmc
hcp:hmc
cmd:lsdef -t node all -z > /tmp/all.stanza
cmd:lsdef -t node -l $$CN -z > /tmp/$$CN.stanza
check:rc==0
cmd:perl -pi -e 's/$$CN/testnode/g' /tmp/$$CN.stanza
@ -56,14 +59,16 @@ check:output=~<parent>[\w-]+</parent>
cmd:lsdef -l $$CN
check:rc==0
check:output=~hcp=__GETNODEATTR($$CN,hcp)__
cmd:rmdef $$CN,testnode
cmd:perl -pi -e 's/testnode/$$CN/g' /tmp/$$CN.stanza
cmd:cat /tmp/$$CN.stanza | mkdef -z
cmd:rmdef all
cmd:cat /tmp/all.stanza | mkdef -z
cmd:chtab -d node=$$SN servicenode
cmd:rm -f /tmp/all.stanza
cmd:rm -f /tmp/$$CN.stanza
end
start:rscan_z_w
label:others,hctrl_hmc
hcp:hmc
cmd:lsdef -t node all -z > /tmp/all.stanza
cmd:lsdef -t node -l $$CN -z > /tmp/$$CN.stanza
check:rc==0
cmd:perl -pi -e 's/$$CN/testnode/g' /tmp/$$CN.stanza
@ -75,9 +80,9 @@ check:output=~parent=[\w-]+
check:lsdef -l $$CN
check:rc==0
check:output=~parent=[\w-]+
cmd:rmdef $$CN,testnode
cmd:perl -pi -e 's/testnode/$$CN/g' /tmp/$$CN.stanza
cmd:cat /tmp/$$CN.stanza | mkdef -z
cmd:rmdef all
cmd:cat /tmp/all.stanza | mkdef -z
cmd:chtab -d node=$$SN servicenode
cmd:rm -f /tmp/all.stanza
cmd:rm -f /tmp/$$CN.stanza
end

View File

@ -177,3 +177,9 @@ cmd:tabdump -d site | grep xcatiport
check:rc==0
check:output=~xcatiport
end
start:tabdump_servicenode
label:mn_only,ci_test,db
cmd:tabdump servicenode
check:rc==0
end

View File

@ -10,7 +10,7 @@ Homepage: https://xcat.org/
Package: xcat
Architecture: amd64 ppc64el
Depends: ${perl:Depends}, goconserver, xcat-server (>= 2.13-snap000000000000), xcat-client (>= 2.13-snap000000000000), libdbd-sqlite3-perl, isc-dhcp-server, apache2, nfs-kernel-server, libxml-parser-perl, rsync, tftpd-hpa, libnet-telnet-perl, xcat-genesis-scripts-ppc64 (>= 2.13-snap000000000000), xcat-genesis-scripts-amd64 (>= 2.13-snap000000000000)
Recommends: bind9, nmap, tftp-hpa, ipmitool-xcat (>= 1.8.17-1), syslinux[any-amd64], libsys-virt-perl, syslinux-xcat, xnba-undi, elilo-xcat, xcat-probe (>= 2.13-snap000000000000)
Recommends: bind9, nmap, tftp-hpa, ipmitool-xcat (>= 1.8.17-1), syslinux[any-amd64], libsys-virt-perl, syslinux-xcat, xnba-undi, elilo-xcat, xcat-buildkit (>= 2.13-snap000000000000), xcat-probe (>= 2.13-snap000000000000)
Suggests: yaboot-xcat
Description: Metapackage for a common, default xCAT setup
xCAT is Extreme Cluster/Cloud Administration Toolkit. xCAT offers complete

View File

@ -1,24 +1,24 @@
#!/bin/sh
#get IP address of MS
OS=`uname`
OS=$(uname)
echo "the OS is $OS"
logger -t xcat -p local4.info "the OS is $OS"
ms_ip=$MONMASTER
echo "MS IP is $ms_ip"
logger -t xcat -p local4.info "the MS is $ms_ip"
result=`ping -c1 $MONMASTER 2>&1`
if [ $? -eq 0 ]; then
index1=`expr index "$result" "\("`
index2=`expr index "$result" "\)"`
#ms_ip=${result:$index1+1:$index2-$index1-2}
pos=`expr $index1 + 1`
length=`expr $index2 - $index1`
length=`expr $length - 1`
ms_ip=`expr substr "$result" $pos $length`
echo final is $ms_ip
else
logger -t xcat -p local4.info "Gangliamon setup"
fi
result=$(ping -c1 $MONMASTER 2>&1)
if [ $? -eq 0 ]; then
index1=$(expr index "$result" "\(")
index2=$(expr index "$result" "\)")
#ms_ip=${result:$index1+1:$index2-$index1-2}
pos=$(expr $index1 + 1)
length=$(expr $index2 - $index1)
length=$(expr $length - 1)
ms_ip=$(expr substr "$result" $pos $length)
echo final is $ms_ip
else
logger -t xcat -p local4.info "Gangliamon setup"
fi
CLUSTER=\"$MONSERVER\"
echo "cluster is $CLUSTER"
@ -26,102 +26,26 @@ logger -t xcat -p local4.info "cluster is $CLUSTER"
MASTER=$ms_ip
#echo "The new IP is: $NEW_IP"
#echo "I will replace now....
gmond_conf="/etc/ganglia/gmond.conf"
gmond_conf_old="/etc/gmond.conf"
gmond_conf=$(gmond --help|grep -Eo "[a-z/]+/gmond.conf")
gmond_version=$(gmond -V|cut -d" " -f2)
if [ $OS == "AIX" ]; then
echo "into AIX loop"
logger -t xcat -p local4.info "into AIX loop"
if [ -f $gmond_conf_old ]; then
echo "ganglia version 3.0.7"
logger -t xcat -p local4.info "ganglia version 3.0.7"
grep "xCAT gmond settings done" $gmond_conf_old
if [ $? -gt 0 ]; then
/bin/cp -f $gmond_conf_old /etc/gmond.conf.orig
sed -e "s/setuid = yes/setuid = no/1" $gmond_conf_old > /etc/gmond.conf1
sed -e 's/name = "unspecified"/name='$CLUSTER'/1' /etc/gmond.conf1 > /etc/gmond.conf2
sed -e "1,40s/mcast_join = .*/host = $MASTER/" /etc/gmond.conf2 > /etc/gmond.conf3
sed -e 's/mcast_join/#/g' /etc/gmond.conf3 > /etc/gmond.conf4
sed -e "s/bind/#/g" /etc/gmond.conf4 > /etc/gmond.conf5
/bin/cp -f /etc/gmond.conf5 $gmond_conf_old
rm -f /etc/gmond.conf1 /etc/gmond.conf2 /etc/gmond.conf3 /etc/gmond.conf4 /etc/gmond.conf5
echo "# xCAT gmond settings done sh" >> $gmond_conf_old
fi
fi
fi
if [ $OS == "AIX" ]; then
echo "into AIX new loop"
logger -t xcat -p local4.info "into AIX new loop"
if [ -f $gmond_conf ]; then
echo "ganglia version v3.10"
logger -t xcat -p local4.info "ganglia version v3.10"
grep "xCAT gmond settings done" $gmond_conf
if [ $? -gt 0 ]; then
/bin/cp -f $gmond_conf /etc/ganglia/gmond.conf.orig
sed -e "s/setuid = yes/setuid = no/1" $gmond_conf > /etc/ganglia/gmond.conf1
sed -e 's/name = "unspecified"/name='$CLUSTER'/1' /etc/ganglia/gmond.conf1 > /etc/ganglia/gmond.conf2
sed -e "1,40s/mcast_join = .*/host = $MASTER/" /etc/ganglia/gmond.conf2 > /etc/ganglia/gmond.conf3
sed -e 's/mcast_join/#/g' /etc/ganglia/gmond.conf3 > /etc/ganglia/gmond.conf4
sed -e "s/bind/#/g" /etc/ganglia/gmond.conf4 > /etc/ganglia/gmond.conf5
/bin/cp -f /etc/ganglia/gmond.conf5 $gmond_conf
rm -f /etc/ganglia/gmond.conf1 /etc/ganglia/gmond.conf2 /etc/ganglia/gmond.conf3 /etc/ganglia/gmond.conf4 /etc/ganglia/gmond.conf5
echo "# xCAT gmond settings done sh" >> $gmond_conf
fi
fi
fi
if [ $OS != "AIX" ]; then
echo "not AIX"
logger -t xcat -p local4.info "not AIX"
if [ -f $gmond_conf ]; then
grep "xCAT gmond settings done" $gmond_conf
if [ $? -gt 0 ]; then
/bin/cp -f $gmond_conf /etc/ganglia/gmond.conf.orig
sed -i 's/setuid = yes/setuid = no/1' $gmond_conf
sed -i 's/name = "unspecified"/name='$CLUSTER'/1' $gmond_conf
sed -e "1,50s/^ *mcast_join = .*/host = $MASTER/" $gmond_conf > /etc/temp.conf
/bin/cp -f /etc/temp.conf $gmond_conf
sed -i 's/^ *mcast_join/#mcast_join/g' $gmond_conf
sed -i 's/^ *bind/#bind/g' $gmond_conf
echo "# xCAT gmond settings done sh" >> $gmond_conf
fi
fi
fi
if [ $OS != "AIX" ]; then
echo "not AIX"
logger -t xcat -p local4.info "not AIX"
if [ -f $gmond_conf_old ]; then
grep "xCAT gmond settings done" $gmond_conf_old
if [ $? -gt 0 ]; then
/bin/cp -f $gmond_conf_old /etc/gmond.conf.orig
sed -i 's/setuid = yes/setuid = no/1' $gmond_conf_old
sed -i 's/name = "unspecified"/name='$CLUSTER'/1' $gmond_conf_old
sed -e "1,40s/mcast_join = .*/host = $MASTER/" $gmond_conf_old > /etc/temp.conf
/bin/cp -f /etc/temp.conf $gmond_conf_old
sed -i 's/mcast_join/#/g' $gmond_conf_old
sed -i 's/bind/#/g' $gmond_conf_old
echo "# xCAT gmond settings done sh_old" >> $gmond_conf_old
fi
fi
if [ ! -f $gmond_conf ]; then
# echo "file not found"
logger -t xcat -p local4.warning "gmond configuration file not found. Generating a default one"
gmond -t > ${gmond_conf}
fi
if [ ! -f $gmond_conf ]; then
# echo "file not found"
logger -t xcat -p local4.warning "gmond configuration file not found"
fi
if [ ! -f $gmond_conf_old ]; then
# echo "file not found"
logger -t xcat -p local4.warning "gmond configuration file not found"
fi
echo "ganglia version ${gmond_version}"
logger -t xcat -p local4.info "ganglia version ${gmond_version}"
grep "xCAT gmond settings done" $gmond_conf
if [ $? -gt 0 ]; then
/bin/cp -f $gmond_conf /etc/ganglia/gmond.conf.orig
sed -i -e "s/setuid = yes/setuid = no/1" ${gmond_conf}
sed -i -e 's/name = "unspecified"/name='$CLUSTER'/1' ${gmond_conf}
sed -i -e "1,40s/mcast_join = .*/host = $MASTER/" ${gmond_conf}
sed -i -e '/mcast_join/d' ${gmond_conf}
sed -i -e "/\s\+bind/d" ${gmond_conf}
echo "# xCAT gmond settings done sh" >> $gmond_conf
fi
exit 0

View File

@ -4,12 +4,12 @@ ppc64le-template:
objtype=node
arch=ppc64le
bmc="MANDATORY:The hostname or ip address of the BMC adapater"
bmcpassword="MANDATORY:the password of the BMC"
bmcusername="MANDATORY:the username of the BMC"
bmcpassword="OPTIONAL:the password of the BMC"
bmcusername="OPTIONAL:the username of the BMC"
cons=ipmi
groups=all
ip=OPTIONAL:the ip address of the node
mac=OPTIONAL:the mac of the node
ip="MANDATORY:the ip address of the node"
mac="OPTIONAL:the mac of the node"
mgt=ipmi
netboot=petitboot
nodetype=mp

View File

@ -4,12 +4,12 @@ ppc64le-openbmc-template:
objtype=node
arch=ppc64le
bmc="MANDATORY:The hostname or ip address of the BMC adapater"
bmcpassword="MANDATORY:the password of the BMC"
bmcusername="MANDATORY:the username of the BMC"
bmcpassword="OPTIONAL:the password of the BMC"
bmcusername="OPTIONAL:the username of the BMC"
cons=openbmc
groups=all
ip=OPTIONAL:the ip address of the node
mac=OPTIONAL:the mac of the node
ip="MANDATORY:the ip address of the node"
mac="OPTIONAL:the mac of the node"
mgt=openbmc
netboot=petitboot
nodetype=mp

View File

@ -4,7 +4,7 @@ ppc64lekvmguest-template:
objtype=node
arch=ppc64le
groups=all
ip="OPTIONAL:the ip address of the kvm guest"
ip="MANDATORY:the ip address of the kvm guest"
mac="OPTIONAL:the mac of the kvm guest"
mgt=kvm
netboot=grub2

View File

@ -4,13 +4,13 @@ x86_64-template:
objtype=node
arch=x86_64
bmc="MANDATORY:The hostname or ip address of the BMC adapater"
bmcpassword="MANDATORY:the password of the BMC"
bmcusername="MANDATORY:the username of the BMC"
bmcpassword="OPTIONAL:the password of the BMC"
bmcusername="OPTIONAL:the username of the BMC"
cons=ipmi
getmac=ipmi
groups=all
hcp=
ip="OPTIONAL:the ip address of the node"
ip="MANDATORY:the ip address of the node"
mac="OPTIONAL:the mac of the node"
mgt=ipmi
netboot=xnba

View File

@ -4,7 +4,7 @@ x86_64kvmguest-template:
objtype=node
arch=x86_64
groups=all
ip="OPTIONAL:the ip address of the kvm guest"
ip="MANDATORY:the ip address of the kvm guest"
mac="OPTIONAL:the mac of the kvm guest"
mgt=kvm
netboot=xnba

View File

@ -9,7 +9,7 @@ Homepage: https://xcat.org/
Package: xcatsn
Architecture: amd64 ppc64el
Depends: ${perl:Depends}, goconserver, xcat-server (>= 2.13-snap000000000000), xcat-client (>= 2.13-snap000000000000), libdbd-sqlite3-perl, libxml-parser-perl, tftpd-hpa, libnet-telnet-perl, isc-dhcp-server, apache2, nfs-kernel-server, xcat-genesis-scripts-ppc64 (>= 2.13-snap000000000000), xcat-genesis-scripts-amd64 (>= 2.13-snap000000000000)
Recommends: bind9, nmap, tftp-hpa, ipmitool-xcat (>= 1.8.17-1), syslinux[any-amd64], libsys-virt-perl, syslinux-xcat, xnba-undi, elilo-xcat, xcat-probe (>= 2.13-snap000000000000)
Recommends: bind9, nmap, tftp-hpa, ipmitool-xcat (>= 1.8.17-1), syslinux[any-amd64], libsys-virt-perl, syslinux-xcat, xnba-undi, elilo-xcat, xcat-buildkit (>= 2.13-snap000000000000), xcat-probe (>= 2.13-snap000000000000)
Suggests: yaboot-xcat
Description: Metapackage for a common, default xCAT service node setup
xCATsn is a service node management package intended for at-scale