Compare commits
40 Commits
fix/mypost
...
2.8-pcm
Author | SHA1 | Date | |
---|---|---|---|
08683a45d6 | |||
8f920c6a2c | |||
4a54d2e1b9 | |||
d561030406 | |||
c23e0328fb | |||
1f2a5273e3 | |||
6b1c3e2bdf | |||
04c70de8fc | |||
e6332ef245 | |||
bd64e444c0 | |||
f85b944c67 | |||
4b99829fdd | |||
92f94fda22 | |||
d1f6a91eaf | |||
a8c057d95e | |||
7af1ca3a40 | |||
aed5820b37 | |||
35d0df1356 | |||
195e08340b | |||
07b4f4ed90 | |||
2b826284bb | |||
e80e2c3b1e | |||
8815ed2f4c | |||
17c25d67dc | |||
0ca28f99e3 | |||
7435749032 | |||
124d067192 | |||
4a63e79f3b | |||
889f51726f | |||
7a2553d95e | |||
09064309b9 | |||
afba3f2258 | |||
fc0b17272d | |||
a4d6f819ef | |||
d452ee22bd | |||
0d5e8aee1e | |||
4e1e20e4f2 | |||
6321e8ec95 | |||
cccae5e81f | |||
fc52689889 |
120
buildcore.sh
120
buildcore.sh
@ -19,6 +19,7 @@
|
||||
# directories that are needed.
|
||||
|
||||
# Usage: buildcore.sh [attr=value attr=value ...]
|
||||
# Before running buildcore.sh, you must change the local git repo to the branch you want built, using: git checkout <branch>
|
||||
# PROMOTE=1 - if the attribute "PROMOTE" is specified, means an official dot release. This does not
|
||||
# actually build xcat, just uploads the most recent snap build to https://sourceforge.net/projects/xcat/files/xcat/ .
|
||||
# If not specified, a snap build is assumed, which uploads to https://sourceforge.net/projects/xcat/files/yum/
|
||||
@ -31,7 +32,7 @@
|
||||
# BUILDALL=1 - build all rpms, whether they changed or not. Should be used for snap builds that are in prep for a release.
|
||||
# UP=0 or UP=1 - override the default upload behavior
|
||||
# SVNUP=<filename> - control which rpms get built by specifying a coresvnup file
|
||||
# FRSYUM=0 - put the yum repo and snap builds in the old project web area instead of the FRS area.
|
||||
# GITUP=<filename> - control which rpms get built by specifying a coregitup file
|
||||
# EMBED=<embedded-environment> - the environment for which a minimal version of xcat should be built, e.g. zvm or flex
|
||||
# VERBOSE=1 - to see lots of verbose output
|
||||
|
||||
@ -84,15 +85,24 @@ if [ "$OSNAME" != "AIX" ]; then
|
||||
export HOME=/root # This is so rpm and gpg will know home, even in sudo
|
||||
fi
|
||||
|
||||
# this is needed only when we are transitioning the yum over to frs
|
||||
if [ "$FRSYUM" != 0 ]; then
|
||||
YUMDIR=$FRS
|
||||
YUMREPOURL="https://sourceforge.net/projects/xcat/files/yum"
|
||||
else
|
||||
YUMDIR=htdocs
|
||||
YUMREPOURL="http://xcat.sourceforge.net/yum"
|
||||
# for the git case, query the current branch and set REL (changing master to devel if necessary)
|
||||
function setbranch {
|
||||
#git checkout $BRANCH
|
||||
#REL=`git rev-parse --abbrev-ref HEAD`
|
||||
REL=`git name-rev --name-only HEAD`
|
||||
if [ "$REL" = "master" ]; then
|
||||
REL="devel"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$REL" = "xcat-core" ]; then # using git
|
||||
GIT=1
|
||||
setbranch # this changes the REL variable
|
||||
fi
|
||||
|
||||
YUMDIR=$FRS
|
||||
YUMREPOURL="https://sourceforge.net/projects/xcat/files/yum"
|
||||
|
||||
# Set variables based on which type of build we are doing
|
||||
if [ -n "$EMBED" ]; then
|
||||
EMBEDDIR="/$EMBED"
|
||||
@ -116,27 +126,12 @@ else
|
||||
fi
|
||||
|
||||
XCATCORE="xcat-core" # core-snap is a sym link to xcat-core
|
||||
echo "svn --quiet up Version"
|
||||
svn --quiet up Version
|
||||
VER=`cat Version`
|
||||
SHORTVER=`cat Version|cut -d. -f 1,2`
|
||||
SHORTSHORTVER=`cat Version|cut -d. -f 1`
|
||||
if [ "$PROMOTE" = 1 ]; then
|
||||
CORE="xcat-core"
|
||||
if [ "$OSNAME" = "AIX" ]; then
|
||||
TARNAME=core-aix-$VER.tar.gz
|
||||
else
|
||||
TARNAME=xcat-core-$VER.tar.bz2
|
||||
fi
|
||||
|
||||
if [ "$GIT" = "1" ]; then # using git - need to include REL in the path where we put the built rpms
|
||||
DESTDIR=../../$REL$EMBEDDIR/$XCATCORE
|
||||
else
|
||||
CORE="core-snap"
|
||||
if [ "$OSNAME" = "AIX" ]; then
|
||||
TARNAME=core-aix-snap.tar.gz
|
||||
else
|
||||
TARNAME=core-rpms-snap.tar.bz2
|
||||
fi
|
||||
DESTDIR=../..$EMBEDDIR/$XCATCORE
|
||||
fi
|
||||
DESTDIR=../..$EMBEDDIR/$XCATCORE
|
||||
SRCD=core-snap-srpms
|
||||
|
||||
# currently aix builds ppc rpms, but someday it should build noarch
|
||||
@ -146,8 +141,21 @@ else
|
||||
NOARCH=noarch
|
||||
fi
|
||||
|
||||
function setversionvars {
|
||||
VER=`cat Version`
|
||||
SHORTVER=`cat Version|cut -d. -f 1,2`
|
||||
SHORTSHORTVER=`cat Version|cut -d. -f 1`
|
||||
}
|
||||
|
||||
|
||||
if [ "$PROMOTE" != 1 ]; then # very long if statement to not do builds if we are promoting
|
||||
# we are doing a snap build
|
||||
CORE="core-snap"
|
||||
if [ "$OSNAME" = "AIX" ]; then
|
||||
TARNAME=core-aix-snap.tar.gz
|
||||
else
|
||||
TARNAME=core-rpms-snap.tar.bz2
|
||||
fi
|
||||
mkdir -p $DESTDIR
|
||||
SRCDIR=$DESTDIR/../$SRCD
|
||||
mkdir -p $SRCDIR
|
||||
@ -168,17 +176,33 @@ else
|
||||
#echo "source=$source"
|
||||
fi
|
||||
|
||||
# If they have not given us a premade update file, do an svn update and capture the results
|
||||
if [ -z "$SVNUP" ]; then
|
||||
SVNUP=../coresvnup
|
||||
echo "svn up > $SVNUP"
|
||||
svn up > $SVNUP
|
||||
fi
|
||||
# If they have not given us a premade update file, do an svn update or git pull and capture the results
|
||||
SOMETHINGCHANGED=0
|
||||
if ! $GREP 'At revision' $SVNUP; then
|
||||
SOMETHINGCHANGED=1
|
||||
if [ "$GIT" = "1" ]; then # using git
|
||||
if [ -z "$GITUP" ]; then
|
||||
GITUP=../coregitup
|
||||
echo "git pull > $GITUP"
|
||||
git pull > $GITUP
|
||||
fi
|
||||
if ! $GREP 'Already up-to-date' $GITUP; then
|
||||
SOMETHINGCHANGED=1
|
||||
fi
|
||||
else # using svn
|
||||
GIT=0
|
||||
if [ -z "$SVNUP" ]; then
|
||||
SVNUP=../coresvnup
|
||||
echo "svn up > $SVNUP"
|
||||
svn up > $SVNUP
|
||||
fi
|
||||
if ! $GREP 'At revision' $SVNUP; then
|
||||
SOMETHINGCHANGED=1
|
||||
fi
|
||||
# copy the SVNUP variable to GITUP so the rest of the script doesnt have to worry whether we did svn or git
|
||||
GITUP=$SVNUP
|
||||
fi
|
||||
|
||||
setversionvars
|
||||
|
||||
# Function for making the noarch rpms
|
||||
function maker {
|
||||
rpmname="$1"
|
||||
@ -194,7 +218,7 @@ function maker {
|
||||
}
|
||||
|
||||
# If anything has changed, we should always rebuild perl-xCAT
|
||||
if [ $SOMETHINGCHANGED == 1 -o "$BUILDALL" == 1 ]; then # Use to be: $GREP perl-xCAT $SVNUP; then
|
||||
if [ $SOMETHINGCHANGED == 1 -o "$BUILDALL" == 1 ]; then # Use to be: $GREP perl-xCAT $GITUP; then
|
||||
if [[ " $EMBEDBUILD " = *\ perl-xCAT\ * ]]; then
|
||||
UPLOAD=1
|
||||
maker perl-xCAT
|
||||
@ -210,7 +234,7 @@ for rpmname in xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-test xC
|
||||
#if [ "$EMBED" = "zvm" -a "$rpmname" != "xCAT-server" -a "$rpmname" != "xCAT-UI" ]; then continue; fi # for zvm embedded env only need to build server and UI
|
||||
if [[ " $EMBEDBUILD " != *\ $rpmname\ * ]]; then continue; fi
|
||||
if [ "$OSNAME" = "AIX" -a "$rpmname" = "xCAT-buildkit" ]; then continue; fi # do not build xCAT-buildkit on aix
|
||||
if $GREP $rpmname $SVNUP || [ "$BUILDALL" == 1 ]; then
|
||||
if $GREP $rpmname $GITUP || [ "$BUILDALL" == 1 ]; then
|
||||
UPLOAD=1
|
||||
maker $rpmname
|
||||
fi
|
||||
@ -225,7 +249,7 @@ done
|
||||
# The mknb cmd combines them at install time.
|
||||
if [ "$OSNAME" != "AIX" ]; then
|
||||
if [[ " $EMBEDBUILD " = *\ xCAT-genesis-scripts\ * ]]; then
|
||||
if $GREP xCAT-genesis-scripts $SVNUP || [ "$BUILDALL" == 1 ]; then
|
||||
if $GREP xCAT-genesis-scripts $GITUP || [ "$BUILDALL" == 1 ]; then
|
||||
UPLOAD=1
|
||||
ORIGFAILEDRPMS="$FAILEDRPMS"
|
||||
./makerpm xCAT-genesis-scripts x86_64 "$EMBED"
|
||||
@ -244,14 +268,14 @@ fi
|
||||
for rpmname in xCAT xCATsn; do
|
||||
#if [ "$EMBED" = "zvm" ]; then break; fi
|
||||
if [[ " $EMBEDBUILD " != *\ $rpmname\ * ]]; then continue; fi
|
||||
if [ $SOMETHINGCHANGED == 1 -o "$BUILDALL" == 1 ]; then # used to be: if $GREP -E "^[UAD] +$rpmname/" $SVNUP; then
|
||||
if [ $SOMETHINGCHANGED == 1 -o "$BUILDALL" == 1 ]; then # used to be: if $GREP -E "^[UAD] +$rpmname/" $GITUP; then
|
||||
UPLOAD=1
|
||||
ORIGFAILEDRPMS="$FAILEDRPMS"
|
||||
if [ "$OSNAME" = "AIX" ]; then
|
||||
./makerpm $rpmname "$EMBED"
|
||||
if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS $rpmname"; fi
|
||||
else
|
||||
for arch in x86_64 i386 ppc64 s390x; do
|
||||
for arch in x86_64 ppc64 s390x; do
|
||||
./makerpm $rpmname $arch "$EMBED"
|
||||
if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS $rpmname-$arch"; fi
|
||||
done
|
||||
@ -324,8 +348,8 @@ if [ "$OSNAME" != "AIX" ]; then
|
||||
echo "Signing RPMs..."
|
||||
build-utils/rpmsign.exp `find $DESTDIR -type f -name '*.rpm'` | grep -v -E '(was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
|
||||
build-utils/rpmsign.exp $SRCDIR/*rpm | grep -v -E '(was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
|
||||
createrepo $DESTDIR
|
||||
createrepo $SRCDIR
|
||||
createrepo --checksum sha $DESTDIR # specifying checksum so the repo will work on rhel5
|
||||
createrepo --checksum sha $SRCDIR
|
||||
rm -f $SRCDIR/repodata/repomd.xml.asc
|
||||
rm -f $DESTDIR/repodata/repomd.xml.asc
|
||||
gpg -a --detach-sign $DESTDIR/repodata/repomd.xml
|
||||
@ -354,7 +378,17 @@ chmod -R g+w $DESTDIR
|
||||
chgrp -R xcat $SRCDIR
|
||||
chmod -R g+w $SRCDIR
|
||||
|
||||
fi # end of very long if-not-promote
|
||||
else # end of very long if-not-promote
|
||||
# we are only promoting (not building)
|
||||
setversionvars
|
||||
setbranch
|
||||
CORE="xcat-core"
|
||||
if [ "$OSNAME" = "AIX" ]; then
|
||||
TARNAME=core-aix-$VER.tar.gz
|
||||
else
|
||||
TARNAME=xcat-core-$VER.tar.bz2
|
||||
fi
|
||||
fi
|
||||
|
||||
cd $DESTDIR
|
||||
|
||||
|
@ -1,34 +1,26 @@
|
||||
#!/bin/sh
|
||||
# Put the version, svn revision #, and build date into the Version function in Version.pm
|
||||
|
||||
if [ -z "$2" ]
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "modifyUtils: Error: must specify the xCAT version and svn revision number as arguments" >&2
|
||||
echo "modifyUtils: Error: must specify the xCAT version as an argument" >&2
|
||||
exit
|
||||
fi
|
||||
|
||||
VER=$1
|
||||
SVNREF="svn r$2, "
|
||||
|
||||
#SVNINFO=`svn info 2>/dev/null|grep Revision`
|
||||
#/bin/echo -e $SVNINFO
|
||||
#if [ $? -ne 0 -a -f .svninfo ]; then
|
||||
# SVNINFO=`cat .svninfo 2>/dev/null|grep Revision`
|
||||
#fi
|
||||
#if [ $? -eq 0 ]
|
||||
# then
|
||||
# SVNREF="svn r"`echo $SVNINFO|awk '{print $2}'`", "
|
||||
# else
|
||||
# SVNREF=""
|
||||
# fi
|
||||
|
||||
BUILDDATE=`date`
|
||||
#echo ". '(${SVNREF}built $BUILDDATE)'"
|
||||
#echo ". '(built $BUILDDATE)'"
|
||||
|
||||
if [ "$(uname)" = "AIX" ]
|
||||
then
|
||||
sed -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (${SVNREF}built $BUILDDATE)'"/ xCAT/Version.pm >xCAT/Version.pm.new
|
||||
sed -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (built $BUILDDATE)'"/ xCAT/Version.pm >xCAT/Version.pm.new
|
||||
mv xCAT/Version.pm.new xCAT/Version.pm
|
||||
else
|
||||
sed -i -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (${SVNREF}built $BUILDDATE)'"/ xCAT/Version.pm
|
||||
if [ -f "/etc/debian_version" ];then
|
||||
FILENAME="debian/perl-xcat/opt/xcat/lib/perl/xCAT/Version.pm"
|
||||
else
|
||||
FILENAME="xCAT/Version.pm"
|
||||
fi
|
||||
sed -i -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (built $BUILDDATE)'"/ $FILENAME
|
||||
fi
|
||||
|
@ -25,7 +25,6 @@ Includes xCAT::Table, xCAT::NodeRange, among others.
|
||||
|
||||
%define zvm %(if [ "$zvm" = "1" ];then echo 1; else echo 0; fi)
|
||||
%define fsm %(if [ "$fsm" = "1" ];then echo 1; else echo 0; fi)
|
||||
%define svninfo %(svn info | grep Revision | awk '{print $2}')
|
||||
|
||||
%prep
|
||||
%setup -q -n perl-xCAT
|
||||
@ -37,7 +36,7 @@ Includes xCAT::Table, xCAT::NodeRange, among others.
|
||||
%if %fsm
|
||||
%else
|
||||
# Modify the Version() function in xCAT/Utils.pm to automatically have the correct version
|
||||
./modifyUtils %{version} %{svninfo}
|
||||
./modifyUtils %{version}
|
||||
|
||||
# Build the pod version of the man pages for each DB table. It puts them in the man5 and man7 subdirs.
|
||||
# Then convert the pods to man pages and html pages.
|
||||
|
@ -541,6 +541,56 @@ sub get_allnode_singleattrib_hash
|
||||
return \%allrecords;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
=head3 get_db_swtiches
|
||||
Description : Get all records of switch config from a table, then return a string list.
|
||||
Arguments : $tabname - the table name.
|
||||
Returns : Reference of the records hash.
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
sub get_db_switches
|
||||
{
|
||||
my $class = shift;
|
||||
my $table = xCAT::Table->new("switches");
|
||||
my @attribs = ("switch");
|
||||
my @entries = $table->getAllAttribs(@attribs);
|
||||
$table->close();
|
||||
my %allrecords;
|
||||
foreach (@entries)
|
||||
{
|
||||
if ($_->{'switch'}){
|
||||
$allrecords{$_->{'switch'}} = 0;
|
||||
}
|
||||
}
|
||||
return \%allrecords;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
=head3 get_db_swtichports
|
||||
Description : Get all records of switch config from a table, then return a string list.
|
||||
Arguments : $tabname - the table name.
|
||||
Returns : Reference of the records hash.
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
sub get_db_switchports
|
||||
{
|
||||
my $class = shift;
|
||||
my $table = xCAT::Table->new("switch");
|
||||
my @attribs = ("switch", "port");
|
||||
my @entries = $table->getAllAttribs(@attribs);
|
||||
$table->close();
|
||||
my %allrecords;
|
||||
foreach (@entries)
|
||||
{
|
||||
$allrecords{$_->{'switch'} . "_" . $_->{'port'}} = 0;
|
||||
}
|
||||
return \%allrecords;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
=head3 is_discover_started
|
||||
@ -827,6 +877,8 @@ sub parse_nodeinfo_file
|
||||
|
||||
my @lines = split /\n/, $filedata;
|
||||
my $obj_found = 0;
|
||||
my $attr_found = 0;
|
||||
my $null_obj;
|
||||
my ($objname, $append);
|
||||
|
||||
foreach my $line (@lines){
|
||||
@ -835,6 +887,8 @@ sub parse_nodeinfo_file
|
||||
|
||||
# The line ends with :
|
||||
if (grep(/:\s*$/, $line)){
|
||||
$attr_found = 0;
|
||||
$null_obj = $line;
|
||||
($objname, $append) = split(/:/, $line);
|
||||
$objname =~ s/^\s*//; # Remove any leading whitespace
|
||||
$objname =~ s/\s*$//; # Remove any trailing whitespace
|
||||
@ -852,6 +906,7 @@ sub parse_nodeinfo_file
|
||||
if (! $obj_found){
|
||||
return 0, "No node defined before line \'$line\'";
|
||||
}
|
||||
$attr_found = 1;
|
||||
|
||||
my $attr = $1;
|
||||
my $val = $2;
|
||||
@ -875,6 +930,81 @@ sub parse_nodeinfo_file
|
||||
return 0, "Invalid Line \'$line\' found";
|
||||
}
|
||||
}
|
||||
|
||||
# Defined object has no attributes
|
||||
if (! $attr_found){
|
||||
return 0, "Invalid Line \'$null_obj\' found";
|
||||
}
|
||||
|
||||
return 1, "";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
=head3 check_nicips
|
||||
Description: Check if the nicips defined in MAC file is correct
|
||||
format
|
||||
Arguments: $installnic: the installnic defined in networkprofile
|
||||
$netprofileattrsref: the attributes of all nics in networkprofile
|
||||
$freeipshash: the hash of networks' staticrange
|
||||
$nicips: the string of nicips defined in MAC file
|
||||
Returns: ($retcode, $output, $errmsg).
|
||||
$retcode = 1. Parse failed, there are some errors in nicips string. Detailed errors will be set in $errmsg.
|
||||
$retcode = 0. Parse success, the format of nicips is OK..
|
||||
|
||||
=cut
|
||||
#-------------------------------------------------------------------------------
|
||||
sub check_nicips{
|
||||
my $class = shift;
|
||||
my $installnic = shift;
|
||||
my $netprofileattrsref = shift;
|
||||
my $freeipshash = shift;
|
||||
my $othernics = shift;
|
||||
|
||||
my $errmsg = "";
|
||||
my %nics_hash = ();
|
||||
my %netprofileattr = %$netprofileattrsref;
|
||||
|
||||
foreach my $nic_ips (split(/,/, $othernics)) {
|
||||
my @nic_and_ips = ();
|
||||
my $nic = "";
|
||||
my $nic_ip = "";
|
||||
if($nic_ips =~ /!/ and $nic_ips !~ /!$/) {
|
||||
@nic_and_ips = split(/!/, $nic_ips);
|
||||
my $len = @nic_and_ips;
|
||||
$nic = $nic_and_ips[0];
|
||||
$nic_ip = $nic_and_ips[1];
|
||||
|
||||
if (exists $nics_hash{$nic} or $len ne 2) {
|
||||
$errmsg = "The specified nicips is incorrect. It must be formatted correctly, in the form: <nic1>!<nic-ip1>,<nic2>!<nic-ip2>,...";
|
||||
return (1, "", $errmsg);
|
||||
}
|
||||
|
||||
# Check whether other interfaces contain provision nic
|
||||
if ($nic eq $installnic) {
|
||||
$errmsg = "The specified nicips cannot contain NICs used for provisioning.";
|
||||
return (1, "", $errmsg);
|
||||
}
|
||||
|
||||
# Check whether this interface is defined in networkprofile
|
||||
unless (exists $netprofileattr{$nic}){
|
||||
$errmsg = "The specified nicips contains NICs that are not defined in the network profile.";
|
||||
return (1, "", $errmsg);
|
||||
}
|
||||
|
||||
# Check whether specified IP is in each network's static range
|
||||
my $nicnetwork = $netprofileattr{$nic}{'network'};
|
||||
my $freeipsref = $freeipshash->{$nicnetwork};
|
||||
unless (grep{ $_ eq $nic_ip} @$freeipsref){
|
||||
$errmsg = "Specified IP address $nic_ip not in static range of network $netprofileattr{$nic}{'network'}";
|
||||
return (1, "", $errmsg);
|
||||
}
|
||||
}else {
|
||||
$errmsg = "The specified nicips is incorrect. It must be formatted correctly, in the form: <nic1>!<nic-ip1>,<nic2>!<nic-ip2>,...";
|
||||
return (1, "", $errmsg);
|
||||
}
|
||||
$nics_hash{$nic} = $nic_ip;
|
||||
}
|
||||
|
||||
return (0, \%nics_hash, "");
|
||||
}
|
||||
|
||||
|
@ -1839,7 +1839,7 @@ sub gen_kitcomp_spec
|
||||
if (defined($comp->{postuninstall})) {
|
||||
$postunscript = &load_script("$scriptdir$comp->{postuninstall}"); }
|
||||
if (defined($comp->{non_native_pkgs})) {
|
||||
$nonnativepkgs = '\n';
|
||||
$nonnativepkgs = "\n";
|
||||
$nonnativepkgs .= "mkdir -p \$RPM_BUILD_ROOT/opt/xcat/kits/$kitname/$kitcompname \n";
|
||||
$nonnativepkgs .= "cp -a * \$RPM_BUILD_ROOT/opt/xcat/kits/$kitname/$kitcompname \n";
|
||||
$sourcetar = "Source: $comp->{basename}.tar.gz";
|
||||
@ -1872,8 +1872,6 @@ sub gen_kitcomp_spec
|
||||
}
|
||||
|
||||
# Write the generated spec file
|
||||
my $joined_lines = join("\n",@lines);
|
||||
@lines = split(/\\n/,$joined_lines);
|
||||
mkpath($tmpdir);
|
||||
my $NSF;
|
||||
unless ( open( $NSF, ">$tmpdir/$comp->{kitcompname}.spec" ) ) {
|
||||
@ -1882,7 +1880,9 @@ sub gen_kitcomp_spec
|
||||
if ($::VERBOSE) {
|
||||
print "Created kitcomponent spec file $tmpdir/$comp->{basename}.spec \n";
|
||||
}
|
||||
print $NSF @lines;
|
||||
foreach my $line (@lines) {
|
||||
print $NSF $line,"\n";
|
||||
}
|
||||
close($NSF);
|
||||
|
||||
return 0;
|
||||
@ -1916,7 +1916,7 @@ sub load_script
|
||||
my @lines = <$SF>;
|
||||
close $SF;
|
||||
|
||||
my $script_contents = join('\n', @lines);
|
||||
my $script_contents = join('', @lines);
|
||||
return $script_contents;
|
||||
}
|
||||
|
||||
@ -2137,7 +2137,11 @@ sub create_builddir
|
||||
|
||||
foreach my $plugin (<$::workdir/plugins/*.pm>){
|
||||
my $plugin_base = basename($plugin);
|
||||
my $to_plugin = $plugin_dir."/".$kitname."_".$plugin_base;
|
||||
my $mod_kitname = $kitname;
|
||||
$mod_kitname =~ s/\-/\_/g;
|
||||
$mod_kitname =~ s/\./\_/g;
|
||||
my $to_plugin = $plugin_dir."/".$mod_kitname."_".$plugin_base;
|
||||
|
||||
if ( system("cp -fp $plugin $to_plugin") ) {
|
||||
# non-zero return from system call
|
||||
print "Error copying plugin file $plugin to build directory $plugin_dir \n";
|
||||
@ -2294,6 +2298,11 @@ sub edit_plugin
|
||||
{
|
||||
my $file = shift;
|
||||
my $kitname = $::bldkit_config->{kit}{entries}[0]->{kitname};
|
||||
# convert dashes to underscore since the kitname is used as perl pkg names
|
||||
# in the plugin and this causes perl syntax errors
|
||||
my $mod_kitname = $kitname;
|
||||
$mod_kitname =~ s/\-/\_/g;
|
||||
$mod_kitname =~ s/\./\_/g;
|
||||
|
||||
# read in the file
|
||||
my $PF;
|
||||
@ -2306,6 +2315,7 @@ sub edit_plugin
|
||||
|
||||
for (@lines) {
|
||||
s/<<<buildkit_WILL_INSERT_kitname_HERE>>>/$kitname/g;
|
||||
s/<<<buildkit_WILL_INSERT_modified_kitname_HERE>>>/$mod_kitname/g;
|
||||
}
|
||||
|
||||
# Write the plugin back out
|
||||
|
@ -1,306 +0,0 @@
|
||||
# Kit Build File
|
||||
#
|
||||
# This file was initially auto-generated by the buildkit CLI command.
|
||||
# To create a new kit, the user should modify this file accordingly.
|
||||
# Refer to the buildkit manpage for further details.
|
||||
#
|
||||
|
||||
# kit: This section defines general info for the Kit.
|
||||
# There must be exactly one kit section in a kit build file.
|
||||
#
|
||||
# kit attributes:
|
||||
# basename (mandatory) Kit base name. e.g., kit-lsf
|
||||
# description (optional) Kit description.
|
||||
# version (mandatory) Kit version. e.g., 1.0
|
||||
# ostype (mandatory) Kit OS type. Must be Linux.
|
||||
# AIX is currently not supported.
|
||||
# isinternal (optional) PCM use only.
|
||||
# Indicate if Kit is for internal use.
|
||||
# Use 1 for yes, 0 for no. Default: 0
|
||||
# kitdeployparams (optional) Filename containing a list of kit deployment
|
||||
# parameters, relative to
|
||||
# <Kit Build Directory>/other_files
|
||||
kit:
|
||||
basename=xlc
|
||||
description=XLC12 for Linux
|
||||
version=12.1.0.0
|
||||
ostype=Linux
|
||||
kitlicense=IPLA
|
||||
# kitdeployparams=sample/kitdeployparams.lst
|
||||
|
||||
|
||||
# kitrepo: This section defines a Kit Package Repository.
|
||||
# There must be at least one kitrepo section in a kit build file.
|
||||
# If you want to support multiple OSes, you should create a separate
|
||||
# repo for each OS. Also, no two repos can be defined with the same
|
||||
# OS name, major/minor version and arch. For example, you cannot have
|
||||
# two repos for RHEL 6.2 ppc64 in the same kit.
|
||||
#
|
||||
# kitrepo attributes:
|
||||
# kitrepoid (mandatory) Kit package repository ID.
|
||||
# Must be unique within this file.
|
||||
# osbasename (mandatory) OS distro base name. e.g., rhels.
|
||||
# osmajorversion (mandatory) OS major version. e.g., 6
|
||||
# osminorversion (optional) OS minor version.
|
||||
# osarch (mandatory) OS architecture. e.g., ppc64
|
||||
# compat_osbasenames (optional) Comma-separated list of compatible
|
||||
# OS distro base names. e.g., centos
|
||||
|
||||
kitrepo:
|
||||
kitrepoid=rhels6_ppc64
|
||||
osbasename=rhels
|
||||
osmajorversion=6
|
||||
osarch=ppc64
|
||||
|
||||
kitrepo:
|
||||
kitrepoid=sles11_ppc64
|
||||
osbasename=sles
|
||||
osmajorversion=11
|
||||
osarch=ppc64
|
||||
|
||||
|
||||
# kitcomponent: This section defines one Kit Component.
|
||||
# There can be zero or more kitcomponent sections.
|
||||
# If you want to build a component which supports multiple OSes,
|
||||
# you should create one kitcomponent section for each OS.
|
||||
# Also, no two components in a kit can be defined with the same
|
||||
# base name.
|
||||
# You can define multiple kit components with the same base name
|
||||
# only if each kit component using this base name meets these
|
||||
# requirements:
|
||||
# - Each kit component must be defined with the same version
|
||||
# and release number
|
||||
# - Each kit component must be defined with a unique kitrepoid
|
||||
|
||||
#
|
||||
# kitcomponent attributes:
|
||||
# basename (mandatory) Kit component base name
|
||||
# description (optional) Kit component description
|
||||
# version (mandatory) Kit component version
|
||||
# release (mandatory) Kit component release
|
||||
# serverroles (mandatory) Comma-separated list of servers that this
|
||||
# component can install on. Valid values:
|
||||
# mgtnode,servicenode,compute,loginnode,storagenode
|
||||
# kitrepoid (mandatory) The ID of the kit package repository this
|
||||
# component belongs to
|
||||
# kitcompdeps (optional) Comma-separated list of kit component
|
||||
# dependencies. These kit components can be included in
|
||||
# this kit or in other kits.
|
||||
# ospkgdeps (optional) Comma-separated list of OS package dependencies
|
||||
# These packages must be shipped with the OS distro.
|
||||
# kitpkgdeps (optional) Comma-separated list of kit package names that
|
||||
# will be listed as "REQUIRES" when building this kit
|
||||
# component. Each package must be defined in a separate
|
||||
# kitpackage section. Each package must be in the same
|
||||
# kitrepo as this kit component.
|
||||
# non_native_pkgs (optional) TBD -- NOT SUPPORTED YET!
|
||||
# Comma-separated list of non-native package
|
||||
# paths that will be included as files in this kit
|
||||
# component. All filenames are relative to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# Kit component deployment scripts must be specified
|
||||
# to manage these files.
|
||||
# driverpacks (optional) Comma-separated list of driver package filenames
|
||||
# Each driverpack must be defined in a separate kitpackage
|
||||
# section.
|
||||
# exlist (optional) Exclude list file for stateless image, relative
|
||||
# to <Kit Build Directory>/other_files
|
||||
# Kit component deployment scripts (optional) Each attribute specifies
|
||||
# script path relative to <Kit Build Directory>/scripts
|
||||
# Script attributes:
|
||||
# preinstall, postinstall, preuninstall, postuninstall,
|
||||
# preupgrade, postupgrade, postbootscripts
|
||||
kitcomponent:
|
||||
basename=xlc_compute
|
||||
description=XLC12 for compute nodes
|
||||
version=12.1.0.0
|
||||
release=120323
|
||||
serverroles=compute
|
||||
kitrepoid=rhels6_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64)
|
||||
kitpkgdeps=vac.lic >= 12.1.0.0,vacpp.help.pdf >= 12.1.0.0,vacpp.man >= 12.1.0.0,vacpp.rte >= 12.1.0.0,vacpp.rte.lnk >= 12.1.0.0,vacpp.samples >= 12.1.0.0
|
||||
exlist=xlc.exlist
|
||||
genimage_postinstall=xlc_license,rhels_xlc_compute_install
|
||||
non_native_pkgs=EXTERNALPKGS:vac.lib-12.1.0.0*,EXTERNALPKGS:vac.cmp-12.1.0.0*,EXTERNALPKGS:vacpp.lib-12.1.0.0*,EXTERNALPKGS:vacpp.cmp-12.1.0.0*
|
||||
|
||||
kitcomponent:
|
||||
basename=xlc_loginnode
|
||||
description=XLC12 for login nodes
|
||||
version=12.1.0.0
|
||||
release=120323
|
||||
serverroles=loginnode
|
||||
kitrepoid=rhels6_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64)
|
||||
kitpkgdeps=vac.lic >= 12.1.0.0,vacpp.help.pdf >= 12.1.0.0,vacpp.man >= 12.1.0.0,vacpp.rte >= 12.1.0.0,vacpp.rte.lnk >= 12.1.0.0,vacpp.samples >= 12.1.0.0
|
||||
exlist=xlc.exlist
|
||||
genimage_postinstall=xlc_license,rhels_xlc_login_install
|
||||
non_native_pkgs=EXTERNALPKGS:vac.lib-12.1.0.0*,EXTERNALPKGS:vac.cmp-12.1.0.0*,EXTERNALPKGS:vacpp.lib-12.1.0.0*,EXTERNALPKGS:vacpp.cmp-12.1.0.0*
|
||||
|
||||
kitcomponent:
|
||||
basename=min_xlc_compute
|
||||
description=Minimal XLC12 packages for compute nodes
|
||||
version=12.1.0.0
|
||||
release=120323
|
||||
serverroles=compute
|
||||
kitrepoid=rhels6_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64)
|
||||
kitpkgdeps=vacpp.rte >= 12.1.0.0,vacpp.rte.lnk >= 12.1.0.0
|
||||
exlist=xlc.exlist
|
||||
genimage_postinstall=xlc_license,rhels_min_xlc_compute_install
|
||||
non_native_pkgs=EXTERNALPKGS:vac.lib-12.1.0.0*,EXTERNALPKGS:vac.cmp-12.1.0.0*,EXTERNALPKGS:vacpp.lib-12.1.0.0*,EXTERNALPKGS:vacpp.cmp-12.1.0.0*
|
||||
|
||||
kitcomponent:
|
||||
basename=xlc_compute
|
||||
description=XLC12 for compute nodes
|
||||
version=12.1.0.0
|
||||
release=120323
|
||||
serverroles=compute
|
||||
kitrepoid=sles11_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64)
|
||||
kitpkgdeps=vac.lic >= 12.1.0.0,vacpp.help.pdf >= 12.1.0.0,vacpp.man >= 12.1.0.0,vacpp.rte >= 12.1.0.0,vacpp.rte.lnk >= 12.1.0.0,vacpp.samples >= 12.1.0.0
|
||||
exlist=xlc.exlist
|
||||
genimage_postinstall=xlc_license,sles_xlc_compute_install
|
||||
non_native_pkgs=EXTERNALPKGS:vac.lib-12.1.0.0*,EXTERNALPKGS:vac.cmp-12.1.0.0*,EXTERNALPKGS:vacpp.lib-12.1.0.0*,EXTERNALPKGS:vacpp.cmp-12.1.0.0*
|
||||
|
||||
kitcomponent:
|
||||
basename=xlc_loginnode
|
||||
description=XLC12 for login nodes
|
||||
version=12.1.0.0
|
||||
release=120323
|
||||
serverroles=loginnode
|
||||
kitrepoid=sles11_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64)
|
||||
kitpkgdeps=vacpp.help.pdf >= 12.1.0.0,vacpp.lib >= 12.1.0.0,vacpp.man >= 12.1.0.0,vacpp.rte >= 12.1.0.0,vacpp.rte.lnk >= 12.1.0.0,vacpp.samples >= 12.1.0.0
|
||||
exlist=xlc.exlist
|
||||
genimage_postinstall=xlc_license,sles_xlc_login_install
|
||||
non_native_pkgs=EXTERNALPKGS:vac.lib-12.1.0.0*,EXTERNALPKGS:vac.cmp-12.1.0.0*,EXTERNALPKGS:vacpp.lib-12.1.0.0*,EXTERNALPKGS:vacpp.cmp-12.1.0.0*
|
||||
|
||||
kitcomponent:
|
||||
basename=min_xlc_compute
|
||||
description=Minimal XLC12 packages for compute nodes
|
||||
version=12.1.0.0
|
||||
release=120323
|
||||
serverroles=compute
|
||||
kitrepoid=sles11_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64)
|
||||
kitpkgdeps=vacpp.rte >= 12.1.0.0,vacpp.rte.lnk >= 12.1.0.0
|
||||
exlist=xlc.exlist
|
||||
genimage_postinstall=xlc_license,sles_min_xlc_compute_install
|
||||
non_native_pkgs=EXTERNALPKGS:vac.lib-12.1.0.0*,EXTERNALPKGS:vac.cmp-12.1.0.0*,EXTERNALPKGS:vacpp.lib-12.1.0.0*,EXTERNALPKGS:vacpp.cmp-12.1.0.0*
|
||||
|
||||
|
||||
# kitpackage: This section defines one Kit Package, and how to build it.
|
||||
# There can be zero or more kitpackage sections.
|
||||
# All filenames should be relative paths to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# If you want to build a package which can run on multiple OSes,
|
||||
# you have two options:
|
||||
# 1. Build a separate package for each OS you want to support.
|
||||
# For this option, you need to define one kitpackage section
|
||||
# per supported OS.
|
||||
# 2. Build one package that can run on multiple OSes.
|
||||
# If you are building an RPM package, you are responsible for
|
||||
# creating an RPM spec file that can run on multiple OSes.
|
||||
# For this option, you need to define one kitpackage section
|
||||
# which contains multiple kitrepoid lines.
|
||||
#
|
||||
# kitpackage attributes:
|
||||
# filename (mandatory) Package filename
|
||||
# kitrepoid (mandatory) The repo(s) this package belongs to.
|
||||
# If multiple repos are defined, the package will be built for
|
||||
# the first repo only. For the other repos, a symlink is created
|
||||
# to the package built for the first repo.
|
||||
# Package build methods (optional)
|
||||
# Define how to build the packages.
|
||||
# If you don't specify a build method, the default behavior is
|
||||
# to assume the package is pre-built under
|
||||
# <Kit Build Directory>/source_packages
|
||||
# All files in this section are relative to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# There are four methods to build packages.
|
||||
# 1. Use pre-built RPM package
|
||||
# isexternalpkg: 'no'|'0', 'yes'|'1' (default: 'no')
|
||||
# Indicates whether the RPM package will be added to the
|
||||
# the kit tar file now as part of the kit build process,
|
||||
# or whether the customer will need to separately
|
||||
# obtain the RPM pacakage and add it to the kit tar file
|
||||
# using 'buildkit addpkgs'
|
||||
# rpm_prebuiltdir: If isexternalpkg=yes, path to directory
|
||||
# containing pre-built RPM package
|
||||
# 2. Build RPM from spec + src dir
|
||||
# rpm_spec: Path to spec file.
|
||||
# rpm_srcdir: Path to source directory.
|
||||
# 3. Build RPM from spec + src tarball
|
||||
# rpm_spec: Path to spec file.
|
||||
# rpm_srctarball: Path to source tarball.
|
||||
# 4. Build RPM from source RPM
|
||||
# rpm_srpm: Path to source RPM package.
|
||||
kitpackage:
|
||||
filename=vac.cmp-12.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=vac.lib-12.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=vac.lic-12.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=vacpp.cmp-12.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=vacpp.help.pdf-12.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=vacpp.lib-12.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=vacpp.man-12.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=vacpp.rte-12.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=vacpp.rte.lnk-12.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=vacpp.samples-12.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
@ -1,14 +0,0 @@
|
||||
./opt/ibmcmp/msg/*
|
||||
+./opt/ibmcmp/msg/en_US*
|
||||
|
||||
./opt/ibmcmp/vac/*/crt/include*
|
||||
./opt/ibmcmp/vac/*/include*
|
||||
./opt/ibmcmp/vac/*/msg/*
|
||||
+./opt/ibmcmp/vac/*/msg/en_US*
|
||||
./opt/ibmcmp/vac/*/lap/LI_*
|
||||
./opt/ibmcmp/vac/*/lap/LA_*
|
||||
./opt/ibmcmp/vac/*/lap/license/*.txt
|
||||
|
||||
./opt/ibmcmp/vacpp/*/include*
|
||||
./opt/ibmcmp/vacpp/*/msg/*
|
||||
+./opt/ibmcmp/vacpp/*/msg/en_US*
|
@ -1,175 +0,0 @@
|
||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
require xCAT::KitPluginUtils;
|
||||
|
||||
|
||||
# buildkit Processing
|
||||
# In order to avoid collisions with other plugins, the package
|
||||
# name for this plugin must contain the full kit name.
|
||||
# The buildkit buildtar command will copy this file from your plugins
|
||||
# directory to the the kit build directory, renaming the file with the
|
||||
# correct kit name. All strings in this file of the form
|
||||
# <<<buildkit_WILL_INSERT_kitname_HERE>>>
|
||||
# will be replaced with the full kit name. In order for buildkit to
|
||||
# correctly edit this file, do not remove these strings.
|
||||
|
||||
|
||||
# Global Variables
|
||||
|
||||
# This is the full name of the kit which this plugin belongs
|
||||
# to. The kit name is used by some code in process_request()
|
||||
# to determine if the plugin should run. When you are testing
|
||||
# your plugin the kit name should be set to "TESTMODE" to
|
||||
# bypass the plugin check in process_request().
|
||||
|
||||
our ($PLUGIN_KITNAME);
|
||||
#$PLUGIN_KITNAME = "TESTMODE";
|
||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head1
|
||||
|
||||
Image Profile Kit Plugin
|
||||
This plugin contains commands to run custom actions
|
||||
during image profile operations.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
|
||||
Return list of kit plugin commands handled by this plugin
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
kitimagevalidatecomps => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
|
||||
kitimageimport => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 process_request
|
||||
|
||||
Process the kit plugin command.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
|
||||
# This kit plugin is passed the name of an image profile.
|
||||
# We need to determine which kits is used by this
|
||||
# image profile to decide if this plugin should run or not.
|
||||
|
||||
my $imgprofilename = $request->{arg}->[0];
|
||||
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata)) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_image_profiles([$imgprofilename]);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
||||
if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Name of command and node list
|
||||
my $command = $request->{command}->[0];
|
||||
my $args = $request->{arg};
|
||||
|
||||
if($command eq 'kitimagevalidatecomps') {
|
||||
kitimagevalidatecomps($callback, $args);
|
||||
}
|
||||
elsif ($command eq 'kitimageimport') {
|
||||
kitimageimport($callback, $args);
|
||||
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Command is not supported";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitimagevalidatecomps
|
||||
|
||||
This command is called to validate new changes to an
|
||||
image profile's kit component list before the changes
|
||||
are committed.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitimagevalidatecomps {
|
||||
my $callback = shift;
|
||||
my $args = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $imgprofilename = $args->[0];
|
||||
my $newcomplist = $args->[1];
|
||||
my @newcomplist = ();
|
||||
if (defined($newcomplist)) {
|
||||
@newcomplist = split(/,/, $newcomplist);
|
||||
}
|
||||
my $newosdistro = $args->[2];
|
||||
my $newosdistroupdate = $args->[3];
|
||||
|
||||
$rsp->{data}->[0] = "Running kitimagevalidatecomps";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitimageimport
|
||||
|
||||
This command is called after changes to an image profile
|
||||
have been committed.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitimageimport {
|
||||
my $callback = shift;
|
||||
my $args = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $imgprofilename = $args->[0];
|
||||
|
||||
$rsp->{data}->[0] = "Running kitimageimport";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
@ -1,251 +0,0 @@
|
||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
require xCAT::KitPluginUtils;
|
||||
|
||||
# buildkit Processing
|
||||
# In order to avoid collisions with other plugins, the package
|
||||
# name for this plugin must contain the full kit name.
|
||||
# The buildkit buildtar command will copy this file from your plugins
|
||||
# directory to the the kit build directory, renaming the file with the
|
||||
# correct kit name. All strings in this file of the form
|
||||
# <<<buildkit_WILL_INSERT_kitname_HERE>>>
|
||||
# will be replaced with the full kit name. In order for buildkit to
|
||||
# correctly edit this file, do not remove these strings.
|
||||
|
||||
# Global Variables
|
||||
|
||||
# This is the full name of the kit which this plugin belongs
|
||||
# to. The kit name is used by some code in process_request()
|
||||
# to determine if the plugin should run. When you are testing
|
||||
# your plugin the kit name should be set to "TESTMODE" to
|
||||
# bypass the plugin check in process_request().
|
||||
|
||||
our ($PLUGIN_KITNAME);
|
||||
#$PLUGIN_KITNAME = "TESTMODE";
|
||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head1
|
||||
|
||||
Node Management Kit Plugin
|
||||
This plugin contains commands to run custom actions
|
||||
during node management operations.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
|
||||
Return list of kit plugin commands handled by this plugin
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
kitnodeadd => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnoderemove => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnodeupdate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnoderefresh => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnodefinished => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 process_request
|
||||
|
||||
Process the kit plugin command.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
|
||||
# Name of command and node list
|
||||
my $command = $request->{command}->[0];
|
||||
my $nodes = $request->{node};
|
||||
|
||||
# This kit plugin is passed a list of node names.
|
||||
# We need to determine which kits are used by these
|
||||
# nodes to decide if this plugin should run or not.
|
||||
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata)) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_nodes($nodes);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
||||
if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Get the nodes using this plugin's kit
|
||||
$nodes = $kitdata->{$PLUGIN_KITNAME};
|
||||
|
||||
|
||||
if($command eq 'kitnodeadd') {
|
||||
kitnodeadd($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnoderemove') {
|
||||
kitnoderemove($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnodeupdate') {
|
||||
kitnodeupdate($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnoderefresh') {
|
||||
kitnoderefresh($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnodefinished') {
|
||||
kitnodefinished($callback);
|
||||
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Command is not supported";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodeadd
|
||||
|
||||
This command is called when one or more nodes are added
|
||||
to the cluster.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodeadd {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodeadd";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnoderemove
|
||||
|
||||
This command is called when one or more nodes are
|
||||
removed from the cluster.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnoderemove {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnoderemove";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodeupdate
|
||||
|
||||
This command is called when the configuration of one
|
||||
or more nodes are updated.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodeupdate {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodeupdate";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnoderefresh
|
||||
|
||||
This command is called when node-related configuration
|
||||
files are updated.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnoderefresh {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnoderefresh";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodefinished
|
||||
|
||||
This command is called at the end of a node management
|
||||
operation.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodefinished {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodefinished";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
@ -1,15 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlc/xlc_min_compute-12.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlc/xlc_min_compute-12.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlc/xlc_min_compute-12.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlc/xlc_min_compute-12.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
~
|
@ -1,15 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlc/xlc_compute-12.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlc/xlc_compute-12.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlc/xlc_compute-12.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlc/xlc_compute-12.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
~
|
@ -1,15 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlc/xlc_login-12.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlc/xlc_login-12.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlc/xlc_login-12.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlc/xlc_login-12.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
~
|
@ -1,15 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlc/xlc_min_compute-12.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlc/xlc_min_compute-12.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlc/xlc_min_compute-12.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlc/xlc_min_compute-12.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
~
|
@ -1,15 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlc/xlc_compute-12.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlc/xlc_compute-12.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlc/xlc_compute-12.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlc/xlc_compute-12.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
~
|
@ -1,15 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlc/xlc_login-12.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlc/xlc_login-12.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlc/xlc_login-12.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlc/xlc_login-12.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
~
|
@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Sample script to accept licenses for the IBM vacpp compilers
|
||||
# For Linux:
|
||||
# Assumes all compiler software has been installed
|
||||
|
||||
OS=`uname`
|
||||
if [ $OS != "AIX" ]; then
|
||||
cd $installroot/
|
||||
vacpp_script=`find opt/ibmcmp/vacpp -name new_install -print`
|
||||
|
||||
if [ -n $installroot ]; then
|
||||
# Being run from a stateful install postscript or stateless postbootscript.
|
||||
if [ -n "$vacpp_script" ] ; then
|
||||
echo 1 | chroot $installroot /$vacpp_script
|
||||
fi
|
||||
else
|
||||
# Being run from a stateful install postscript postbootscript.
|
||||
if [ -n "$vacpp_script" ] ; then
|
||||
echo 1 | $vacpp_script
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1,327 +0,0 @@
|
||||
# Kit Build File
|
||||
#
|
||||
# This file was initially auto-generated by the buildkit CLI command.
|
||||
# To create a new kit, the user should modify this file accordingly.
|
||||
# Refer to the buildkit manpage for further details.
|
||||
#
|
||||
|
||||
# kit: This section defines general info for the Kit.
|
||||
# There must be exactly one kit section in a kit build file.
|
||||
#
|
||||
# kit attributes:
|
||||
# basename (mandatory) Kit base name. e.g., kit-lsf
|
||||
# description (optional) Kit description.
|
||||
# version (mandatory) Kit version. e.g., 1.0
|
||||
# ostype (mandatory) Kit OS type. Must be Linux.
|
||||
# AIX is currently not supported.
|
||||
# isinternal (optional) PCM use only.
|
||||
# Indicate if Kit is for internal use.
|
||||
# Use 1 for yes, 0 for no. Default: 0
|
||||
# kitdeployparams (optional) Filename containing a list of kit deployment
|
||||
# parameters, relative to
|
||||
# <Kit Build Directory>/other_files
|
||||
kit:
|
||||
basename=xlf
|
||||
description=XLF14 for Linux
|
||||
version=14.1.0.0
|
||||
ostype=Linux
|
||||
kitlicense=IPLA
|
||||
# kitdeployparams=sample/kitdeployparams.lst
|
||||
|
||||
|
||||
# kitrepo: This section defines a Kit Package Repository.
|
||||
# There must be at least one kitrepo section in a kit build file.
|
||||
# If you want to support multiple OSes, you should create a separate
|
||||
# repo for each OS. Also, no two repos can be defined with the same
|
||||
# OS name, major/minor version and arch. For example, you cannot have
|
||||
# two repos for RHEL 6.2 ppc64 in the same kit.
|
||||
#
|
||||
# kitrepo attributes:
|
||||
# kitrepoid (mandatory) Kit package repository ID.
|
||||
# Must be unique within this file.
|
||||
# osbasename (mandatory) OS distro base name. e.g., rhels.
|
||||
# osmajorversion (mandatory) OS major version. e.g., 6
|
||||
# osminorversion (optional) OS minor version.
|
||||
# osarch (mandatory) OS architecture. e.g., ppc64
|
||||
# compat_osbasenames (optional) Comma-separated list of compatible
|
||||
# OS distro base names. e.g., centos
|
||||
|
||||
kitrepo:
|
||||
kitrepoid=rhels6_ppc64
|
||||
osbasename=rhels
|
||||
osmajorversion=6
|
||||
osarch=ppc64
|
||||
|
||||
kitrepo:
|
||||
kitrepoid=sles11_ppc64
|
||||
osbasename=sles
|
||||
osmajorversion=11
|
||||
osarch=ppc64
|
||||
|
||||
|
||||
# kitcomponent: This section defines one Kit Component.
|
||||
# There can be zero or more kitcomponent sections.
|
||||
# If you want to build a component which supports multiple OSes,
|
||||
# you should create one kitcomponent section for each OS.
|
||||
# Also, no two components in a kit can be defined with the same
|
||||
# base name.
|
||||
# You can define multiple kit components with the same base name
|
||||
# only if each kit component using this base name meets these
|
||||
# requirements:
|
||||
# - Each kit component must be defined with the same version
|
||||
# and release number
|
||||
# - Each kit component must be defined with a unique kitrepoid
|
||||
|
||||
#
|
||||
# kitcomponent attributes:
|
||||
# basename (mandatory) Kit component base name
|
||||
# description (optional) Kit component description
|
||||
# version (mandatory) Kit component version
|
||||
# release (mandatory) Kit component release
|
||||
# serverroles (mandatory) Comma-separated list of servers that this
|
||||
# component can install on. Valid values:
|
||||
# mgtnode,service,compute,login,storage
|
||||
# kitrepoid (mandatory) The ID of the kit package repository this
|
||||
# component belongs to
|
||||
# kitcompdeps (optional) Comma-separated list of kit component
|
||||
# dependencies. These kit components can be included in
|
||||
# this kit or in other kits.
|
||||
# ospkgdeps (optional) Comma-separated list of OS package dependencies
|
||||
# These packages must be shipped with the OS distro.
|
||||
# kitpkgdeps (optional) Comma-separated list of kit package names that
|
||||
# will be listed as "REQUIRES" when building this kit
|
||||
# component. Each package must be defined in a separate
|
||||
# kitpackage section. Each package must be in the same
|
||||
# kitrepo as this kit component.
|
||||
# non_native_pkgs (optional) TBD -- NOT SUPPORTED YET!
|
||||
# Comma-separated list of non-native package
|
||||
# paths that will be included as files in this kit
|
||||
# component. All filenames are relative to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# Kit component deployment scripts must be specified
|
||||
# to manage these files.
|
||||
# driverpacks (optional) Comma-separated list of driver package filenames
|
||||
# Each driverpack must be defined in a separate kitpackage
|
||||
# section.
|
||||
# exlist (optional) Exclude list file for stateless image, relative
|
||||
# to <Kit Build Directory>/other_files
|
||||
# Kit component deployment scripts (optional) Each attribute specifies
|
||||
# script path relative to <Kit Build Directory>/scripts
|
||||
# Script attributes:
|
||||
# preinstall, postinstall, preuninstall, postuninstall,
|
||||
# preupgrade, postupgrade, postbootscripts
|
||||
kitcomponent:
|
||||
basename=xlf_compute
|
||||
description=XLF14 for compute nodes
|
||||
version=14.1.0.0
|
||||
release=120323
|
||||
serverroles=compute
|
||||
kitrepoid=rhels6_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64),compat-libstdc++-33(ppc-32),compat-libstdc++-33(ppc-64)
|
||||
kitpkgdeps=xlmass.lib >= 7.1.0.0,xlsmp.msg.rte >= 3.1.0.0,xlsmp.rte >= 3.1.0.0,xlsmp.lib >= 3.1.0.0,xlf.msg.rte >= 14.1.0.0,xlf.rte >= 14.1.0.0,xlf.rte.lnk >= 14.1.0.0,xlf.help.pdf >= 14.1.0.0,xlf.samples >= 14.1.0.0,xlf.man >= 14.1.0.0,xlf.lic >= 14.1.0.0
|
||||
exlist=xlf.exlist
|
||||
genimage_postinstall=xlf_license,rhels_xlf_compute_install
|
||||
non_native_pkgs=EXTERNALPKGS:xlf.lib-14.1.0.0-*.rpm,EXTERNALPKGS:xlf.cmp-14.1.0.0-*.rpm
|
||||
|
||||
kitcomponent:
|
||||
basename=xlf_login
|
||||
description=XLF14 for login nodes
|
||||
version=14.1.0.0
|
||||
release=120323
|
||||
serverroles=login
|
||||
kitrepoid=rhels6_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64),compat-libstdc++-33(ppc-32),compat-libstdc++-33(ppc-64)
|
||||
kitpkgdeps=xlmass.lib >= 7.1.0.0,xlsmp.msg.rte >= 3.1.0.0,xlsmp.rte >= 3.1.0.0,xlsmp.lib >= 3.1.0.0,xlf.msg.rte >= 14.1.0.0,xlf.rte >= 14.1.0.0,xlf.rte.lnk >= 14.1.0.0,xlf.help.pdf >= 14.1.0.0,xlf.samples >= 14.1.0.0,xlf.man >= 14.1.0.0,xlf.lic >= 14.1.0.0
|
||||
exlist=xlf.exlist
|
||||
genimage_postinstall=xlf_license,rhels_xlf_login_install
|
||||
non_native_pkgs=EXTERNALPKGS:xlf.lib-14.1.0.0-*.rpm,EXTERNALPKGS:xlf.cmp-14.1.0.0-*.rpm
|
||||
|
||||
kitcomponent:
|
||||
basename=min_xlf_compute
|
||||
description=Minimal XLF14 packages for compute nodes
|
||||
version=14.1.0.0
|
||||
release=120323
|
||||
serverroles=compute
|
||||
kitrepoid=rhels6_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64),compat-libstdc++-33(ppc-32),compat-libstdc++-33(ppc-64)
|
||||
kitpkgdeps=xlsmp.msg.rte >= 3.1.0.0,xlsmp.rte >= 3.1.0.0,xlf.msg.rte >= 14.1.0.0,xlf.rte >= 14.1.0.0,xlf.rte.lnk >= 14.1.0.00
|
||||
exlist=xlf.exlist
|
||||
genimage_postinstall=xlf_license,rhels_min_xlf_compute_install
|
||||
non_native_pkgs=EXTERNALPKGS:xlf.lib-14.1.0.0-*.rpm,EXTERNALPKGS:xlf.cmp-14.1.0.0-*.rpm
|
||||
|
||||
|
||||
kitcomponent:
|
||||
basename=xlf_compute
|
||||
description=XLF14 for compute nodes
|
||||
version=14.1.0.0
|
||||
release=120323
|
||||
serverroles=compute
|
||||
kitrepoid=sles11_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64),compat-libstdc++-33(ppc-32),compat-libstdc++-33(ppc-64)
|
||||
kitpkgdeps=xlmass.lib >= 7.1.0.0,xlsmp.msg.rte >= 3.1.0.0,xlsmp.rte >= 3.1.0.0,xlsmp.lib >= 3.1.0.0,xlf.msg.rte >= 14.1.0.0,xlf.rte >= 14.1.0.0,xlf.rte.lnk >= 14.1.0.0,xlf.help.pdf >= 14.1.0.0,xlf.samples >= 14.1.0.0,xlf.man >= 14.1.0.0,xlf.lic >= 14.1.0.0
|
||||
exlist=xlf.exlist
|
||||
genimage_postinstall=xlf_license,sles_xlf_compute_install
|
||||
non_native_pkgs=EXTERNALPKGS:xlf.lib-14.1.0.0-*.rpm,EXTERNALPKGS:xlf.cmp-14.1.0.0-*.rpm
|
||||
|
||||
kitcomponent:
|
||||
basename=xlf_login
|
||||
description=XLF14 for login nodes
|
||||
version=14.1.0.0
|
||||
release=120323
|
||||
serverroles=login
|
||||
kitrepoid=sles11_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64),compat-libstdc++-33(ppc-32),compat-libstdc++-33(ppc-64)
|
||||
kitpkgdeps=xlmass.lib >= 7.1.0.0,xlsmp.msg.rte >= 3.1.0.0,xlsmp.rte >= 3.1.0.0,xlsmp.lib >= 3.1.0.0,xlf.msg.rte >= 14.1.0.0,xlf.rte >= 14.1.0.0,xlf.rte.lnk >= 14.1.0.0,xlf.help.pdf >= 14.1.0.0,xlf.samples >= 14.1.0.0,xlf.man >= 14.1.0.0,xlf.lic >= 14.1.0.0
|
||||
exlist=xlf.exlist
|
||||
genimage_postinstall=xlf_license,sles_xlf_login_install
|
||||
non_native_pkgs=EXTERNALPKGS:xlf.lib-14.1.0.0-*.rpm,EXTERNALPKGS:xlf.cmp-14.1.0.0-*.rpm
|
||||
|
||||
kitcomponent:
|
||||
basename=min_xlf_compute
|
||||
description=Minimal XLF14 packages for compute nodes
|
||||
version=14.1.0.0
|
||||
release=120323
|
||||
serverroles=compute
|
||||
kitrepoid=sles11_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64),compat-libstdc++-33(ppc-32),compat-libstdc++-33(ppc-64)
|
||||
kitpkgdeps=xlsmp.msg.rte >= 3.1.0.0,xlsmp.rte >= 3.1.0.0,xlf.msg.rte >= 14.1.0.0,xlf.rte >= 14.1.0.0,xlf.rte.lnk >= 14.1.0.00
|
||||
exlist=xlf.exlist
|
||||
genimage_postinstall=xlf_license,sles_min_xlf_compute_install
|
||||
non_native_pkgs=EXTERNALPKGS:xlf.lib-14.1.0.0-*.rpm,EXTERNALPKGS:xlf.cmp-14.1.0.0-*.rpm
|
||||
|
||||
# kitpackage: This section defines one Kit Package, and how to build it.
|
||||
# There can be zero or more kitpackage sections.
|
||||
# All filenames should be relative paths to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# If you want to build a package which can run on multiple OSes,
|
||||
# you have two options:
|
||||
# 1. Build a separate package for each OS you want to support.
|
||||
# For this option, you need to define one kitpackage section
|
||||
# per supported OS.
|
||||
# 2. Build one package that can run on multiple OSes.
|
||||
# If you are building an RPM package, you are responsible for
|
||||
# creating an RPM spec file that can run on multiple OSes.
|
||||
# For this option, you need to define one kitpackage section
|
||||
# which contains multiple kitrepoid lines.
|
||||
#
|
||||
# kitpackage attributes:
|
||||
# filename (mandatory) Package filename
|
||||
# kitrepoid (mandatory) The repo(s) this package belongs to.
|
||||
# If multiple repos are defined, the package will be built for
|
||||
# the first repo only. For the other repos, a symlink is created
|
||||
# to the package built for the first repo.
|
||||
# Package build methods (optional)
|
||||
# Define how to build the packages.
|
||||
# If you don't specify a build method, the default behavior is
|
||||
# to assume the package is pre-built under
|
||||
# <Kit Build Directory>/source_packages
|
||||
# All files in this section are relative to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# There are four methods to build packages.
|
||||
# 1. Use pre-built RPM package
|
||||
# isexternalpkg: 'no'|'0', 'yes'|'1' (default: 'no')
|
||||
# Indicates whether the RPM package will be added to the
|
||||
# the kit tar file now as part of the kit build process,
|
||||
# or whether the customer will need to separately
|
||||
# obtain the RPM pacakage and add it to the kit tar file
|
||||
# using 'buildkit addpkgs'
|
||||
# rpm_prebuiltdir: If isexternalpkg=yes, path to directory
|
||||
# containing pre-built RPM package
|
||||
# 2. Build RPM from spec + src dir
|
||||
# rpm_spec: Path to spec file.
|
||||
# rpm_srcdir: Path to source directory.
|
||||
# 3. Build RPM from spec + src tarball
|
||||
# rpm_spec: Path to spec file.
|
||||
# rpm_srctarball: Path to source tarball.
|
||||
# 4. Build RPM from source RPM
|
||||
# rpm_srpm: Path to source RPM package.
|
||||
kitpackage:
|
||||
filename=xlf.cmp-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlf.help.pdf-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlf.lib-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlf.lic-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlf.man-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlf.msg.rte-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlf.rte-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlf.rte.lnk-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlf.samples-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlmass.lib-7.1.0.0-120322.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlsmp.lib-3.1.0.0-120315a.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlsmp.msg.rte-3.1.0.0-120315a.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlsmp.rte-3.1.0.0-120315a.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
@ -1,14 +0,0 @@
|
||||
./opt/ibmcmp/msg/*
|
||||
+./opt/ibmcmp/msg/en_US*
|
||||
|
||||
./opt/ibmcmp/xlmass/*/include*
|
||||
./opt/ibmcmp/xlsmp/*/include*
|
||||
./opt/ibmcmp/xlhelp*
|
||||
|
||||
./opt/ibmcmp/xlf/*/include*
|
||||
./opt/ibmcmp/xlf/*/msg/*
|
||||
+./opt/ibmcmp/xlf/*/msg/en_US*
|
||||
./opt/ibmcmp/xlf/*/lap/LA_*
|
||||
./opt/ibmcmp/xlf/*/lap/LI_*
|
||||
./opt/ibmcmp/xlf/*/lap/license/*.txt
|
||||
|
@ -1,175 +0,0 @@
|
||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
require xCAT::KitPluginUtils;
|
||||
|
||||
|
||||
# buildkit Processing
|
||||
# In order to avoid collisions with other plugins, the package
|
||||
# name for this plugin must contain the full kit name.
|
||||
# The buildkit buildtar command will copy this file from your plugins
|
||||
# directory to the the kit build directory, renaming the file with the
|
||||
# correct kit name. All strings in this file of the form
|
||||
# <<<buildkit_WILL_INSERT_kitname_HERE>>>
|
||||
# will be replaced with the full kit name. In order for buildkit to
|
||||
# correctly edit this file, do not remove these strings.
|
||||
|
||||
|
||||
# Global Variables
|
||||
|
||||
# This is the full name of the kit which this plugin belongs
|
||||
# to. The kit name is used by some code in process_request()
|
||||
# to determine if the plugin should run. When you are testing
|
||||
# your plugin the kit name should be set to "TESTMODE" to
|
||||
# bypass the plugin check in process_request().
|
||||
|
||||
our ($PLUGIN_KITNAME);
|
||||
#$PLUGIN_KITNAME = "TESTMODE";
|
||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head1
|
||||
|
||||
Image Profile Kit Plugin
|
||||
This plugin contains commands to run custom actions
|
||||
during image profile operations.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
|
||||
Return list of kit plugin commands handled by this plugin
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
kitimagevalidatecomps => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
|
||||
kitimageimport => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 process_request
|
||||
|
||||
Process the kit plugin command.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
|
||||
# This kit plugin is passed the name of an image profile.
|
||||
# We need to determine which kits is used by this
|
||||
# image profile to decide if this plugin should run or not.
|
||||
|
||||
my $imgprofilename = $request->{arg}->[0];
|
||||
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata)) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_image_profiles([$imgprofilename]);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
||||
if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Name of command and node list
|
||||
my $command = $request->{command}->[0];
|
||||
my $args = $request->{arg};
|
||||
|
||||
if($command eq 'kitimagevalidatecomps') {
|
||||
kitimagevalidatecomps($callback, $args);
|
||||
}
|
||||
elsif ($command eq 'kitimageimport') {
|
||||
kitimageimport($callback, $args);
|
||||
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Command is not supported";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitimagevalidatecomps
|
||||
|
||||
This command is called to validate new changes to an
|
||||
image profile's kit component list before the changes
|
||||
are committed.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitimagevalidatecomps {
|
||||
my $callback = shift;
|
||||
my $args = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $imgprofilename = $args->[0];
|
||||
my $newcomplist = $args->[1];
|
||||
my @newcomplist = ();
|
||||
if (defined($newcomplist)) {
|
||||
@newcomplist = split(/,/, $newcomplist);
|
||||
}
|
||||
my $newosdistro = $args->[2];
|
||||
my $newosdistroupdate = $args->[3];
|
||||
|
||||
$rsp->{data}->[0] = "Running kitimagevalidatecomps";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitimageimport
|
||||
|
||||
This command is called after changes to an image profile
|
||||
have been committed.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitimageimport {
|
||||
my $callback = shift;
|
||||
my $args = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $imgprofilename = $args->[0];
|
||||
|
||||
$rsp->{data}->[0] = "Running kitimageimport";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
@ -1,251 +0,0 @@
|
||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
require xCAT::KitPluginUtils;
|
||||
|
||||
# buildkit Processing
|
||||
# In order to avoid collisions with other plugins, the package
|
||||
# name for this plugin must contain the full kit name.
|
||||
# The buildkit buildtar command will copy this file from your plugins
|
||||
# directory to the the kit build directory, renaming the file with the
|
||||
# correct kit name. All strings in this file of the form
|
||||
# <<<buildkit_WILL_INSERT_kitname_HERE>>>
|
||||
# will be replaced with the full kit name. In order for buildkit to
|
||||
# correctly edit this file, do not remove these strings.
|
||||
|
||||
# Global Variables
|
||||
|
||||
# This is the full name of the kit which this plugin belongs
|
||||
# to. The kit name is used by some code in process_request()
|
||||
# to determine if the plugin should run. When you are testing
|
||||
# your plugin the kit name should be set to "TESTMODE" to
|
||||
# bypass the plugin check in process_request().
|
||||
|
||||
our ($PLUGIN_KITNAME);
|
||||
#$PLUGIN_KITNAME = "TESTMODE";
|
||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head1
|
||||
|
||||
Node Management Kit Plugin
|
||||
This plugin contains commands to run custom actions
|
||||
during node management operations.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
|
||||
Return list of kit plugin commands handled by this plugin
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
kitnodeadd => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnoderemove => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnodeupdate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnoderefresh => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnodefinished => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 process_request
|
||||
|
||||
Process the kit plugin command.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
|
||||
# Name of command and node list
|
||||
my $command = $request->{command}->[0];
|
||||
my $nodes = $request->{node};
|
||||
|
||||
# This kit plugin is passed a list of node names.
|
||||
# We need to determine which kits are used by these
|
||||
# nodes to decide if this plugin should run or not.
|
||||
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata)) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_nodes($nodes);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
||||
if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Get the nodes using this plugin's kit
|
||||
$nodes = $kitdata->{$PLUGIN_KITNAME};
|
||||
|
||||
|
||||
if($command eq 'kitnodeadd') {
|
||||
kitnodeadd($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnoderemove') {
|
||||
kitnoderemove($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnodeupdate') {
|
||||
kitnodeupdate($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnoderefresh') {
|
||||
kitnoderefresh($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnodefinished') {
|
||||
kitnodefinished($callback);
|
||||
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Command is not supported";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodeadd
|
||||
|
||||
This command is called when one or more nodes are added
|
||||
to the cluster.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodeadd {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodeadd";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnoderemove
|
||||
|
||||
This command is called when one or more nodes are
|
||||
removed from the cluster.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnoderemove {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnoderemove";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodeupdate
|
||||
|
||||
This command is called when the configuration of one
|
||||
or more nodes are updated.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodeupdate {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodeupdate";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnoderefresh
|
||||
|
||||
This command is called when node-related configuration
|
||||
files are updated.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnoderefresh {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnoderefresh";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodefinished
|
||||
|
||||
This command is called at the end of a node management
|
||||
operation.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodefinished {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodefinished";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
@ -1,14 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlf/min_xlf_compute-14.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlf/min_xlf_compute-14.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlf/min_xlf_compute-14.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlf/min_xlf_compute-14.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,14 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlf/xlf_compute-14.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlf/xlf_compute-14.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlf/xlf_compute-14.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlf/xlf_compute-14.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,14 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlf/xlf_login-14.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlf/xlf_login-14.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlf/xlf_login-14.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlf/xlf_login-14.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,14 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlf/min_xlf_compute-14.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlf/min_xlf_compute-14.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlf/min_xlf_compute-14.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlf/min_xlf_compute-14.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,14 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlf/xlf_compute-14.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlf/xlf_compute-14.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlf/xlf_compute-14.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlf/xlf_compute-14.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,14 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlf/xlf_login-14.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlf/xlf_login-14.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlf/xlf_login-14.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlf/xlf_login-14.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Sample script to accept licenses for the IBM xlf compilers
|
||||
# For Linux:
|
||||
# Assumes all compiler software has been installed
|
||||
|
||||
OS=`uname`
|
||||
if [ $OS != "AIX" ]; then
|
||||
cd $installroot/
|
||||
xlf_script=`find opt/ibmcmp/xlf -name new_install -print`
|
||||
|
||||
if [ -n $installroot ]; then
|
||||
# Being run from a stateful install postscript or stateless postbootscript.
|
||||
if [ -n "$xlf_script" ] ; then
|
||||
echo 1 | chroot $installroot /$xlf_script
|
||||
fi
|
||||
else
|
||||
# Being run from a stateful install postscript postbootscript.
|
||||
if [ -n "$xlf_script" ] ; then
|
||||
echo 1 | $xlf_script
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1,340 +0,0 @@
|
||||
# Kit Build File
|
||||
#
|
||||
# This file was initially auto-generated by the buildkit CLI command.
|
||||
# To create a new kit, the user should modify this file accordingly.
|
||||
# Refer to the buildkit manpage for further details.
|
||||
#
|
||||
|
||||
# kit: This section defines general info for the Kit.
|
||||
# There must be exactly one kit section in a kit build file.
|
||||
#
|
||||
# kit attributes:
|
||||
# basename (mandatory) Kit base name. e.g., kit-lsf
|
||||
# description (optional) Kit description.
|
||||
# version (mandatory) Kit version. e.g., 1.0
|
||||
# ostype (mandatory) Kit OS type. Must be Linux.
|
||||
# AIX is currently not supported.
|
||||
# isinternal (optional) PCM use only.
|
||||
# Indicate if Kit is for internal use.
|
||||
# Use 1 for yes, 0 for no. Default: 0
|
||||
# kitdeployparams (optional) Filename containing a list of kit deployment
|
||||
# parameters, relative to
|
||||
# <Kit Build Directory>/other_files
|
||||
kit:
|
||||
basename=xlf
|
||||
description=XLF14 for Linux
|
||||
version=14.1.0.0
|
||||
ostype=Linux
|
||||
kitlicense=IPLA
|
||||
# kitdeployparams=sample/kitdeployparams.lst
|
||||
|
||||
|
||||
# kitrepo: This section defines a Kit Package Repository.
|
||||
# There must be at least one kitrepo section in a kit build file.
|
||||
# If you want to support multiple OSes, you should create a separate
|
||||
# repo for each OS. Also, no two repos can be defined with the same
|
||||
# OS name, major/minor version and arch. For example, you cannot have
|
||||
# two repos for RHEL 6.2 ppc64 in the same kit.
|
||||
#
|
||||
# kitrepo attributes:
|
||||
# kitrepoid (mandatory) Kit package repository ID.
|
||||
# Must be unique within this file.
|
||||
# osbasename (mandatory) OS distro base name. e.g., rhels.
|
||||
# osmajorversion (mandatory) OS major version. e.g., 6
|
||||
# osminorversion (optional) OS minor version.
|
||||
# osarch (mandatory) OS architecture. e.g., ppc64
|
||||
# compat_osbasenames (optional) Comma-separated list of compatible
|
||||
# OS distro base names. e.g., centos
|
||||
|
||||
kitrepo:
|
||||
kitrepoid=rhels6_ppc64
|
||||
osbasename=rhels
|
||||
osmajorversion=6
|
||||
osarch=ppc64
|
||||
|
||||
kitrepo:
|
||||
kitrepoid=sles11_ppc64
|
||||
osbasename=sles
|
||||
osmajorversion=11
|
||||
osarch=ppc64
|
||||
|
||||
|
||||
# kitcomponent: This section defines one Kit Component.
|
||||
# There can be zero or more kitcomponent sections.
|
||||
# If you want to build a component which supports multiple OSes,
|
||||
# you should create one kitcomponent section for each OS.
|
||||
# Also, no two components in a kit can be defined with the same
|
||||
# base name.
|
||||
# You can define multiple kit components with the same base name
|
||||
# only if each kit component using this base name meets these
|
||||
# requirements:
|
||||
# - Each kit component must be defined with the same version
|
||||
# and release number
|
||||
# - Each kit component must be defined with a unique kitrepoid
|
||||
|
||||
#
|
||||
# kitcomponent attributes:
|
||||
# basename (mandatory) Kit component base name
|
||||
# description (optional) Kit component description
|
||||
# version (mandatory) Kit component version
|
||||
# release (mandatory) Kit component release
|
||||
# serverroles (mandatory) Comma-separated list of servers that this
|
||||
# component can install on. Valid values:
|
||||
# mgtnode,service,compute,login,storage
|
||||
# kitrepoid (mandatory) The ID of the kit package repository this
|
||||
# component belongs to
|
||||
# kitcompdeps (optional) Comma-separated list of kit component
|
||||
# dependencies. These kit components can be included in
|
||||
# this kit or in other kits.
|
||||
# ospkgdeps (optional) Comma-separated list of OS package dependencies
|
||||
# These packages must be shipped with the OS distro.
|
||||
# kitpkgdeps (optional) Comma-separated list of kit package names that
|
||||
# will be listed as "REQUIRES" when building this kit
|
||||
# component. Each package must be defined in a separate
|
||||
# kitpackage section. Each package must be in the same
|
||||
# kitrepo as this kit component.
|
||||
# non_native_pkgs (optional) TBD -- NOT SUPPORTED YET!
|
||||
# Comma-separated list of non-native package
|
||||
# paths that will be included as files in this kit
|
||||
# component. All filenames are relative to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# Kit component deployment scripts must be specified
|
||||
# to manage these files.
|
||||
# driverpacks (optional) Comma-separated list of driver package filenames
|
||||
# Each driverpack must be defined in a separate kitpackage
|
||||
# section.
|
||||
# exlist (optional) Exclude list file for stateless image, relative
|
||||
# to <Kit Build Directory>/other_files
|
||||
# Kit component deployment scripts (optional) Each attribute specifies
|
||||
# script path relative to <Kit Build Directory>/scripts
|
||||
# Script attributes:
|
||||
# preinstall, postinstall, preuninstall, postuninstall,
|
||||
# preupgrade, postupgrade, postbootscripts
|
||||
kitcomponent:
|
||||
basename=xlf_compute
|
||||
description=XLF14 for compute nodes
|
||||
version=14.1.0.0
|
||||
release=120323
|
||||
serverroles=compute
|
||||
kitrepoid=rhels6_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64),compat-libstdc++-33(ppc-32),compat-libstdc++-33(ppc-64)
|
||||
kitpkgdeps=xlmass.lib >= 7.1.0.0,xlsmp.msg.rte >= 3.1.0.0,xlsmp.rte >= 3.1.0.0,xlsmp.lib >= 3.1.0.0,xlf.msg.rte >= 14.1.0.0,xlf.rte >= 14.1.0.0,xlf.rte.lnk >= 14.1.0.0,xlf.help.pdf >= 14.1.0.0,xlf.samples >= 14.1.0.0,xlf.man >= 14.1.0.0,xlf.lic >= 14.1.0.0
|
||||
exlist=xlf.exlist
|
||||
genimage_postinstall=xlf_license,rhels_xlf_compute_install
|
||||
non_native_pkgs=EXTERNALPKGS:xlf.lib-14.1.0.0-*.rpm,EXTERNALPKGS:xlf.cmp-14.1.0.0-*.rpm
|
||||
|
||||
kitcomponent:
|
||||
basename=xlf_login
|
||||
description=XLF14 for login nodes
|
||||
version=14.1.0.0
|
||||
release=120323
|
||||
serverroles=login
|
||||
kitrepoid=rhels6_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64),compat-libstdc++-33(ppc-32),compat-libstdc++-33(ppc-64)
|
||||
kitpkgdeps=xlmass.lib >= 7.1.0.0,xlsmp.msg.rte >= 3.1.0.0,xlsmp.rte >= 3.1.0.0,xlsmp.lib >= 3.1.0.0,xlf.msg.rte >= 14.1.0.0,xlf.rte >= 14.1.0.0,xlf.rte.lnk >= 14.1.0.0,xlf.help.pdf >= 14.1.0.0,xlf.samples >= 14.1.0.0,xlf.man >= 14.1.0.0,xlf.lic >= 14.1.0.0
|
||||
exlist=xlf.exlist
|
||||
genimage_postinstall=xlf_license,rhels_xlf_login_install
|
||||
non_native_pkgs=EXTERNALPKGS:xlf.lib-14.1.0.0-*.rpm,EXTERNALPKGS:xlf.cmp-14.1.0.0-*.rpm
|
||||
|
||||
kitcomponent:
|
||||
basename=min_xlf_compute
|
||||
description=Minimal XLF14 packages for compute nodes
|
||||
version=14.1.0.0
|
||||
release=120323
|
||||
serverroles=compute
|
||||
kitrepoid=rhels6_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64),compat-libstdc++-33(ppc-32),compat-libstdc++-33(ppc-64)
|
||||
kitpkgdeps=xlsmp.msg.rte >= 3.1.0.0,xlsmp.rte >= 3.1.0.0,xlf.msg.rte >= 14.1.0.0,xlf.rte >= 14.1.0.0,xlf.rte.lnk >= 14.1.0.00
|
||||
exlist=xlf.exlist
|
||||
genimage_postinstall=xlf_license,rhels_min_xlf_compute_install
|
||||
non_native_pkgs=EXTERNALPKGS:xlf.lib-14.1.0.0-*.rpm,EXTERNALPKGS:xlf.cmp-14.1.0.0-*.rpm
|
||||
|
||||
|
||||
kitcomponent:
|
||||
basename=xlf_compute
|
||||
description=XLF14 for compute nodes
|
||||
version=14.1.0.0
|
||||
release=120323
|
||||
serverroles=compute
|
||||
kitrepoid=sles11_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64),compat-libstdc++-33(ppc-32),compat-libstdc++-33(ppc-64)
|
||||
kitpkgdeps=xlmass.lib >= 7.1.0.0,xlsmp.msg.rte >= 3.1.0.0,xlsmp.rte >= 3.1.0.0,xlsmp.lib >= 3.1.0.0,xlf.msg.rte >= 14.1.0.0,xlf.rte >= 14.1.0.0,xlf.rte.lnk >= 14.1.0.0,xlf.help.pdf >= 14.1.0.0,xlf.samples >= 14.1.0.0,xlf.man >= 14.1.0.0,xlf.lic >= 14.1.0.0
|
||||
exlist=xlf.exlist
|
||||
genimage_postinstall=xlf_license,sles_xlf_compute_install
|
||||
non_native_pkgs=EXTERNALPKGS:xlf.lib-14.1.0.0-*.rpm,EXTERNALPKGS:xlf.cmp-14.1.0.0-*.rpm
|
||||
|
||||
kitcomponent:
|
||||
basename=xlf_login
|
||||
description=XLF14 for login nodes
|
||||
version=14.1.0.0
|
||||
release=120323
|
||||
serverroles=login
|
||||
kitrepoid=sles11_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64),compat-libstdc++-33(ppc-32),compat-libstdc++-33(ppc-64)
|
||||
kitpkgdeps=xlmass.lib >= 7.1.0.0,xlsmp.msg.rte >= 3.1.0.0,xlsmp.rte >= 3.1.0.0,xlsmp.lib >= 3.1.0.0,xlf.msg.rte >= 14.1.0.0,xlf.rte >= 14.1.0.0,xlf.rte.lnk >= 14.1.0.0,xlf.help.pdf >= 14.1.0.0,xlf.samples >= 14.1.0.0,xlf.man >= 14.1.0.0,xlf.lic >= 14.1.0.0
|
||||
exlist=xlf.exlist
|
||||
genimage_postinstall=xlf_license,sles_xlf_login_install
|
||||
non_native_pkgs=EXTERNALPKGS:xlf.lib-14.1.0.0-*.rpm,EXTERNALPKGS:xlf.cmp-14.1.0.0-*.rpm
|
||||
|
||||
kitcomponent:
|
||||
basename=min_xlf_compute
|
||||
description=Minimal XLF14 packages for compute nodes
|
||||
version=14.1.0.0
|
||||
release=120323
|
||||
serverroles=compute
|
||||
kitrepoid=sles11_ppc64
|
||||
ospkgdeps=libstdc++(ppc-32),libstdc++(ppc-64),libstdc++-devel(ppc-32),libstdc++-devel(ppc-64),glibc-devel(ppc-32),glibc-devel(ppc-64),compat-libstdc++-33(ppc-32),compat-libstdc++-33(ppc-64)
|
||||
kitpkgdeps=xlsmp.msg.rte >= 3.1.0.0,xlsmp.rte >= 3.1.0.0,xlf.msg.rte >= 14.1.0.0,xlf.rte >= 14.1.0.0,xlf.rte.lnk >= 14.1.0.00
|
||||
exlist=xlf.exlist
|
||||
genimage_postinstall=xlf_license,sles_min_xlf_compute_install
|
||||
non_native_pkgs=EXTERNALPKGS:xlf.lib-14.1.0.0-*.rpm,EXTERNALPKGS:xlf.cmp-14.1.0.0-*.rpm
|
||||
|
||||
# kitpackage: This section defines one Kit Package, and how to build it.
|
||||
# There can be zero or more kitpackage sections.
|
||||
# All filenames should be relative paths to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# If you want to build a package which can run on multiple OSes,
|
||||
# you have two options:
|
||||
# 1. Build a separate package for each OS you want to support.
|
||||
# For this option, you need to define one kitpackage section
|
||||
# per supported OS.
|
||||
# 2. Build one package that can run on multiple OSes.
|
||||
# If you are building an RPM package, you are responsible for
|
||||
# creating an RPM spec file that can run on multiple OSes.
|
||||
# For this option, you need to define one kitpackage section
|
||||
# which contains multiple kitrepoid lines.
|
||||
#
|
||||
# kitpackage attributes:
|
||||
# filename (mandatory) Package filename
|
||||
# kitrepoid (mandatory) The repo(s) this package belongs to.
|
||||
# If multiple repos are defined, the package will be built for
|
||||
# the first repo only. For the other repos, a symlink is created
|
||||
# to the package built for the first repo.
|
||||
# Package build methods (optional)
|
||||
# Define how to build the packages.
|
||||
# If you don't specify a build method, the default behavior is
|
||||
# to assume the package is pre-built under
|
||||
# <Kit Build Directory>/source_packages
|
||||
# All files in this section are relative to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# There are four methods to build packages.
|
||||
# 1. Use pre-built RPM package
|
||||
# isexternalpkg: 'no'|'0', 'yes'|'1' (default: 'no')
|
||||
# Indicates whether the RPM package will be added to the
|
||||
# the kit tar file now as part of the kit build process,
|
||||
# or whether the customer will need to separately
|
||||
# obtain the RPM pacakage and add it to the kit tar file
|
||||
# using 'buildkit addpkgs'
|
||||
# rpm_prebuiltdir: If isexternalpkg=no, path to directory
|
||||
# containing pre-built RPM package
|
||||
# 2. Build RPM from spec + src dir
|
||||
# rpm_spec: Path to spec file.
|
||||
# rpm_srcdir: Path to source directory.
|
||||
# 3. Build RPM from spec + src tarball
|
||||
# rpm_spec: Path to spec file.
|
||||
# rpm_srctarball: Path to source tarball.
|
||||
# 4. Build RPM from source RPM
|
||||
# rpm_srpm: Path to source RPM package.
|
||||
kitpackage:
|
||||
filename=xlf.cmp-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlf.help.pdf-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlf.lib-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlf.lic-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlf.man-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlf.msg.rte-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlf.rte-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlf.rte.lnk-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlf.samples-14.1.0.0-120323.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlmass.lib-7.1.0.0-120322.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlsmp.lib-3.1.0.0-120315a.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlsmp.msg.rte-3.1.0.0-120315a.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=xlsmp.rte-3.1.0.0-120315a.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
@ -1,14 +0,0 @@
|
||||
./opt/ibmcmp/msg/*
|
||||
+./opt/ibmcmp/msg/en_US*
|
||||
|
||||
./opt/ibmcmp/xlmass/*/include*
|
||||
./opt/ibmcmp/xlsmp/*/include*
|
||||
./opt/ibmcmp/xlhelp*
|
||||
|
||||
./opt/ibmcmp/xlf/*/include*
|
||||
./opt/ibmcmp/xlf/*/msg/*
|
||||
+./opt/ibmcmp/xlf/*/msg/en_US*
|
||||
./opt/ibmcmp/xlf/*/lap/LA_*
|
||||
./opt/ibmcmp/xlf/*/lap/LI_*
|
||||
./opt/ibmcmp/xlf/*/lap/license/*.txt
|
||||
|
@ -1,175 +0,0 @@
|
||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
require xCAT::KitPluginUtils;
|
||||
|
||||
|
||||
# buildkit Processing
|
||||
# In order to avoid collisions with other plugins, the package
|
||||
# name for this plugin must contain the full kit name.
|
||||
# The buildkit buildtar command will copy this file from your plugins
|
||||
# directory to the the kit build directory, renaming the file with the
|
||||
# correct kit name. All strings in this file of the form
|
||||
# <<<buildkit_WILL_INSERT_kitname_HERE>>>
|
||||
# will be replaced with the full kit name. In order for buildkit to
|
||||
# correctly edit this file, do not remove these strings.
|
||||
|
||||
|
||||
# Global Variables
|
||||
|
||||
# This is the full name of the kit which this plugin belongs
|
||||
# to. The kit name is used by some code in process_request()
|
||||
# to determine if the plugin should run. When you are testing
|
||||
# your plugin the kit name should be set to "TESTMODE" to
|
||||
# bypass the plugin check in process_request().
|
||||
|
||||
our ($PLUGIN_KITNAME);
|
||||
#$PLUGIN_KITNAME = "TESTMODE";
|
||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head1
|
||||
|
||||
Image Profile Kit Plugin
|
||||
This plugin contains commands to run custom actions
|
||||
during image profile operations.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
|
||||
Return list of kit plugin commands handled by this plugin
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
kitimagevalidatecomps => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
|
||||
kitimageimport => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 process_request
|
||||
|
||||
Process the kit plugin command.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
|
||||
# This kit plugin is passed the name of an image profile.
|
||||
# We need to determine which kits is used by this
|
||||
# image profile to decide if this plugin should run or not.
|
||||
|
||||
my $imgprofilename = $request->{arg}->[0];
|
||||
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata)) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_image_profiles([$imgprofilename]);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
||||
if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Name of command and node list
|
||||
my $command = $request->{command}->[0];
|
||||
my $args = $request->{arg};
|
||||
|
||||
if($command eq 'kitimagevalidatecomps') {
|
||||
kitimagevalidatecomps($callback, $args);
|
||||
}
|
||||
elsif ($command eq 'kitimageimport') {
|
||||
kitimageimport($callback, $args);
|
||||
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Command is not supported";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitimagevalidatecomps
|
||||
|
||||
This command is called to validate new changes to an
|
||||
image profile's kit component list before the changes
|
||||
are committed.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitimagevalidatecomps {
|
||||
my $callback = shift;
|
||||
my $args = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $imgprofilename = $args->[0];
|
||||
my $newcomplist = $args->[1];
|
||||
my @newcomplist = ();
|
||||
if (defined($newcomplist)) {
|
||||
@newcomplist = split(/,/, $newcomplist);
|
||||
}
|
||||
my $newosdistro = $args->[2];
|
||||
my $newosdistroupdate = $args->[3];
|
||||
|
||||
$rsp->{data}->[0] = "Running kitimagevalidatecomps";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitimageimport
|
||||
|
||||
This command is called after changes to an image profile
|
||||
have been committed.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitimageimport {
|
||||
my $callback = shift;
|
||||
my $args = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $imgprofilename = $args->[0];
|
||||
|
||||
$rsp->{data}->[0] = "Running kitimageimport";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
@ -1,251 +0,0 @@
|
||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
require xCAT::KitPluginUtils;
|
||||
|
||||
# buildkit Processing
|
||||
# In order to avoid collisions with other plugins, the package
|
||||
# name for this plugin must contain the full kit name.
|
||||
# The buildkit buildtar command will copy this file from your plugins
|
||||
# directory to the the kit build directory, renaming the file with the
|
||||
# correct kit name. All strings in this file of the form
|
||||
# <<<buildkit_WILL_INSERT_kitname_HERE>>>
|
||||
# will be replaced with the full kit name. In order for buildkit to
|
||||
# correctly edit this file, do not remove these strings.
|
||||
|
||||
# Global Variables
|
||||
|
||||
# This is the full name of the kit which this plugin belongs
|
||||
# to. The kit name is used by some code in process_request()
|
||||
# to determine if the plugin should run. When you are testing
|
||||
# your plugin the kit name should be set to "TESTMODE" to
|
||||
# bypass the plugin check in process_request().
|
||||
|
||||
our ($PLUGIN_KITNAME);
|
||||
#$PLUGIN_KITNAME = "TESTMODE";
|
||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head1
|
||||
|
||||
Node Management Kit Plugin
|
||||
This plugin contains commands to run custom actions
|
||||
during node management operations.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
|
||||
Return list of kit plugin commands handled by this plugin
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
kitnodeadd => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnoderemove => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnodeupdate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnoderefresh => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnodefinished => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 process_request
|
||||
|
||||
Process the kit plugin command.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
|
||||
# Name of command and node list
|
||||
my $command = $request->{command}->[0];
|
||||
my $nodes = $request->{node};
|
||||
|
||||
# This kit plugin is passed a list of node names.
|
||||
# We need to determine which kits are used by these
|
||||
# nodes to decide if this plugin should run or not.
|
||||
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata)) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_nodes($nodes);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
||||
if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Get the nodes using this plugin's kit
|
||||
$nodes = $kitdata->{$PLUGIN_KITNAME};
|
||||
|
||||
|
||||
if($command eq 'kitnodeadd') {
|
||||
kitnodeadd($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnoderemove') {
|
||||
kitnoderemove($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnodeupdate') {
|
||||
kitnodeupdate($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnoderefresh') {
|
||||
kitnoderefresh($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnodefinished') {
|
||||
kitnodefinished($callback);
|
||||
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Command is not supported";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodeadd
|
||||
|
||||
This command is called when one or more nodes are added
|
||||
to the cluster.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodeadd {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodeadd";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnoderemove
|
||||
|
||||
This command is called when one or more nodes are
|
||||
removed from the cluster.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnoderemove {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnoderemove";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodeupdate
|
||||
|
||||
This command is called when the configuration of one
|
||||
or more nodes are updated.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodeupdate {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodeupdate";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnoderefresh
|
||||
|
||||
This command is called when node-related configuration
|
||||
files are updated.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnoderefresh {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnoderefresh";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodefinished
|
||||
|
||||
This command is called at the end of a node management
|
||||
operation.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodefinished {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodefinished";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
@ -1,14 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlf/min_xlf_compute-14.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlf/min_xlf_compute-14.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlf/min_xlf_compute-14.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlf/min_xlf_compute-14.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,14 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlf/xlf_compute-14.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlf/xlf_compute-14.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlf/xlf_compute-14.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlf/xlf_compute-14.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,14 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlf/xlf_login-14.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlf/xlf_login-14.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlf/xlf_login-14.1.0.0-120323-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlf/xlf_login-14.1.0.0-120323-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,14 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlf/min_xlf_compute-14.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlf/min_xlf_compute-14.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlf/min_xlf_compute-14.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlf/min_xlf_compute-14.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,14 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlf/xlf_compute-14.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlf/xlf_compute-14.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlf/xlf_compute-14.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlf/xlf_compute-14.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,14 +0,0 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/xlf/xlf_login-14.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/xlf/xlf_login-14.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/xlf/xlf_login-14.1.0.0-120323-sles-11-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/xlf/xlf_login-14.1.0.0-120323-sles-11-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Sample script to accept licenses for the IBM xlf compilers
|
||||
# For Linux:
|
||||
# Assumes all compiler software has been installed
|
||||
|
||||
OS=`uname`
|
||||
if [ $OS != "AIX" ]; then
|
||||
cd $installroot/
|
||||
xlf_script=`find opt/ibmcmp/xlf -name new_install -print`
|
||||
|
||||
if [ -n $installroot ]; then
|
||||
# Being run from a stateful install postscript or stateless postbootscript.
|
||||
if [ -n "$xlf_script" ] ; then
|
||||
echo 1 | chroot $installroot /$xlf_script
|
||||
fi
|
||||
else
|
||||
# Being run from a stateful install postscript postbootscript.
|
||||
if [ -n "$xlf_script" ] ; then
|
||||
echo 1 | $xlf_script
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1,294 +0,0 @@
|
||||
# Kit Build File
|
||||
#
|
||||
# This file was initially auto-generated by the buildkit CLI command.
|
||||
# To create a new kit, the user should modify this file accordingly.
|
||||
# Refer to the buildkit manpage for further details.
|
||||
#
|
||||
|
||||
# kit: This section defines general info for the Kit.
|
||||
# There must be exactly one kit section in a kit build file.
|
||||
#
|
||||
# kit attributes:
|
||||
# basename (mandatory) Kit base name. e.g., kit-lsf
|
||||
# description (optional) Kit description.
|
||||
# version (mandatory) Kit version. e.g., 1.0
|
||||
# ostype (mandatory) Kit OS type. Must be Linux.
|
||||
# AIX is currently not supported.
|
||||
# isinternal (optional) PCM use only.
|
||||
# Indicate if Kit is for internal use.
|
||||
# Use 1 for yes, 0 for no. Default: 0
|
||||
# kitdeployparams (optional) Filename containing a list of kit deployment
|
||||
# parameters, relative to
|
||||
# <Kit Build Directory>/other_files
|
||||
kit:
|
||||
basename=essl
|
||||
description=essl for Linux
|
||||
version=5.1.1
|
||||
ostype=Linux
|
||||
kitlicense=IPLA
|
||||
kitdeployparams=essl.env
|
||||
|
||||
|
||||
# kitrepo: This section defines a Kit Package Repository.
|
||||
# There must be at least one kitrepo section in a kit build file.
|
||||
# If you want to support multiple OSes, you should create a separate
|
||||
# repo for each OS. Also, no two repos can be defined with the same
|
||||
# OS name, major/minor version and arch. For example, you cannot have
|
||||
# two repos for RHEL 6.2 ppc64 in the same kit.
|
||||
#
|
||||
# kitrepo attributes:
|
||||
# kitrepoid (mandatory) Kit package repository ID.
|
||||
# Must be unique within this file.
|
||||
# osbasename (mandatory) OS distro base name. e.g., rhels.
|
||||
# osmajorversion (mandatory) OS major version. e.g., 6
|
||||
# osminorversion (optional) OS minor version.
|
||||
# osarch (mandatory) OS architecture. e.g., ppc64
|
||||
# compat_osbasenames (optional) Comma-separated list of compatible
|
||||
# OS distro base names. e.g., centos
|
||||
|
||||
kitrepo:
|
||||
kitrepoid=rhels6_ppc64
|
||||
osbasename=rhels
|
||||
osmajorversion=6
|
||||
osarch=ppc64
|
||||
|
||||
kitrepo:
|
||||
kitrepoid=sles11_ppc64
|
||||
osbasename=sles
|
||||
osmajorversion=11
|
||||
osarch=ppc64
|
||||
|
||||
|
||||
# kitcomponent: This section defines one Kit Component.
|
||||
# There can be zero or more kitcomponent sections.
|
||||
# If you want to build a component which supports multiple OSes,
|
||||
# you should create one kitcomponent section for each OS.
|
||||
# Also, no two components in a kit can be defined with the same
|
||||
# base name.
|
||||
# You can define multiple kit components with the same base name
|
||||
# only if each kit component using this base name meets these
|
||||
# requirements:
|
||||
# - Each kit component must be defined with the same version
|
||||
# and release number
|
||||
# - Each kit component must be defined with a unique kitrepoid
|
||||
|
||||
#
|
||||
# kitcomponent attributes:
|
||||
# basename (mandatory) Kit component base name
|
||||
# description (optional) Kit component description
|
||||
# version (mandatory) Kit component version
|
||||
# release (mandatory) Kit component release
|
||||
# serverroles (mandatory) Comma-separated list of servers that this
|
||||
# component can install on. Valid values:
|
||||
# mgtnode,servicenode,compute,loginnode,storagenode
|
||||
# kitrepoid (mandatory) The ID of the kit package repository this
|
||||
# component belongs to
|
||||
# kitcompdeps (optional) Comma-separated list of kit component
|
||||
# dependencies. These kit components can be included in
|
||||
# this kit or in other kits.
|
||||
# ospkgdeps (optional) Comma-separated list of OS package dependencies
|
||||
# These packages must be shipped with the OS distro.
|
||||
# kitpkgdeps (optional) Comma-separated list of kit package names that
|
||||
# will be listed as "REQUIRES" when building this kit
|
||||
# component. Each package must be defined in a separate
|
||||
# kitpackage section. Each package must be in the same
|
||||
# kitrepo as this kit component.
|
||||
# non_native_pkgs (optional) TBD -- NOT SUPPORTED YET!
|
||||
# Comma-separated list of non-native package
|
||||
# paths that will be included as files in this kit
|
||||
# component. All filenames are relative to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# Kit component deployment scripts must be specified
|
||||
# to manage these files.
|
||||
# driverpacks (optional) Comma-separated list of driver package filenames
|
||||
# Each driverpack must be defined in a separate kitpackage
|
||||
# section.
|
||||
# exlist (optional) Exclude list file for stateless image, relative
|
||||
# to <Kit Build Directory>/other_files
|
||||
# Kit component deployment scripts (optional) Each attribute specifies
|
||||
# script path relative to <Kit Build Directory>/scripts
|
||||
# Script attributes:
|
||||
# preinstall, postinstall, preuninstall, postuninstall,
|
||||
# preupgrade, postupgrade, postbootscripts
|
||||
kitcomponent:
|
||||
basename=essl_compute
|
||||
description=essl for compute nodes
|
||||
version=5.1.1
|
||||
release=0
|
||||
serverroles=compute
|
||||
kitrepoid=rhels6_ppc64
|
||||
ospkgdeps=bc
|
||||
kitpkgdeps=essl.3232.rte >= 5.1.1,essl.3264.rte >= 5.1.1,essl.6464.rte >= 5.1.1,essl.bg.rte >= 5.1.1,essl.common >= 5.1.1,essl.license >= 5.1.1,essl.man >= 5.1.1,essl.msg >= 5.1.1,essl.rte >= 5.1.1,essl.rte.common >= 5.1.1
|
||||
exlist=essl.exlist
|
||||
|
||||
kitcomponent:
|
||||
basename=essl_loginnode
|
||||
description=essl for login nodes
|
||||
version=5.1.1
|
||||
release=0
|
||||
serverroles=loginnode
|
||||
kitrepoid=rhels6_ppc64
|
||||
ospkgdeps=bc
|
||||
kitpkgdeps=essl.3232.rte >= 5.1.1,essl.3264.rte >= 5.1.1,essl.6464.rte >= 5.1.1,essl.bg.rte >= 5.1.1,essl.common >= 5.1.1,essl.license >= 5.1.1,essl.man >= 5.1.1,essl.msg >= 5.1.1,essl.rte >= 5.1.1,essl.rte.common >= 5.1.1
|
||||
exlist=essl.exlist
|
||||
|
||||
kitcomponent:
|
||||
basename=min_essl_compute
|
||||
description=Minimal essl packages for compute nodes
|
||||
version=5.1.1
|
||||
release=0
|
||||
serverroles=compute
|
||||
kitrepoid=rhels6_ppc64
|
||||
ospkgdeps=bc
|
||||
kitpkgdeps=essl.3232.rte >= 5.1.1,essl.3264.rte >= 5.1.1,essl.6464.rte >= 5.1.1,essl.bg.rte >= 5.1.1,essl.common >= 5.1.1,essl.license >= 5.1.1,essl.rte >= 5.1.1,essl.rte.common >= 5.1.1
|
||||
exlist=essl.exlist
|
||||
|
||||
kitcomponent:
|
||||
basename=essl_compute
|
||||
description=essl for compute nodes
|
||||
version=5.1.1
|
||||
release=0
|
||||
serverroles=compute
|
||||
kitrepoid=sles11_ppc64
|
||||
ospkgdeps=bc
|
||||
kitpkgdeps=essl.3232.rte >= 5.1.1,essl.3264.rte >= 5.1.1,essl.6464.rte >= 5.1.1,essl.bg.rte >= 5.1.1,essl.common >= 5.1.1,essl.license >= 5.1.1,essl.man >= 5.1.1,essl.msg >= 5.1.1,essl.rte >= 5.1.1,essl.rte.common >= 5.1.1
|
||||
exlist=essl.exlist
|
||||
|
||||
kitcomponent:
|
||||
basename=essl_loginnode
|
||||
description=essl for compute nodes
|
||||
version=5.1.1
|
||||
release=0
|
||||
serverroles=loginnode
|
||||
kitrepoid=sles11_ppc64
|
||||
ospkgdeps=bc
|
||||
kitpkgdeps=essl.3232.rte >= 5.1.1,essl.3264.rte >= 5.1.1,essl.6464.rte >= 5.1.1,essl.bg.rte >= 5.1.1,essl.common >= 5.1.1,essl.license >= 5.1.1,essl.man >= 5.1.1,essl.msg >= 5.1.1,essl.rte >= 5.1.1,essl.rte.common >= 5.1.1
|
||||
exlist=essl.exlist
|
||||
|
||||
kitcomponent:
|
||||
basename=min_essl_compute
|
||||
description=Minimal essl packages for compute nodes
|
||||
version=5.1.1
|
||||
release=0
|
||||
serverroles=compute
|
||||
kitrepoid=sles11_ppc64
|
||||
ospkgdeps=bc
|
||||
kitpkgdeps=essl.3232.rte >= 5.1.1,essl.3264.rte >= 5.1.1,essl.6464.rte >= 5.1.1,essl.bg.rte >= 5.1.1,essl.common >= 5.1.1,essl.license >= 5.1.1,essl.rte >= 5.1.1,essl.rte.common >= 5.1.1
|
||||
exlist=essl.exlist
|
||||
|
||||
|
||||
# kitpackage: This section defines one Kit Package, and how to build it.
|
||||
# There can be zero or more kitpackage sections.
|
||||
# All filenames should be relative paths to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# If you want to build a package which can run on multiple OSes,
|
||||
# you have two options:
|
||||
# 1. Build a separate package for each OS you want to support.
|
||||
# For this option, you need to define one kitpackage section
|
||||
# per supported OS.
|
||||
# 2. Build one package that can run on multiple OSes.
|
||||
# If you are building an RPM package, you are responsible for
|
||||
# creating an RPM spec file that can run on multiple OSes.
|
||||
# For this option, you need to define one kitpackage section
|
||||
# which contains multiple kitrepoid lines.
|
||||
#
|
||||
# kitpackage attributes:
|
||||
# filename (mandatory) Package filename
|
||||
# kitrepoid (mandatory) The repo(s) this package belongs to.
|
||||
# If multiple repos are defined, the package will be built for
|
||||
# the first repo only. For the other repos, a symlink is created
|
||||
# to the package built for the first repo.
|
||||
# Package build methods (optional)
|
||||
# Define how to build the packages.
|
||||
# If you don't specify a build method, the default behavior is
|
||||
# to assume the package is pre-built under
|
||||
# <Kit Build Directory>/source_packages
|
||||
# All files in this section are relative to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# There are four methods to build packages.
|
||||
# 1. Use pre-built RPM package
|
||||
# isexternalpkg: 'no'|'0', 'yes'|'1' (default: 'no')
|
||||
# Indicates whether the RPM package will be added to the
|
||||
# the kit tar file now as part of the kit build process,
|
||||
# or whether the customer will need to separately
|
||||
# obtain the RPM pacakage and add it to the kit tar file
|
||||
# using 'buildkit addpkgs'
|
||||
# rpm_prebuiltdir: If isexternalpkg=no, path to directory
|
||||
# containing pre-built RPM package
|
||||
# 2. Build RPM from spec + src dir
|
||||
# rpm_spec: Path to spec file.
|
||||
# rpm_srcdir: Path to source directory.
|
||||
# 3. Build RPM from spec + src tarball
|
||||
# rpm_spec: Path to spec file.
|
||||
# rpm_srctarball: Path to source tarball.
|
||||
# 4. Build RPM from source RPM
|
||||
# rpm_srpm: Path to source RPM package.
|
||||
kitpackage:
|
||||
filename=essl.3232.rte-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
kitpackage:
|
||||
filename=essl.3264.rte-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
kitpackage:
|
||||
filename=essl.6464.rte-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
kitpackage:
|
||||
filename=essl.bg.rte-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
kitpackage:
|
||||
filename=essl.common-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
kitpackage:
|
||||
filename=essl.license-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
kitpackage:
|
||||
filename=essl.man-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
kitpackage:
|
||||
filename=essl.msg-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
kitpackage:
|
||||
filename=essl.rte-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
||||
|
||||
kitpackage:
|
||||
filename=essl.rte.common-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=
|
@ -1 +0,0 @@
|
||||
#ENV:IBM_ESSL_LICENSE_ACCEPT=yes#
|
@ -1,6 +0,0 @@
|
||||
./opt/ibmmath/essl/*/FFTW3/include*
|
||||
./opt/ibmmath/essl/*/include*
|
||||
./opt/ibmmath/essl/*/lap/license/*.txt
|
||||
./opt/ibmmath/essl/*/lap/LI_*
|
||||
./opt/ibmmath/essl/*/lap/LA_*
|
||||
|
@ -1,175 +0,0 @@
|
||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
require xCAT::KitPluginUtils;
|
||||
|
||||
|
||||
# buildkit Processing
|
||||
# In order to avoid collisions with other plugins, the package
|
||||
# name for this plugin must contain the full kit name.
|
||||
# The buildkit buildtar command will copy this file from your plugins
|
||||
# directory to the the kit build directory, renaming the file with the
|
||||
# correct kit name. All strings in this file of the form
|
||||
# <<<buildkit_WILL_INSERT_kitname_HERE>>>
|
||||
# will be replaced with the full kit name. In order for buildkit to
|
||||
# correctly edit this file, do not remove these strings.
|
||||
|
||||
|
||||
# Global Variables
|
||||
|
||||
# This is the full name of the kit which this plugin belongs
|
||||
# to. The kit name is used by some code in process_request()
|
||||
# to determine if the plugin should run. When you are testing
|
||||
# your plugin the kit name should be set to "TESTMODE" to
|
||||
# bypass the plugin check in process_request().
|
||||
|
||||
our ($PLUGIN_KITNAME);
|
||||
#$PLUGIN_KITNAME = "TESTMODE";
|
||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head1
|
||||
|
||||
Image Profile Kit Plugin
|
||||
This plugin contains commands to run custom actions
|
||||
during image profile operations.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
|
||||
Return list of kit plugin commands handled by this plugin
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
kitimagevalidatecomps => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
|
||||
kitimageimport => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 process_request
|
||||
|
||||
Process the kit plugin command.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
|
||||
# This kit plugin is passed the name of an image profile.
|
||||
# We need to determine which kits is used by this
|
||||
# image profile to decide if this plugin should run or not.
|
||||
|
||||
my $imgprofilename = $request->{arg}->[0];
|
||||
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata)) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_image_profiles([$imgprofilename]);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
||||
if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Name of command and node list
|
||||
my $command = $request->{command}->[0];
|
||||
my $args = $request->{arg};
|
||||
|
||||
if($command eq 'kitimagevalidatecomps') {
|
||||
kitimagevalidatecomps($callback, $args);
|
||||
}
|
||||
elsif ($command eq 'kitimageimport') {
|
||||
kitimageimport($callback, $args);
|
||||
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Command is not supported";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitimagevalidatecomps
|
||||
|
||||
This command is called to validate new changes to an
|
||||
image profile's kit component list before the changes
|
||||
are committed.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitimagevalidatecomps {
|
||||
my $callback = shift;
|
||||
my $args = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $imgprofilename = $args->[0];
|
||||
my $newcomplist = $args->[1];
|
||||
my @newcomplist = ();
|
||||
if (defined($newcomplist)) {
|
||||
@newcomplist = split(/,/, $newcomplist);
|
||||
}
|
||||
my $newosdistro = $args->[2];
|
||||
my $newosdistroupdate = $args->[3];
|
||||
|
||||
$rsp->{data}->[0] = "Running kitimagevalidatecomps";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitimageimport
|
||||
|
||||
This command is called after changes to an image profile
|
||||
have been committed.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitimageimport {
|
||||
my $callback = shift;
|
||||
my $args = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $imgprofilename = $args->[0];
|
||||
|
||||
$rsp->{data}->[0] = "Running kitimageimport";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
@ -1,251 +0,0 @@
|
||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
require xCAT::KitPluginUtils;
|
||||
|
||||
# buildkit Processing
|
||||
# In order to avoid collisions with other plugins, the package
|
||||
# name for this plugin must contain the full kit name.
|
||||
# The buildkit buildtar command will copy this file from your plugins
|
||||
# directory to the the kit build directory, renaming the file with the
|
||||
# correct kit name. All strings in this file of the form
|
||||
# <<<buildkit_WILL_INSERT_kitname_HERE>>>
|
||||
# will be replaced with the full kit name. In order for buildkit to
|
||||
# correctly edit this file, do not remove these strings.
|
||||
|
||||
# Global Variables
|
||||
|
||||
# This is the full name of the kit which this plugin belongs
|
||||
# to. The kit name is used by some code in process_request()
|
||||
# to determine if the plugin should run. When you are testing
|
||||
# your plugin the kit name should be set to "TESTMODE" to
|
||||
# bypass the plugin check in process_request().
|
||||
|
||||
our ($PLUGIN_KITNAME);
|
||||
#$PLUGIN_KITNAME = "TESTMODE";
|
||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head1
|
||||
|
||||
Node Management Kit Plugin
|
||||
This plugin contains commands to run custom actions
|
||||
during node management operations.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
|
||||
Return list of kit plugin commands handled by this plugin
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
kitnodeadd => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnoderemove => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnodeupdate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnoderefresh => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnodefinished => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 process_request
|
||||
|
||||
Process the kit plugin command.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
|
||||
# Name of command and node list
|
||||
my $command = $request->{command}->[0];
|
||||
my $nodes = $request->{node};
|
||||
|
||||
# This kit plugin is passed a list of node names.
|
||||
# We need to determine which kits are used by these
|
||||
# nodes to decide if this plugin should run or not.
|
||||
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata)) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_nodes($nodes);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
||||
if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Get the nodes using this plugin's kit
|
||||
$nodes = $kitdata->{$PLUGIN_KITNAME};
|
||||
|
||||
|
||||
if($command eq 'kitnodeadd') {
|
||||
kitnodeadd($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnoderemove') {
|
||||
kitnoderemove($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnodeupdate') {
|
||||
kitnodeupdate($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnoderefresh') {
|
||||
kitnoderefresh($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnodefinished') {
|
||||
kitnodefinished($callback);
|
||||
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Command is not supported";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodeadd
|
||||
|
||||
This command is called when one or more nodes are added
|
||||
to the cluster.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodeadd {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodeadd";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnoderemove
|
||||
|
||||
This command is called when one or more nodes are
|
||||
removed from the cluster.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnoderemove {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnoderemove";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodeupdate
|
||||
|
||||
This command is called when the configuration of one
|
||||
or more nodes are updated.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodeupdate {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodeupdate";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnoderefresh
|
||||
|
||||
This command is called when node-related configuration
|
||||
files are updated.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnoderefresh {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnoderefresh";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodefinished
|
||||
|
||||
This command is called at the end of a node management
|
||||
operation.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodefinished {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodefinished";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
@ -1,294 +0,0 @@
|
||||
# Kit Build File
|
||||
#
|
||||
# This file was initially auto-generated by the buildkit CLI command.
|
||||
# To create a new kit, the user should modify this file accordingly.
|
||||
# Refer to the buildkit manpage for further details.
|
||||
#
|
||||
|
||||
# kit: This section defines general info for the Kit.
|
||||
# There must be exactly one kit section in a kit build file.
|
||||
#
|
||||
# kit attributes:
|
||||
# basename (mandatory) Kit base name. e.g., kit-lsf
|
||||
# description (optional) Kit description.
|
||||
# version (mandatory) Kit version. e.g., 1.0
|
||||
# ostype (mandatory) Kit OS type. Must be Linux.
|
||||
# AIX is currently not supported.
|
||||
# isinternal (optional) PCM use only.
|
||||
# Indicate if Kit is for internal use.
|
||||
# Use 1 for yes, 0 for no. Default: 0
|
||||
# kitdeployparams (optional) Filename containing a list of kit deployment
|
||||
# parameters, relative to
|
||||
# <Kit Build Directory>/other_files
|
||||
kit:
|
||||
basename=essl
|
||||
description=essl for Linux
|
||||
version=5.1.1
|
||||
ostype=Linux
|
||||
kitlicense=IPLA
|
||||
kitdeployparams=essl.env
|
||||
|
||||
|
||||
# kitrepo: This section defines a Kit Package Repository.
|
||||
# There must be at least one kitrepo section in a kit build file.
|
||||
# If you want to support multiple OSes, you should create a separate
|
||||
# repo for each OS. Also, no two repos can be defined with the same
|
||||
# OS name, major/minor version and arch. For example, you cannot have
|
||||
# two repos for RHEL 6.2 ppc64 in the same kit.
|
||||
#
|
||||
# kitrepo attributes:
|
||||
# kitrepoid (mandatory) Kit package repository ID.
|
||||
# Must be unique within this file.
|
||||
# osbasename (mandatory) OS distro base name. e.g., rhels.
|
||||
# osmajorversion (mandatory) OS major version. e.g., 6
|
||||
# osminorversion (optional) OS minor version.
|
||||
# osarch (mandatory) OS architecture. e.g., ppc64
|
||||
# compat_osbasenames (optional) Comma-separated list of compatible
|
||||
# OS distro base names. e.g., centos
|
||||
|
||||
kitrepo:
|
||||
kitrepoid=rhels6_ppc64
|
||||
osbasename=rhels
|
||||
osmajorversion=6
|
||||
osarch=ppc64
|
||||
|
||||
kitrepo:
|
||||
kitrepoid=sles11_ppc64
|
||||
osbasename=sles
|
||||
osmajorversion=11
|
||||
osarch=ppc64
|
||||
|
||||
|
||||
# kitcomponent: This section defines one Kit Component.
|
||||
# There can be zero or more kitcomponent sections.
|
||||
# If you want to build a component which supports multiple OSes,
|
||||
# you should create one kitcomponent section for each OS.
|
||||
# Also, no two components in a kit can be defined with the same
|
||||
# base name.
|
||||
# You can define multiple kit components with the same base name
|
||||
# only if each kit component using this base name meets these
|
||||
# requirements:
|
||||
# - Each kit component must be defined with the same version
|
||||
# and release number
|
||||
# - Each kit component must be defined with a unique kitrepoid
|
||||
|
||||
#
|
||||
# kitcomponent attributes:
|
||||
# basename (mandatory) Kit component base name
|
||||
# description (optional) Kit component description
|
||||
# version (mandatory) Kit component version
|
||||
# release (mandatory) Kit component release
|
||||
# serverroles (mandatory) Comma-separated list of servers that this
|
||||
# component can install on. Valid values:
|
||||
# mgtnode,servicenode,compute,loginnode,storagenode
|
||||
# kitrepoid (mandatory) The ID of the kit package repository this
|
||||
# component belongs to
|
||||
# kitcompdeps (optional) Comma-separated list of kit component
|
||||
# dependencies. These kit components can be included in
|
||||
# this kit or in other kits.
|
||||
# ospkgdeps (optional) Comma-separated list of OS package dependencies
|
||||
# These packages must be shipped with the OS distro.
|
||||
# kitpkgdeps (optional) Comma-separated list of kit package names that
|
||||
# will be listed as "REQUIRES" when building this kit
|
||||
# component. Each package must be defined in a separate
|
||||
# kitpackage section. Each package must be in the same
|
||||
# kitrepo as this kit component.
|
||||
# non_native_pkgs (optional) TBD -- NOT SUPPORTED YET!
|
||||
# Comma-separated list of non-native package
|
||||
# paths that will be included as files in this kit
|
||||
# component. All filenames are relative to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# Kit component deployment scripts must be specified
|
||||
# to manage these files.
|
||||
# driverpacks (optional) Comma-separated list of driver package filenames
|
||||
# Each driverpack must be defined in a separate kitpackage
|
||||
# section.
|
||||
# exlist (optional) Exclude list file for stateless image, relative
|
||||
# to <Kit Build Directory>/other_files
|
||||
# Kit component deployment scripts (optional) Each attribute specifies
|
||||
# script path relative to <Kit Build Directory>/scripts
|
||||
# Script attributes:
|
||||
# preinstall, postinstall, preuninstall, postuninstall,
|
||||
# preupgrade, postupgrade, postbootscripts
|
||||
kitcomponent:
|
||||
basename=essl_compute
|
||||
description=essl for compute nodes
|
||||
version=5.1.1
|
||||
release=0
|
||||
serverroles=compute
|
||||
kitrepoid=rhels6_ppc64
|
||||
ospkgdeps=bc
|
||||
kitpkgdeps=essl.3232.rte >= 5.1.1,essl.3264.rte >= 5.1.1,essl.6464.rte >= 5.1.1,essl.bg.rte >= 5.1.1,essl.common >= 5.1.1,essl.license >= 5.1.1,essl.man >= 5.1.1,essl.msg >= 5.1.1,essl.rte >= 5.1.1,essl.rte.common >= 5.1.1
|
||||
exlist=essl.exlist
|
||||
|
||||
kitcomponent:
|
||||
basename=essl_loginnode
|
||||
description=essl for login nodes
|
||||
version=5.1.1
|
||||
release=0
|
||||
serverroles=loginnode
|
||||
kitrepoid=rhels6_ppc64
|
||||
ospkgdeps=bc
|
||||
kitpkgdeps=essl.3232.rte >= 5.1.1,essl.3264.rte >= 5.1.1,essl.6464.rte >= 5.1.1,essl.bg.rte >= 5.1.1,essl.common >= 5.1.1,essl.license >= 5.1.1,essl.man >= 5.1.1,essl.msg >= 5.1.1,essl.rte >= 5.1.1,essl.rte.common >= 5.1.1
|
||||
exlist=essl.exlist
|
||||
|
||||
kitcomponent:
|
||||
basename=min_essl_compute
|
||||
description=Minimal essl packages for compute nodes
|
||||
version=5.1.1
|
||||
release=0
|
||||
serverroles=compute
|
||||
kitrepoid=rhels6_ppc64
|
||||
ospkgdeps=bc
|
||||
kitpkgdeps=essl.3232.rte >= 5.1.1,essl.3264.rte >= 5.1.1,essl.6464.rte >= 5.1.1,essl.bg.rte >= 5.1.1,essl.common >= 5.1.1,essl.license >= 5.1.1,essl.rte >= 5.1.1,essl.rte.common >= 5.1.1
|
||||
exlist=essl.exlist
|
||||
|
||||
kitcomponent:
|
||||
basename=essl_compute
|
||||
description=essl for compute nodes
|
||||
version=5.1.1
|
||||
release=0
|
||||
serverroles=compute
|
||||
kitrepoid=sles11_ppc64
|
||||
ospkgdeps=bc
|
||||
kitpkgdeps=essl.3232.rte >= 5.1.1,essl.3264.rte >= 5.1.1,essl.6464.rte >= 5.1.1,essl.bg.rte >= 5.1.1,essl.common >= 5.1.1,essl.license >= 5.1.1,essl.man >= 5.1.1,essl.msg >= 5.1.1,essl.rte >= 5.1.1,essl.rte.common >= 5.1.1
|
||||
exlist=essl.exlist
|
||||
|
||||
kitcomponent:
|
||||
basename=essl_loginnode
|
||||
description=essl for login nodes
|
||||
version=5.1.1
|
||||
release=0
|
||||
serverroles=loginnode
|
||||
kitrepoid=sles11_ppc64
|
||||
ospkgdeps=bc
|
||||
kitpkgdeps=essl.3232.rte >= 5.1.1,essl.3264.rte >= 5.1.1,essl.6464.rte >= 5.1.1,essl.bg.rte >= 5.1.1,essl.common >= 5.1.1,essl.license >= 5.1.1,essl.man >= 5.1.1,essl.msg >= 5.1.1,essl.rte >= 5.1.1,essl.rte.common >= 5.1.1
|
||||
exlist=essl.exlist
|
||||
|
||||
kitcomponent:
|
||||
basename=min_essl_compute
|
||||
description=Minimal essl packages for compute nodes
|
||||
version=5.1.1
|
||||
release=0
|
||||
serverroles=compute
|
||||
kitrepoid=sles11_ppc64
|
||||
ospkgdeps=bc
|
||||
kitpkgdeps=essl.3232.rte >= 5.1.1,essl.3264.rte >= 5.1.1,essl.6464.rte >= 5.1.1,essl.bg.rte >= 5.1.1,essl.common >= 5.1.1,essl.license >= 5.1.1,essl.rte >= 5.1.1,essl.rte.common >= 5.1.1
|
||||
exlist=essl.exlist
|
||||
|
||||
|
||||
# kitpackage: This section defines one Kit Package, and how to build it.
|
||||
# There can be zero or more kitpackage sections.
|
||||
# All filenames should be relative paths to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# If you want to build a package which can run on multiple OSes,
|
||||
# you have two options:
|
||||
# 1. Build a separate package for each OS you want to support.
|
||||
# For this option, you need to define one kitpackage section
|
||||
# per supported OS.
|
||||
# 2. Build one package that can run on multiple OSes.
|
||||
# If you are building an RPM package, you are responsible for
|
||||
# creating an RPM spec file that can run on multiple OSes.
|
||||
# For this option, you need to define one kitpackage section
|
||||
# which contains multiple kitrepoid lines.
|
||||
#
|
||||
# kitpackage attributes:
|
||||
# filename (mandatory) Package filename
|
||||
# kitrepoid (mandatory) The repo(s) this package belongs to.
|
||||
# If multiple repos are defined, the package will be built for
|
||||
# the first repo only. For the other repos, a symlink is created
|
||||
# to the package built for the first repo.
|
||||
# Package build methods (optional)
|
||||
# Define how to build the packages.
|
||||
# If you don't specify a build method, the default behavior is
|
||||
# to assume the package is pre-built under
|
||||
# <Kit Build Directory>/source_packages
|
||||
# All files in this section are relative to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# There are four methods to build packages.
|
||||
# 1. Use pre-built RPM package
|
||||
# isexternalpkg: 'no'|'0', 'yes'|'1' (default: 'no')
|
||||
# Indicates whether the RPM package will be added to the
|
||||
# the kit tar file now as part of the kit build process,
|
||||
# or whether the customer will need to separately
|
||||
# obtain the RPM pacakage and add it to the kit tar file
|
||||
# using 'buildkit addpkgs'
|
||||
# rpm_prebuiltdir: If isexternalpkg=yes, path to directory
|
||||
# containing pre-built RPM package
|
||||
# 2. Build RPM from spec + src dir
|
||||
# rpm_spec: Path to spec file.
|
||||
# rpm_srcdir: Path to source directory.
|
||||
# 3. Build RPM from spec + src tarball
|
||||
# rpm_spec: Path to spec file.
|
||||
# rpm_srctarball: Path to source tarball.
|
||||
# 4. Build RPM from source RPM
|
||||
# rpm_srpm: Path to source RPM package.
|
||||
kitpackage:
|
||||
filename=essl.3232.rte-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=essl.3264.rte-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=essl.6464.rte-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=essl.bg.rte-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=essl.common-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=essl.license-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=essl.man-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=essl.msg-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=essl.rte-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
||||
|
||||
kitpackage:
|
||||
filename=essl.rte.common-5.1.1-0.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=yes
|
||||
|
@ -1 +0,0 @@
|
||||
#ENV:IBM_ESSL_LICENSE_ACCEPT=yes#
|
@ -1,11 +0,0 @@
|
||||
./opt/ibmmath/essl/*/FFTW3/include*
|
||||
./opt/ibmmath/essl/*/include*
|
||||
./opt/ibmmath/essl/*/lap/license/*.txt
|
||||
./opt/ibmmath/essl/*/lap/LI_*
|
||||
./opt/ibmmath/essl/*/lap/LA_*
|
||||
|
||||
./opt/ibmmath/pessl/*/lap/LA_*
|
||||
./opt/ibmmath/pessl/*/lap/LI_*
|
||||
./opt/ibmmath/pessl/*/lap/*.jar
|
||||
|
||||
|
@ -1,175 +0,0 @@
|
||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
require xCAT::KitPluginUtils;
|
||||
|
||||
|
||||
# buildkit Processing
|
||||
# In order to avoid collisions with other plugins, the package
|
||||
# name for this plugin must contain the full kit name.
|
||||
# The buildkit buildtar command will copy this file from your plugins
|
||||
# directory to the the kit build directory, renaming the file with the
|
||||
# correct kit name. All strings in this file of the form
|
||||
# <<<buildkit_WILL_INSERT_kitname_HERE>>>
|
||||
# will be replaced with the full kit name. In order for buildkit to
|
||||
# correctly edit this file, do not remove these strings.
|
||||
|
||||
|
||||
# Global Variables
|
||||
|
||||
# This is the full name of the kit which this plugin belongs
|
||||
# to. The kit name is used by some code in process_request()
|
||||
# to determine if the plugin should run. When you are testing
|
||||
# your plugin the kit name should be set to "TESTMODE" to
|
||||
# bypass the plugin check in process_request().
|
||||
|
||||
our ($PLUGIN_KITNAME);
|
||||
#$PLUGIN_KITNAME = "TESTMODE";
|
||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head1
|
||||
|
||||
Image Profile Kit Plugin
|
||||
This plugin contains commands to run custom actions
|
||||
during image profile operations.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
|
||||
Return list of kit plugin commands handled by this plugin
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
kitimagevalidatecomps => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
|
||||
kitimageimport => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 process_request
|
||||
|
||||
Process the kit plugin command.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
|
||||
# This kit plugin is passed the name of an image profile.
|
||||
# We need to determine which kits is used by this
|
||||
# image profile to decide if this plugin should run or not.
|
||||
|
||||
my $imgprofilename = $request->{arg}->[0];
|
||||
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata)) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_image_profiles([$imgprofilename]);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
||||
if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Name of command and node list
|
||||
my $command = $request->{command}->[0];
|
||||
my $args = $request->{arg};
|
||||
|
||||
if($command eq 'kitimagevalidatecomps') {
|
||||
kitimagevalidatecomps($callback, $args);
|
||||
}
|
||||
elsif ($command eq 'kitimageimport') {
|
||||
kitimageimport($callback, $args);
|
||||
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Command is not supported";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitimagevalidatecomps
|
||||
|
||||
This command is called to validate new changes to an
|
||||
image profile's kit component list before the changes
|
||||
are committed.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitimagevalidatecomps {
|
||||
my $callback = shift;
|
||||
my $args = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $imgprofilename = $args->[0];
|
||||
my $newcomplist = $args->[1];
|
||||
my @newcomplist = ();
|
||||
if (defined($newcomplist)) {
|
||||
@newcomplist = split(/,/, $newcomplist);
|
||||
}
|
||||
my $newosdistro = $args->[2];
|
||||
my $newosdistroupdate = $args->[3];
|
||||
|
||||
$rsp->{data}->[0] = "Running kitimagevalidatecomps";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitimageimport
|
||||
|
||||
This command is called after changes to an image profile
|
||||
have been committed.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitimageimport {
|
||||
my $callback = shift;
|
||||
my $args = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $imgprofilename = $args->[0];
|
||||
|
||||
$rsp->{data}->[0] = "Running kitimageimport";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
@ -1,251 +0,0 @@
|
||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
require xCAT::KitPluginUtils;
|
||||
|
||||
# buildkit Processing
|
||||
# In order to avoid collisions with other plugins, the package
|
||||
# name for this plugin must contain the full kit name.
|
||||
# The buildkit buildtar command will copy this file from your plugins
|
||||
# directory to the the kit build directory, renaming the file with the
|
||||
# correct kit name. All strings in this file of the form
|
||||
# <<<buildkit_WILL_INSERT_kitname_HERE>>>
|
||||
# will be replaced with the full kit name. In order for buildkit to
|
||||
# correctly edit this file, do not remove these strings.
|
||||
|
||||
# Global Variables
|
||||
|
||||
# This is the full name of the kit which this plugin belongs
|
||||
# to. The kit name is used by some code in process_request()
|
||||
# to determine if the plugin should run. When you are testing
|
||||
# your plugin the kit name should be set to "TESTMODE" to
|
||||
# bypass the plugin check in process_request().
|
||||
|
||||
our ($PLUGIN_KITNAME);
|
||||
#$PLUGIN_KITNAME = "TESTMODE";
|
||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head1
|
||||
|
||||
Node Management Kit Plugin
|
||||
This plugin contains commands to run custom actions
|
||||
during node management operations.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
|
||||
Return list of kit plugin commands handled by this plugin
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
kitnodeadd => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnoderemove => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnodeupdate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnoderefresh => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnodefinished => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 process_request
|
||||
|
||||
Process the kit plugin command.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
|
||||
# Name of command and node list
|
||||
my $command = $request->{command}->[0];
|
||||
my $nodes = $request->{node};
|
||||
|
||||
# This kit plugin is passed a list of node names.
|
||||
# We need to determine which kits are used by these
|
||||
# nodes to decide if this plugin should run or not.
|
||||
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata)) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_nodes($nodes);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
||||
if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Get the nodes using this plugin's kit
|
||||
$nodes = $kitdata->{$PLUGIN_KITNAME};
|
||||
|
||||
|
||||
if($command eq 'kitnodeadd') {
|
||||
kitnodeadd($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnoderemove') {
|
||||
kitnoderemove($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnodeupdate') {
|
||||
kitnodeupdate($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnoderefresh') {
|
||||
kitnoderefresh($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnodefinished') {
|
||||
kitnodefinished($callback);
|
||||
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Command is not supported";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodeadd
|
||||
|
||||
This command is called when one or more nodes are added
|
||||
to the cluster.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodeadd {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodeadd";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnoderemove
|
||||
|
||||
This command is called when one or more nodes are
|
||||
removed from the cluster.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnoderemove {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnoderemove";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodeupdate
|
||||
|
||||
This command is called when the configuration of one
|
||||
or more nodes are updated.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodeupdate {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodeupdate";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnoderefresh
|
||||
|
||||
This command is called when node-related configuration
|
||||
files are updated.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnoderefresh {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnoderefresh";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodefinished
|
||||
|
||||
This command is called at the end of a node management
|
||||
operation.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodefinished {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodefinished";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
@ -1,330 +0,0 @@
|
||||
# Kit Build File
|
||||
#
|
||||
# This file was initially auto-generated by the buildkit CLI command.
|
||||
# To create a new kit, the user should modify this file accordingly.
|
||||
# Refer to the buildkit manpage for further details.
|
||||
#
|
||||
|
||||
# kit: This section defines general info for the Kit.
|
||||
# There must be exactly one kit section in a kit build file.
|
||||
#
|
||||
# kit attributes:
|
||||
# basename (mandatory) Kit base name. e.g., kit-lsf
|
||||
# description (optional) Kit description.
|
||||
# version (mandatory) Kit version. e.g., 1.0
|
||||
# ostype (mandatory) Kit OS type. Must be Linux.
|
||||
# AIX is currently not supported.
|
||||
# isinternal (optional) PCM use only.
|
||||
# Indicate if Kit is for internal use.
|
||||
# Use 1 for yes, 0 for no. Default: 0
|
||||
# kitdeployparams (optional) Filename containing a list of kit deployment
|
||||
# parameters, relative to
|
||||
# <Kit Build Directory>/other_files
|
||||
kit:
|
||||
basename=gpfs
|
||||
description=General Parallel File System
|
||||
version=3.5.0
|
||||
ostype=Linux
|
||||
#kitdeployparams=
|
||||
|
||||
|
||||
# kitrepo: This section defines a Kit Package Repository.
|
||||
# There must be at least one kitrepo section in a kit build file.
|
||||
# If you want to support multiple OSes, you should create a separate
|
||||
# repo for each OS. Also, no two repos can be defined with the same
|
||||
# OS name, major/minor version and arch. For example, you cannot have
|
||||
# two repos for RHEL 6.2 ppc64 in the same kit.
|
||||
#
|
||||
# kitrepo attributes:
|
||||
# kitrepoid (mandatory) Kit package repository ID.
|
||||
# Must be unique within this file.
|
||||
# osbasename (mandatory) OS distro base name. e.g., rhels.
|
||||
# osmajorversion (mandatory) OS major version. e.g., 6
|
||||
# osminorversion (optional) OS minor version.
|
||||
# osarch (mandatory) OS architecture. e.g., ppc64
|
||||
# compat_osbasenames (optional) Comma-separated list of compatible
|
||||
# OS distro base names. e.g., centos
|
||||
|
||||
kitrepo:
|
||||
kitrepoid=rhels6_ppc64
|
||||
osbasename=rhels
|
||||
osmajorversion=6
|
||||
osarch=ppc64
|
||||
|
||||
#compat_osbasenames=
|
||||
|
||||
kitrepo:
|
||||
kitrepoid=sles11_ppc64
|
||||
osbasename=sles
|
||||
osmajorversion=11
|
||||
osarch=ppc64
|
||||
|
||||
# kitcomponent: This section defines one Kit Component.
|
||||
# There can be zero or more kitcomponent sections.
|
||||
# If you want to build a component which supports multiple OSes,
|
||||
# you should create one kitcomponent section for each OS.
|
||||
# Also, no two components in a kit can be defined with the same
|
||||
# base name.
|
||||
# You can define multiple kit components with the same base name
|
||||
# only if each kit component using this base name meets these
|
||||
# requirements:
|
||||
# - Each kit component must be defined with the same version
|
||||
# and release number
|
||||
# - Each kit component must be defined with a unique kitrepoid
|
||||
|
||||
#
|
||||
# kitcomponent attributes:
|
||||
# basename (mandatory) Kit component base name
|
||||
# description (optional) Kit component description
|
||||
# version (mandatory) Kit component version
|
||||
# release (mandatory) Kit component release
|
||||
# serverroles (mandatory) Comma-separated list of servers that this
|
||||
# component can install on. Valid values:
|
||||
# mgtnode,servicenode,compute,login,storage,utility
|
||||
# kitrepoid (mandatory) The ID of the kit package repository this
|
||||
# component belongs to
|
||||
# kitcompdeps (optional) Comma-separated list of kit component
|
||||
# dependencies. These kit components can be included in
|
||||
# this kit or in other kits.
|
||||
# ospkgdeps (optional) Comma-separated list of OS package dependencies
|
||||
# These packages must be shipped with the OS distro.
|
||||
# kitpkgdeps (optional) Comma-separated list of kit package names that
|
||||
# will be listed as "REQUIRES" when building this kit
|
||||
# component. Each package must be defined in a separate
|
||||
# kitpackage section. Each package must be in the same
|
||||
# kitrepo as this kit component.
|
||||
# non_native_pkgs (optional) TBD -- NOT SUPPORTED YET!
|
||||
# Comma-separated list of non_native package
|
||||
# paths that will be included as files in this kit
|
||||
# component. All filenames are relative to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# Kit component deployment scripts must be specified
|
||||
# to manage these files.
|
||||
# driverpacks (optional) Comma-separated list of driver package filenames
|
||||
# Each driverpack must be defined in a separate kitpackage
|
||||
# section.
|
||||
# exlist (optional) Exclude list file for stateless image, relative
|
||||
# to <Kit Build Directory>/other_files
|
||||
# Kit component deployment scripts (optional) Each attribute specifies
|
||||
# script path relative to <Kit Build Directory>/scripts
|
||||
# Script attributes:
|
||||
# preinstall, postinstall, preuninstall, postuninstall,
|
||||
# preupgrade, postupgrade, postbootscripts
|
||||
kitcomponent:
|
||||
basename=gpfs_compute
|
||||
description=GPFS for compute nodes
|
||||
version=3.5.0
|
||||
release=6
|
||||
serverroles=compute,servicenode
|
||||
kitrepoid=rhels6_ppc64
|
||||
#kitcompdeps=
|
||||
#ospkgdeps=
|
||||
kitpkgdeps=gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0,gpfs.docs >= 3.5.0
|
||||
#non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
#driverpacks=
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=min_gpfs_compute
|
||||
description=Minimal GPFS for compute nodes
|
||||
version=3.5.0
|
||||
release=6
|
||||
serverroles=compute,servicenode
|
||||
kitrepoid=rhels6_ppc64
|
||||
#kitcompdeps=
|
||||
#ospkgdeps=
|
||||
kitpkgdeps=gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0
|
||||
#non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
#driverpacks=
|
||||
exlist=min-gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=gpfs_login
|
||||
description=GPFS for login nodes
|
||||
version=3.5.0
|
||||
release=6
|
||||
serverroles=login
|
||||
kitrepoid=rhels6_ppc64
|
||||
#kitcompdeps=
|
||||
#ospkgdeps=
|
||||
kitpkgdeps=gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0,gpfs.docs >= 3.5.0
|
||||
#non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
#driverpacks=
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=gpfs_storage
|
||||
description=GPFS for storage nodes
|
||||
version=3.5.0
|
||||
release=6
|
||||
serverroles=storage,servicenode
|
||||
kitrepoid=rhels6_ppc64
|
||||
#kitcompdeps=
|
||||
#ospkgdeps=
|
||||
kitpkgdeps=gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0,gpfs.docs >= 3.5.0
|
||||
#non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
#driverpacks=
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config_storage
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=gpfs_compute
|
||||
description=GPFS for compute nodes
|
||||
version=3.5.0
|
||||
release=6
|
||||
serverroles=compute,servicenode
|
||||
kitrepoid=sles11_ppc64
|
||||
#kitcompdeps=
|
||||
#ospkgdeps=
|
||||
kitpkgdeps=gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0 ,gpfs.docs >= 3.5.0,gpfs.gnr >= 3.5.0
|
||||
#non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
#driverpacks=
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=min_gpfs_compute
|
||||
description=Minimal GPFS for compute nodes
|
||||
version=3.5.0
|
||||
release=6
|
||||
serverroles=compute,servicenode
|
||||
kitrepoid=sles11_ppc64
|
||||
#kitcompdeps=
|
||||
#ospkgdeps=
|
||||
kitpkgdeps=gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0,gpfs.gnr >= 3.5.0
|
||||
#non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
#driverpacks=
|
||||
exlist=min-gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=gpfs_login
|
||||
description=GPFS for login nodes
|
||||
version=3.5.0
|
||||
release=6
|
||||
serverroles=login
|
||||
kitrepoid=sles11_ppc64
|
||||
#kitcompdeps=
|
||||
#ospkgdeps=
|
||||
kitpkgdeps=gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0,gpfs.docs >= 3.5.0,gpfs.gnr >= 3.5.0
|
||||
#non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
#driverpacks=
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=gpfs_storage
|
||||
description=GPFS for storage nodes
|
||||
version=3.5.0
|
||||
release=6
|
||||
serverroles=storage,servicenode
|
||||
kitrepoid=sles11_ppc64
|
||||
#kitcompdeps=
|
||||
#ospkgdeps=
|
||||
kitpkgdeps=gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0,gpfs.docs >= 3.5.0,gpfs.gnr >= 3.5.0
|
||||
#non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
#driverpacks=
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config_storage
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
|
||||
|
||||
# kitpackage: This section defines one Kit Package, and how to build it.
|
||||
# There can be zero or more kitpackage sections.
|
||||
# All filenames should be relative paths to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# If you want to build a package which can run on multiple OSes,
|
||||
# you have two options:
|
||||
# 1. Build a separate package for each OS you want to support.
|
||||
# For this option, you need to define one kitpackage section
|
||||
# per supported OS.
|
||||
# 2. Build one package that can run on multiple OSes.
|
||||
# If you are building an RPM package, you are responsible for
|
||||
# creating an RPM spec file that can run on multiple OSes.
|
||||
# For this option, you need to define one kitpackage section
|
||||
# which contains multiple kitrepoid lines.
|
||||
#
|
||||
# kitpackage attributes:
|
||||
# filename (mandatory) Package filename
|
||||
# kitrepoid (mandatory) The repo(s) this package belongs to.
|
||||
# If multiple repos are defined, the package will be built for
|
||||
# the first repo only. For the other repos, a symlink is created
|
||||
# to the package built for the first repo.
|
||||
# Package build methods (optional)
|
||||
# Define how to build the packages.
|
||||
# If you don't specify a build method, the default behavior is
|
||||
# to assume the package is pre-built under
|
||||
# <Kit Build Directory>/source_packages
|
||||
# All files in this section are relative to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# There are four methods to build packages.
|
||||
# 1. Use pre-built RPM package
|
||||
# isexternalpkg: 'no'|'0', 'yes'|'1' (default: 'no')
|
||||
# Indicates whether the RPM package will be added to the
|
||||
# the kit tar file now as part of the kit build process,
|
||||
# or whether the customer will need to separately
|
||||
# obtain the RPM pacakage and add it to the kit tar file
|
||||
# using 'buildkit addpkgs'
|
||||
# rpm_prebuiltdir: If isexternalpkg=no, path to directory
|
||||
# containing pre-built RPM package
|
||||
# 2. Build RPM from spec + src dir
|
||||
# rpm_spec: Path to spec file.
|
||||
# rpm_srcdir: Path to source directory.
|
||||
# 3. Build RPM from spec + src tarball
|
||||
# rpm_spec: Path to spec file.
|
||||
# rpm_srctarball: Path to source tarball.
|
||||
# 4. Build RPM from source RPM
|
||||
# rpm_srpm: Path to source RPM package.
|
||||
kitpackage:
|
||||
filename=gpfs.base-3.5.0-6.ppc64.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
||||
|
||||
kitpackage:
|
||||
filename=gpfs.gpl-3.5.0-6.noarch.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
||||
|
||||
kitpackage:
|
||||
filename=gpfs.docs-3.5.0-6.noarch.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
||||
|
||||
kitpackage:
|
||||
filename=gpfs.msg.en_US-3.5.0-6.noarch.rpm
|
||||
kitrepoid=rhels6_ppc64,sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
||||
|
||||
kitpackage:
|
||||
filename=gpfs.gnr-3.5.0-6.sles.ppc64.rpm
|
||||
kitrepoid=sles11_ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
@ -1,3 +0,0 @@
|
||||
./usr/lpp/mmfs/include*
|
||||
./usr/lpp/mmfs/samples*
|
||||
|
@ -1,65 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Sample script to install and configure GPFS
|
||||
# For AIX:
|
||||
# Assumes the GPFS filesets and updates were installed using
|
||||
# xCAT bundle files or some other mechanism. This script does not
|
||||
# install additional software.
|
||||
# It will do the following:
|
||||
# - create /var/mmfs/etc/nsddevices that simply returns 0
|
||||
# - add GPFS paths to profile
|
||||
# For Linux:
|
||||
# Assumes the base GPFS rpms were installed with the xCAT 'otherpkgs'
|
||||
# postscript (stateful install) or with the otherpkgs processing of
|
||||
# genimage (stateless/statelite install). This script will install any
|
||||
# gpfs update rpms that exist on the xCAT management node in the
|
||||
# /install/post/gpfs_updates directory.
|
||||
# This is necessary because the GPFS updates can ONLY be installed
|
||||
# after the base rpms have been installed, and the update rpms cannot
|
||||
# exist in any rpm repositories used by xCAT otherpkgs processing
|
||||
# since they will confuse rpm tools such as zypper and yum.
|
||||
# This script will also do the following:
|
||||
# - create /var/mmfs/etc/nsddevices that simply returns 0
|
||||
# - add GPFS paths to profile
|
||||
|
||||
OS=`uname`
|
||||
|
||||
# Create an empty nsddevices script for GPFS
|
||||
# This assumes that the node is NOT an NSD server
|
||||
if [ $OS != "AIX" ]; then
|
||||
# Create the script on the node
|
||||
mkdir -p /var/mmfs/etc
|
||||
echo 'return 0' > /var/mmfs/etc/nsddevices
|
||||
chmod 744 /var/mmfs/etc/nsddevices
|
||||
fi
|
||||
|
||||
|
||||
# Add GPFS path to profile
|
||||
if [ $OS != "AIX" ]; then
|
||||
gpfsprofile=/etc/profile.d/gpfs
|
||||
if [ ! -f "/proc/cmdline" ]; then
|
||||
gpfsprofile=$gpfsprofile
|
||||
fi
|
||||
if [ ! -e $gpfsprofile.sh ]; then
|
||||
echo 'export PATH=$PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.sh
|
||||
echo 'setenv PATH $PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.csh
|
||||
# Turn off LANG support since we did not install other msg catalogs
|
||||
echo 'export LC_CTYPE=POSIX' >> $gpfsprofile.sh
|
||||
echo 'setenv LC_CTYPE POSIX' >> $gpfsprofile.csh
|
||||
echo 'export LC_ALL=POSIX' >> $gpfsprofile.sh
|
||||
echo 'setenv LC_ALL POSIX' >> $gpfsprofile.csh
|
||||
chmod 744 $gpfsprofile.sh
|
||||
chmod 744 $gpfsprofile.csh
|
||||
fi
|
||||
fi
|
||||
|
||||
# If you are using a shared home directory stored in GPFS,
|
||||
# create the symbolic link
|
||||
#
|
||||
# GPFSHOME=/gpfs/home
|
||||
# HOMEDIR=/u
|
||||
# ln -s $GPFSHOME $HOMEDIR
|
||||
|
||||
|
||||
|
@ -1,65 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Sample script to install and configure GPFS
|
||||
# For AIX:
|
||||
# Assumes the GPFS filesets and updates were installed using
|
||||
# xCAT bundle files or some other mechanism. This script does not
|
||||
# install additional software.
|
||||
# It will do the following:
|
||||
# - create /var/mmfs/etc/nsddevices that simply returns 0
|
||||
# - add GPFS paths to profile
|
||||
# For Linux:
|
||||
# Assumes the base GPFS rpms were installed with the xCAT 'otherpkgs'
|
||||
# postscript (stateful install) or with the otherpkgs processing of
|
||||
# genimage (stateless/statelite install). This script will install any
|
||||
# gpfs update rpms that exist on the xCAT management node in the
|
||||
# /install/post/gpfs_updates directory.
|
||||
# This is necessary because the GPFS updates can ONLY be installed
|
||||
# after the base rpms have been installed, and the update rpms cannot
|
||||
# exist in any rpm repositories used by xCAT otherpkgs processing
|
||||
# since they will confuse rpm tools such as zypper and yum.
|
||||
# This script will also do the following:
|
||||
# - create /var/mmfs/etc/nsddevices that simply returns 0
|
||||
# - add GPFS paths to profile
|
||||
|
||||
OS=`uname`
|
||||
|
||||
## Create an empty nsddevices script for GPFS
|
||||
## This assumes that the node is NOT an NSD server
|
||||
#if [ $OS != "AIX" ]; then
|
||||
# # Create the script on the node
|
||||
# mkdir -p /var/mmfs/etc
|
||||
# echo 'return 0' > /var/mmfs/etc/nsddevices
|
||||
# chmod 744 /var/mmfs/etc/nsddevices
|
||||
#fi
|
||||
|
||||
|
||||
# Add GPFS path to profile
|
||||
if [ $OS != "AIX" ]; then
|
||||
gpfsprofile=/etc/profile.d/gpfs
|
||||
if [ ! -f "/proc/cmdline" ]; then
|
||||
gpfsprofile=$gpfsprofile
|
||||
fi
|
||||
if [ ! -e $gpfsprofile.sh ]; then
|
||||
echo 'export PATH=$PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.sh
|
||||
echo 'setenv PATH $PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.csh
|
||||
# Turn off LANG support since we did not install other msg catalogs
|
||||
echo 'export LC_CTYPE=POSIX' >> $gpfsprofile.sh
|
||||
echo 'setenv LC_CTYPE POSIX' >> $gpfsprofile.csh
|
||||
echo 'export LC_ALL=POSIX' >> $gpfsprofile.sh
|
||||
echo 'setenv LC_ALL POSIX' >> $gpfsprofile.csh
|
||||
chmod 744 $gpfsprofile.sh
|
||||
chmod 744 $gpfsprofile.csh
|
||||
fi
|
||||
fi
|
||||
|
||||
# If you are using a shared home directory stored in GPFS,
|
||||
# create the symbolic link
|
||||
#
|
||||
# GPFSHOME=/gpfs/home
|
||||
# HOMEDIR=/u
|
||||
# ln -s $GPFSHOME $HOMEDIR
|
||||
|
||||
|
||||
|
@ -1,38 +0,0 @@
|
||||
#!/bin/sh
|
||||
# xCAT postscript to configure GPFS on a stateless node.
|
||||
# Before booting nodes with this postscript, gpfs must be up and configured correctly on the node
|
||||
# pointed to by the -p flag below. The $MASTER environment variable will be set by xCAT to
|
||||
# the service node or management node of this booting node. If you want the nodes to get their
|
||||
# GPFS configuration from a different node, replace $MASTER with that IP address.
|
||||
|
||||
|
||||
# The source server:location of the mmsdrfs file. Default is this xCAT MN.
|
||||
#SOURCE=gpfsmgr:/var/mmfs/gen/mmsdrfs
|
||||
SOURCE=/var/mmfs/gen/mmsdrfs
|
||||
|
||||
# The gpfsmgr which save the mmsdrfs file. generally it is XCATMASTER
|
||||
GPFSMGR=$MASTER
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
OS=`uname`
|
||||
if [[ "$OS" != "AIX" ]]; then
|
||||
rsync -i -t $SOURCE $installroot/var/mmfs/gen/mmsdrfs
|
||||
if [[ $? != 0 ]]
|
||||
then
|
||||
echo "Error: rsync -i -t $SOURCE $installroot/var/mmfs/gen/mmsdrfs failed. Please make sure GPFS is configured correctly!"
|
||||
else
|
||||
echo "rsync -i -t $SOURCE $installroot/var/mmfs/gen/mmsdrfs succeed"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
else
|
||||
cmd="/usr/lpp/mmfs/bin/mmsdrrestore -p $GPFSMGR -R /usr/bin/scp&"
|
||||
$cmd > /dev/null 2>&1
|
||||
if [[ $? != 0 ]]
|
||||
then
|
||||
echo "mmsdrrestore failed!"
|
||||
exit 2
|
||||
else
|
||||
echo "mmsdrrestore succeeded"
|
||||
fi
|
||||
fi
|
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Run this script as a postscript on any node (stateless, statefull,
|
||||
# full-disk install, AIX, Linux) to start the GPFS daemon
|
||||
#
|
||||
|
||||
# If you have any special network dependencies, you may want to add code
|
||||
# to check them first
|
||||
|
||||
/usr/lpp/mmfs/bin/mmstartup
|
||||
|
@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -n $installroot ]; then
|
||||
if [ -n "`ls $installroot/opt/xcat/kits/gpfs/gpfs_compute-3.5.0-6-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force --root $installroot -Uvh $installroot/opt/xcat/kits/gpfs/gpfs_compute-3.5.0-6-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
else
|
||||
if [ -n "`ls /opt/xcat/kits/gpfs/gpfs_compute-3.5.0-6-rhels-6-ppc64/*.rpm 2> /dev/null`" ] ; then
|
||||
rpm --force -Uvh /opt/xcat/kits/gpfs/gpfs_compute-3.5.0-6-rhels-6-ppc64/*.rpm
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,5 +0,0 @@
|
||||
# Exclude list for building a minimal diskless image
|
||||
|
||||
./usr/lpp/mmfs/include*
|
||||
./usr/lpp/mmfs/samples*
|
||||
./usr/lpp/mmfs/src*
|
@ -1,175 +0,0 @@
|
||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
require xCAT::KitPluginUtils;
|
||||
|
||||
|
||||
# buildkit Processing
|
||||
# In order to avoid collisions with other plugins, the package
|
||||
# name for this plugin must contain the full kit name.
|
||||
# The buildkit buildtar command will copy this file from your plugins
|
||||
# directory to the the kit build directory, renaming the file with the
|
||||
# correct kit name. All strings in this file of the form
|
||||
# <<<buildkit_WILL_INSERT_kitname_HERE>>>
|
||||
# will be replaced with the full kit name. In order for buildkit to
|
||||
# correctly edit this file, do not remove these strings.
|
||||
|
||||
|
||||
# Global Variables
|
||||
|
||||
# This is the full name of the kit which this plugin belongs
|
||||
# to. The kit name is used by some code in process_request()
|
||||
# to determine if the plugin should run. When you are testing
|
||||
# your plugin the kit name should be set to "TESTMODE" to
|
||||
# bypass the plugin check in process_request().
|
||||
|
||||
our ($PLUGIN_KITNAME);
|
||||
#$PLUGIN_KITNAME = "TESTMODE";
|
||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head1
|
||||
|
||||
Image Profile Kit Plugin
|
||||
This plugin contains commands to run custom actions
|
||||
during image profile operations.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
|
||||
Return list of kit plugin commands handled by this plugin
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
kitimagevalidatecomps => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
|
||||
kitimageimport => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 process_request
|
||||
|
||||
Process the kit plugin command.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
|
||||
# This kit plugin is passed the name of an image profile.
|
||||
# We need to determine which kits is used by this
|
||||
# image profile to decide if this plugin should run or not.
|
||||
|
||||
my $imgprofilename = $request->{arg}->[0];
|
||||
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata)) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_image_profiles([$imgprofilename]);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
||||
if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Name of command and node list
|
||||
my $command = $request->{command}->[0];
|
||||
my $args = $request->{arg};
|
||||
|
||||
if($command eq 'kitimagevalidatecomps') {
|
||||
kitimagevalidatecomps($callback, $args);
|
||||
}
|
||||
elsif ($command eq 'kitimageimport') {
|
||||
kitimageimport($callback, $args);
|
||||
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Command is not supported";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitimagevalidatecomps
|
||||
|
||||
This command is called to validate new changes to an
|
||||
image profile's kit component list before the changes
|
||||
are committed.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitimagevalidatecomps {
|
||||
my $callback = shift;
|
||||
my $args = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $imgprofilename = $args->[0];
|
||||
my $newcomplist = $args->[1];
|
||||
my @newcomplist = ();
|
||||
if (defined($newcomplist)) {
|
||||
@newcomplist = split(/,/, $newcomplist);
|
||||
}
|
||||
my $newosdistro = $args->[2];
|
||||
my $newosdistroupdate = $args->[3];
|
||||
|
||||
$rsp->{data}->[0] = "Running kitimagevalidatecomps";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitimageimport
|
||||
|
||||
This command is called after changes to an image profile
|
||||
have been committed.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitimageimport {
|
||||
my $callback = shift;
|
||||
my $args = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $imgprofilename = $args->[0];
|
||||
|
||||
$rsp->{data}->[0] = "Running kitimageimport";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
@ -1,251 +0,0 @@
|
||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
require xCAT::KitPluginUtils;
|
||||
|
||||
# buildkit Processing
|
||||
# In order to avoid collisions with other plugins, the package
|
||||
# name for this plugin must contain the full kit name.
|
||||
# The buildkit buildtar command will copy this file from your plugins
|
||||
# directory to the the kit build directory, renaming the file with the
|
||||
# correct kit name. All strings in this file of the form
|
||||
# <<<buildkit_WILL_INSERT_kitname_HERE>>>
|
||||
# will be replaced with the full kit name. In order for buildkit to
|
||||
# correctly edit this file, do not remove these strings.
|
||||
|
||||
# Global Variables
|
||||
|
||||
# This is the full name of the kit which this plugin belongs
|
||||
# to. The kit name is used by some code in process_request()
|
||||
# to determine if the plugin should run. When you are testing
|
||||
# your plugin the kit name should be set to "TESTMODE" to
|
||||
# bypass the plugin check in process_request().
|
||||
|
||||
our ($PLUGIN_KITNAME);
|
||||
#$PLUGIN_KITNAME = "TESTMODE";
|
||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head1
|
||||
|
||||
Node Management Kit Plugin
|
||||
This plugin contains commands to run custom actions
|
||||
during node management operations.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
|
||||
Return list of kit plugin commands handled by this plugin
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
kitnodeadd => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnoderemove => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnodeupdate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnoderefresh => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnodefinished => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 process_request
|
||||
|
||||
Process the kit plugin command.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
|
||||
# Name of command and node list
|
||||
my $command = $request->{command}->[0];
|
||||
my $nodes = $request->{node};
|
||||
|
||||
# This kit plugin is passed a list of node names.
|
||||
# We need to determine which kits are used by these
|
||||
# nodes to decide if this plugin should run or not.
|
||||
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata)) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_nodes($nodes);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
||||
if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Get the nodes using this plugin's kit
|
||||
$nodes = $kitdata->{$PLUGIN_KITNAME};
|
||||
|
||||
|
||||
if($command eq 'kitnodeadd') {
|
||||
kitnodeadd($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnoderemove') {
|
||||
kitnoderemove($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnodeupdate') {
|
||||
kitnodeupdate($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnoderefresh') {
|
||||
kitnoderefresh($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnodefinished') {
|
||||
kitnodefinished($callback);
|
||||
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Command is not supported";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodeadd
|
||||
|
||||
This command is called when one or more nodes are added
|
||||
to the cluster.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodeadd {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodeadd";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnoderemove
|
||||
|
||||
This command is called when one or more nodes are
|
||||
removed from the cluster.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnoderemove {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnoderemove";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodeupdate
|
||||
|
||||
This command is called when the configuration of one
|
||||
or more nodes are updated.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodeupdate {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodeupdate";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnoderefresh
|
||||
|
||||
This command is called when node-related configuration
|
||||
files are updated.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnoderefresh {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnoderefresh";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodefinished
|
||||
|
||||
This command is called at the end of a node management
|
||||
operation.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodefinished {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodefinished";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
@ -1,38 +0,0 @@
|
||||
#!/bin/sh
|
||||
# xCAT postscript to configure GPFS on a stateless node.
|
||||
# Before booting nodes with this postscript, gpfs must be up and configured correctly on the node
|
||||
# pointed to by the -p flag below. The $MASTER environment variable will be set by xCAT to
|
||||
# the service node or management node of this booting node. If you want the nodes to get their
|
||||
# GPFS configuration from a different node, replace $MASTER with that IP address.
|
||||
|
||||
|
||||
# The source server:location of the mmsdrfs file. Default is this xCAT MN.
|
||||
#SOURCE=gpfsmgr:/var/mmfs/gen/mmsdrfs
|
||||
SOURCE=/var/mmfs/gen/mmsdrfs
|
||||
|
||||
# The gpfsmgr which save the mmsdrfs file. generally it is XCATMASTER
|
||||
GPFSMGR=$MASTER
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
OS=`uname`
|
||||
if [[ "$OS" != "AIX" ]]; then
|
||||
rsync -i -t $SOURCE $installroot/var/mmfs/gen/mmsdrfs
|
||||
if [[ $? != 0 ]]
|
||||
then
|
||||
echo "Error: rsync -i -t $SOURCE $installroot/var/mmfs/gen/mmsdrfs failed. Please make sure GPFS is configured correctly!"
|
||||
else
|
||||
echo "rsync -i -t $SOURCE $installroot/var/mmfs/gen/mmsdrfs succeed"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
else
|
||||
cmd="/usr/lpp/mmfs/bin/mmsdrrestore -p $GPFSMGR -R /usr/bin/scp&"
|
||||
$cmd > /dev/null 2>&1
|
||||
if [[ $? != 0 ]]
|
||||
then
|
||||
echo "mmsdrrestore failed!"
|
||||
exit 2
|
||||
else
|
||||
echo "mmsdrrestore succeeded"
|
||||
fi
|
||||
fi
|
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Run this script as a postscript on any node (stateless, statefull,
|
||||
# full-disk install, AIX, Linux) to start the GPFS daemon
|
||||
#
|
||||
|
||||
# If you have any special network dependencies, you may want to add code
|
||||
# to check them first
|
||||
|
||||
/usr/lpp/mmfs/bin/mmstartup
|
||||
|
@ -1,84 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Sample script to install and configure GPFS
|
||||
# For AIX:
|
||||
# Assumes the GPFS filesets and updates were installed using
|
||||
# xCAT bundle files or some other mechanism. This script does not
|
||||
# install additional software.
|
||||
# It will do the following:
|
||||
# - create /var/mmfs/etc/nsddevices that simply returns 0
|
||||
# - add GPFS paths to profile
|
||||
# For Linux:
|
||||
# Assumes the base GPFS rpms were installed with the xCAT 'otherpkgs'
|
||||
# postscript (stateful install) or with the otherpkgs processing of
|
||||
# genimage (stateless/statelite install). This script will install any
|
||||
# gpfs update rpms that exist on the xCAT management node in the
|
||||
# /install/post/gpfs_updates directory.
|
||||
# This is necessary because the GPFS updates can ONLY be installed
|
||||
# after the base rpms have been installed, and the update rpms cannot
|
||||
# exist in any rpm repositories used by xCAT otherpkgs processing
|
||||
# since they will confuse rpm tools such as zypper and yum.
|
||||
# This script will also do the following:
|
||||
# - create /var/mmfs/etc/nsddevices that simply returns 0
|
||||
# - add GPFS paths to profile
|
||||
|
||||
OS=`uname`
|
||||
INSTALL_DIR='/install'
|
||||
UPDATES_DIR='post/otherpkgs/gpfs_updates'
|
||||
|
||||
if [ $OS != "AIX" ]; then
|
||||
if [ -f "/proc/cmdline" ]; then
|
||||
# Being run from a stateful install postscript
|
||||
# Copy rpms directly from the xCAT management node and install
|
||||
mkdir -p /tmp/gpfs_updates
|
||||
rm -f -R /tmp/gpfs_updates/*
|
||||
cd /tmp/gpfs_updates
|
||||
# wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -t 10 -T 60 -nH --cut-dirs=3 ftp://$SITEMASTER/$UPDATES_DIR/*.rpm 2> /tmp/wget.log
|
||||
wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -t 10 -T 60 -nH --cut-dirs=4 --reject "index.html*" --no-parent http://$SITEMASTER$INSTALL_DIR/$UPDATES_DIR/ 2> /tmp/wget.log
|
||||
if [ -n "`ls *.rpm 2> /dev/null`" ] ; then
|
||||
rpm -Uvh *.rpm
|
||||
fi
|
||||
cd /
|
||||
rm -f -R /tmp/gpfs_updates
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create an empty nsddevices script for GPFS
|
||||
# This assumes that the node is NOT an NSD server
|
||||
if [ $OS != "AIX" ]; then
|
||||
# Create the script on the node
|
||||
mkdir -p /var/mmfs/etc
|
||||
echo 'return 0' > /var/mmfs/etc/nsddevices
|
||||
chmod 744 /var/mmfs/etc/nsddevices
|
||||
fi
|
||||
|
||||
|
||||
# Add GPFS path to profile
|
||||
if [ $OS != "AIX" ]; then
|
||||
gpfsprofile=/etc/profile.d/gpfs
|
||||
if [ ! -f "/proc/cmdline" ]; then
|
||||
gpfsprofile=$gpfsprofile
|
||||
fi
|
||||
if [ ! -e $gpfsprofile.sh ]; then
|
||||
echo 'export PATH=$PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.sh
|
||||
echo 'setenv PATH $PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.csh
|
||||
# Turn off LANG support since we did not install other msg catalogs
|
||||
echo 'export LC_CTYPE=POSIX' >> $gpfsprofile.sh
|
||||
echo 'setenv LC_CTYPE POSIX' >> $gpfsprofile.csh
|
||||
echo 'export LC_ALL=POSIX' >> $gpfsprofile.sh
|
||||
echo 'setenv LC_ALL POSIX' >> $gpfsprofile.csh
|
||||
chmod 744 $gpfsprofile.sh
|
||||
chmod 744 $gpfsprofile.csh
|
||||
fi
|
||||
fi
|
||||
|
||||
# If you are using a shared home directory stored in GPFS,
|
||||
# create the symbolic link
|
||||
#
|
||||
# GPFSHOME=/gpfs/home
|
||||
# HOMEDIR=/u
|
||||
# ln -s $GPFSHOME $HOMEDIR
|
||||
|
||||
|
||||
|
@ -1,84 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Sample script to install and configure GPFS
|
||||
# For AIX:
|
||||
# Assumes the GPFS filesets and updates were installed using
|
||||
# xCAT bundle files or some other mechanism. This script does not
|
||||
# install additional software.
|
||||
# It will do the following:
|
||||
# - create /var/mmfs/etc/nsddevices that simply returns 0
|
||||
# - add GPFS paths to profile
|
||||
# For Linux:
|
||||
# Assumes the base GPFS rpms were installed with the xCAT 'otherpkgs'
|
||||
# postscript (stateful install) or with the otherpkgs processing of
|
||||
# genimage (stateless/statelite install). This script will install any
|
||||
# gpfs update rpms that exist on the xCAT management node in the
|
||||
# /install/post/gpfs_updates directory.
|
||||
# This is necessary because the GPFS updates can ONLY be installed
|
||||
# after the base rpms have been installed, and the update rpms cannot
|
||||
# exist in any rpm repositories used by xCAT otherpkgs processing
|
||||
# since they will confuse rpm tools such as zypper and yum.
|
||||
# This script will also do the following:
|
||||
# - create /var/mmfs/etc/nsddevices that simply returns 0
|
||||
# - add GPFS paths to profile
|
||||
|
||||
OS=`uname`
|
||||
INSTALL_DIR='/install'
|
||||
UPDATES_DIR='post/otherpkgs/gpfs_updates'
|
||||
|
||||
if [ $OS != "AIX" ]; then
|
||||
if [ -f "/proc/cmdline" ]; then
|
||||
# Being run from a stateful install postscript
|
||||
# Copy rpms directly from the xCAT management node and install
|
||||
mkdir -p /tmp/gpfs_updates
|
||||
rm -f -R /tmp/gpfs_updates/*
|
||||
cd /tmp/gpfs_updates
|
||||
# wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -t 10 -T 60 -nH --cut-dirs=3 ftp://$SITEMASTER/$UPDATES_DIR/*.rpm 2> /tmp/wget.log
|
||||
wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -t 10 -T 60 -nH --cut-dirs=4 --reject "index.html*" --no-parent http://$SITEMASTER$INSTALL_DIR/$UPDATES_DIR/ 2> /tmp/wget.log
|
||||
if [ -n "`ls *.rpm 2> /dev/null`" ] ; then
|
||||
rpm -Uvh *.rpm
|
||||
fi
|
||||
cd /
|
||||
rm -f -R /tmp/gpfs_updates
|
||||
fi
|
||||
fi
|
||||
|
||||
## Create an empty nsddevices script for GPFS
|
||||
## This assumes that the node is NOT an NSD server
|
||||
#if [ $OS != "AIX" ]; then
|
||||
# # Create the script on the node
|
||||
# mkdir -p /var/mmfs/etc
|
||||
# echo 'return 0' > /var/mmfs/etc/nsddevices
|
||||
# chmod 744 /var/mmfs/etc/nsddevices
|
||||
#fi
|
||||
|
||||
|
||||
# Add GPFS path to profile
|
||||
if [ $OS != "AIX" ]; then
|
||||
gpfsprofile=/etc/profile.d/gpfs
|
||||
if [ ! -f "/proc/cmdline" ]; then
|
||||
gpfsprofile=$gpfsprofile
|
||||
fi
|
||||
if [ ! -e $gpfsprofile.sh ]; then
|
||||
echo 'export PATH=$PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.sh
|
||||
echo 'setenv PATH $PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.csh
|
||||
# Turn off LANG support since we did not install other msg catalogs
|
||||
echo 'export LC_CTYPE=POSIX' >> $gpfsprofile.sh
|
||||
echo 'setenv LC_CTYPE POSIX' >> $gpfsprofile.csh
|
||||
echo 'export LC_ALL=POSIX' >> $gpfsprofile.sh
|
||||
echo 'setenv LC_ALL POSIX' >> $gpfsprofile.csh
|
||||
chmod 744 $gpfsprofile.sh
|
||||
chmod 744 $gpfsprofile.csh
|
||||
fi
|
||||
fi
|
||||
|
||||
# If you are using a shared home directory stored in GPFS,
|
||||
# create the symbolic link
|
||||
#
|
||||
# GPFSHOME=/gpfs/home
|
||||
# HOMEDIR=/u
|
||||
# ln -s $GPFSHOME $HOMEDIR
|
||||
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
|
||||
echo "running sample-comp1 post script"
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo "running sample-comp1 postboot script"
|
||||
|
@ -1,3 +0,0 @@
|
||||
|
||||
echo "running sample-comp1 postun script"
|
||||
|
@ -1,3 +0,0 @@
|
||||
|
||||
echo "running sample-comp1 postup script"
|
||||
|
@ -1,3 +0,0 @@
|
||||
|
||||
echo "running sample-comp1 pre script"
|
||||
|
@ -1,3 +0,0 @@
|
||||
|
||||
echo "running sample-comp1 preun script"
|
||||
|
@ -1,3 +0,0 @@
|
||||
|
||||
echo "running sample-comp1 preup script"
|
||||
|
@ -1,329 +0,0 @@
|
||||
# Kit Build File
|
||||
#
|
||||
# This file was initially auto-generated by the buildkit CLI command.
|
||||
# To create a new kit, the user should modify this file accordingly.
|
||||
# Refer to the buildkit manpage for further details.
|
||||
#
|
||||
|
||||
# kit: This section defines general info for the Kit.
|
||||
# There must be exactly one kit section in a kit build file.
|
||||
#
|
||||
# kit attributes:
|
||||
# basename (mandatory) Kit base name. e.g., kit-lsf
|
||||
# description (optional) Kit description.
|
||||
# version (mandatory) Kit version. e.g., 1.0
|
||||
# ostype (mandatory) Kit OS type. Must be Linux.
|
||||
# AIX is currently not supported.
|
||||
# isinternal (optional) PCM use only.
|
||||
# Indicate if Kit is for internal use.
|
||||
# Use 1 for yes, 0 for no. Default: 0
|
||||
# kitdeployparams (optional) Filename containing a list of kit deployment
|
||||
# parameters, relative to
|
||||
# <Kit Build Directory>/other_files
|
||||
kit:
|
||||
basename=gpfs
|
||||
description=General Parallel File System
|
||||
version=3.5.0-6
|
||||
ostype=Linux
|
||||
#kitdeployparams=
|
||||
|
||||
|
||||
# kitrepo: This section defines a Kit Package Repository.
|
||||
# There must be at least one kitrepo section in a kit build file.
|
||||
# If you want to support multiple OSes, you should create a separate
|
||||
# repo for each OS. Also, no two repos can be defined with the same
|
||||
# OS name, major/minor version and arch. For example, you cannot have
|
||||
# two repos for RHEL 6.2 x86_64 in the same kit.
|
||||
#
|
||||
# kitrepo attributes:
|
||||
# kitrepoid (mandatory) Kit package repository ID.
|
||||
# Must be unique within this file.
|
||||
# osbasename (mandatory) OS distro base name. e.g., rhels.
|
||||
# osmajorversion (mandatory) OS major version. e.g., 6
|
||||
# osminorversion (optional) OS minor version.
|
||||
# osarch (mandatory) OS architecture. e.g., x86_64
|
||||
# compat_osbasenames (optional) Comma-separated list of compatible
|
||||
# OS distro base names. e.g., centos
|
||||
|
||||
kitrepo:
|
||||
kitrepoid=rhels6_x86_64
|
||||
osbasename=rhels
|
||||
osmajorversion=6
|
||||
osarch=x86_64
|
||||
|
||||
#compat_osbasenames=
|
||||
|
||||
kitrepo:
|
||||
kitrepoid=sles11_x86_64
|
||||
osbasename=sles
|
||||
osmajorversion=11
|
||||
osarch=x86_64
|
||||
|
||||
# kitcomponent: This section defines one Kit Component.
|
||||
# There can be zero or more kitcomponent sections.
|
||||
# If you want to build a component which supports multiple OSes,
|
||||
# you should create one kitcomponent section for each OS.
|
||||
# Also, no two components in a kit can be defined with the same
|
||||
# base name.
|
||||
# You can define multiple kit components with the same base name
|
||||
# only if each kit component using this base name meets these
|
||||
# requirements:
|
||||
# - Each kit component must be defined with the same version
|
||||
# and release number
|
||||
# - Each kit component must be defined with a unique kitrepoid
|
||||
|
||||
#
|
||||
# kitcomponent attributes:
|
||||
# basename (mandatory) Kit component base name
|
||||
# description (optional) Kit component description
|
||||
# version (mandatory) Kit component version
|
||||
# release (mandatory) Kit component release
|
||||
# serverroles (mandatory) Comma-separated list of servers that this
|
||||
# component can install on. Valid values:
|
||||
# mgtnode,servicenode,compute,login,storage,utility
|
||||
# kitrepoid (mandatory) The ID of the kit package repository this
|
||||
# component belongs to
|
||||
# kitcompdeps (optional) Comma-separated list of kit component
|
||||
# dependencies. These kit components can be included in
|
||||
# this kit or in other kits.
|
||||
# ospkgdeps (optional) Comma-separated list of OS package dependencies
|
||||
# These packages must be shipped with the OS distro.
|
||||
# kitpkgdeps (optional) Comma-separated list of kit package names that
|
||||
# will be listed as "REQUIRES" when building this kit
|
||||
# component. Each package must be defined in a separate
|
||||
# kitpackage section. Each package must be in the same
|
||||
# kitrepo as this kit component.
|
||||
# non_native_pkgs (optional) TBD -- NOT SUPPORTED YET!
|
||||
# Comma-separated list of non_native package
|
||||
# paths that will be included as files in this kit
|
||||
# component. All filenames are relative to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# Kit component deployment scripts must be specified
|
||||
# to manage these files.
|
||||
# driverpacks (optional) Comma-separated list of driver package filenames
|
||||
# Each driverpack must be defined in a separate kitpackage
|
||||
# section.
|
||||
# exlist (optional) Exclude list file for stateless image, relative
|
||||
# to <Kit Build Directory>/other_files
|
||||
# Kit component deployment scripts (optional) Each attribute specifies
|
||||
# script path relative to <Kit Build Directory>/scripts
|
||||
# Script attributes:
|
||||
# preinstall, postinstall, preuninstall, postuninstall,
|
||||
# preupgrade, postupgrade, postbootscripts
|
||||
kitcomponent:
|
||||
basename=gpfs_compute
|
||||
description=GPFS for compute nodes
|
||||
version=3.5.0
|
||||
release=6
|
||||
serverroles=compute,servicenode
|
||||
kitrepoid=rhels6_x86_64
|
||||
#kitcompdeps=
|
||||
#ospkgdeps=ksh
|
||||
kitpkgdeps=gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0,gpfs.docs >= 3.5.0,gpfs.src >= 3.5.0,gpfs.libsrc >= 3.5.0
|
||||
#driverpacks=
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.x86_64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=min_gpfs_compute
|
||||
description=Minimal GPFS for compute nodes
|
||||
version=3.5.0
|
||||
release=6
|
||||
serverroles=compute,servicenode
|
||||
kitrepoid=rhels6_x86_64
|
||||
#kitcompdeps=
|
||||
#ospkgdeps=ksh
|
||||
kitpkgdeps=gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0
|
||||
#driverpacks=
|
||||
exlist=min-gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.x86_64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=gpfs_login
|
||||
description=GPFS for login nodes
|
||||
version=3.5.0
|
||||
release=6
|
||||
serverroles=login
|
||||
kitrepoid=rhels6_x86_64
|
||||
#kitcompdeps=
|
||||
#ospkgdeps=ksh
|
||||
kitpkgdeps=gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0,gpfs.docs >= 3.5.0,gpfs.src >= 3.5.0,gpfs.libsrc >= 3.5.0
|
||||
#driverpacks=
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.x86_64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=gpfs_storage
|
||||
description=GPFS for storage nodes
|
||||
version=3.5.0
|
||||
release=6
|
||||
serverroles=storage,servicenode
|
||||
kitrepoid=rhels6_x86_64
|
||||
#kitcompdeps=
|
||||
#ospkgdeps=ksh
|
||||
kitpkgdeps=gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0,gpfs.docs >= 3.5.0,gpfs.src >= 3.5.0,gpfs.libsrc >= 3.5.0
|
||||
#driverpacks=
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config_storage
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.x86_64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=gpfs_compute
|
||||
description=GPFS for compute nodes
|
||||
version=3.5.0
|
||||
release=6
|
||||
serverroles=compute,servicenode
|
||||
kitrepoid=sles11_x86_64
|
||||
#kitcompdeps=
|
||||
#ospkgdeps=ksh
|
||||
kitpkgdeps=gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0 ,gpfs.docs >= 3.5.0,gpfs.src >= 3.5.0,gpfs.libsrc >= 3.5.0
|
||||
#driverpacks=
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.x86_64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=min_gpfs_compute
|
||||
description=Minimal GPFS for compute nodes
|
||||
version=3.5.0
|
||||
release=6
|
||||
serverroles=compute,servicenode
|
||||
kitrepoid=sles11_x86_64
|
||||
#kitcompdeps=
|
||||
#ospkgdeps=ksh
|
||||
kitpkgdeps=gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0
|
||||
#driverpacks=
|
||||
exlist=min-gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.x86_64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=gpfs_login
|
||||
description=GPFS for login nodes
|
||||
version=3.5.0
|
||||
release=6
|
||||
serverroles=login
|
||||
kitrepoid=sles11_x86_64
|
||||
#kitcompdeps=
|
||||
#ospkgdeps=ksh
|
||||
kitpkgdeps=gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0,gpfs.docs >= 3.5.0,gpfs.src >= 3.5.0,gpfs.libsrc >= 3.5.0
|
||||
#driverpacks=
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.x86_64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=gpfs_storage
|
||||
description=GPFS for storage nodes
|
||||
version=3.5.0
|
||||
release=6
|
||||
serverroles=storage,servicenode
|
||||
kitrepoid=sles11_x86_64
|
||||
#kitcompdeps=
|
||||
#ospkgdeps=
|
||||
kitpkgdeps=gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0,gpfs.docs >= 3.5.0,gpfs.src >= 3.5.0,gpfs.libsrc >= 3.5.0
|
||||
#driverpacks=
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config_storage
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-6.x86_64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
|
||||
|
||||
# kitpackage: This section defines one Kit Package, and how to build it.
|
||||
# There can be zero or more kitpackage sections.
|
||||
# All filenames should be relative paths to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# If you want to build a package which can run on multiple OSes,
|
||||
# you have two options:
|
||||
# 1. Build a separate package for each OS you want to support.
|
||||
# For this option, you need to define one kitpackage section
|
||||
# per supported OS.
|
||||
# 2. Build one package that can run on multiple OSes.
|
||||
# If you are building an RPM package, you are responsible for
|
||||
# creating an RPM spec file that can run on multiple OSes.
|
||||
# For this option, you need to define one kitpackage section
|
||||
# which contains multiple kitrepoid lines.
|
||||
#
|
||||
# kitpackage attributes:
|
||||
# filename (mandatory) Package filename
|
||||
# kitrepoid (mandatory) The repo(s) this package belongs to.
|
||||
# If multiple repos are defined, the package will be built for
|
||||
# the first repo only. For the other repos, a symlink is created
|
||||
# to the package built for the first repo.
|
||||
# Package build methods (optional)
|
||||
# Define how to build the packages.
|
||||
# If you don't specify a build method, the default behavior is
|
||||
# to assume the package is pre-built under
|
||||
# <Kit Build Directory>/source_packages
|
||||
# All files in this section are relative to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# There are four methods to build packages.
|
||||
# 1. Use pre-built RPM package
|
||||
# isexternalpkg: 'no'|'0', 'yes'|'1' (default: 'no')
|
||||
# Indicates whether the RPM package will be added to the
|
||||
# the kit tar file now as part of the kit build process,
|
||||
# or whether the customer will need to separately
|
||||
# obtain the RPM pacakage and add it to the kit tar file
|
||||
# using 'buildkit addpkgs'
|
||||
# rpm_prebuiltdir: If isexternalpkg=no, path to directory
|
||||
# containing pre-built RPM package
|
||||
# 2. Build RPM from spec + src dir
|
||||
# rpm_spec: Path to spec file.
|
||||
# rpm_srcdir: Path to source directory.
|
||||
# 3. Build RPM from spec + src tarball
|
||||
# rpm_spec: Path to spec file.
|
||||
# rpm_srctarball: Path to source tarball.
|
||||
# 4. Build RPM from source RPM
|
||||
# rpm_srpm: Path to source RPM package.
|
||||
kitpackage:
|
||||
filename=gpfs.base-3.5.0-6.x86_64.rpm
|
||||
kitrepoid=rhels6_x86_64,sles11_x86_64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
||||
|
||||
kitpackage:
|
||||
filename=gpfs.gpl-3.5.0-6.noarch.rpm
|
||||
kitrepoid=rhels6_x86_64,sles11_x86_64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
||||
|
||||
kitpackage:
|
||||
filename=gpfs.docs-3.5.0-6.noarch.rpm
|
||||
kitrepoid=rhels6_x86_64,sles11_x86_64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
||||
|
||||
kitpackage:
|
||||
filename=gpfs.msg.en_US-3.5.0-6.noarch.rpm
|
||||
kitrepoid=rhels6_x86_64,sles11_x86_64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
||||
|
||||
kitpackage:
|
||||
filename=gpfs.src-3.5.0-6.noarch.rpm
|
||||
kitrepoid=rhels6_x86_64,sles11_x86_64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
||||
|
||||
kitpackage:
|
||||
filename=gpfs.libsrc-3.5.0-6.noarch.rpm
|
||||
kitrepoid=rhels6_x86_64,sles11_x86_64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
@ -1,3 +0,0 @@
|
||||
./usr/lpp/mmfs/include*
|
||||
./usr/lpp/mmfs/samples*
|
||||
|
@ -1,5 +0,0 @@
|
||||
# Exclude list for building a minimal diskless image
|
||||
|
||||
./usr/lpp/mmfs/include*
|
||||
./usr/lpp/mmfs/samples*
|
||||
./usr/lpp/mmfs/src*
|
@ -1,175 +0,0 @@
|
||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
require xCAT::KitPluginUtils;
|
||||
|
||||
|
||||
# buildkit Processing
|
||||
# In order to avoid collisions with other plugins, the package
|
||||
# name for this plugin must contain the full kit name.
|
||||
# The buildkit buildtar command will copy this file from your plugins
|
||||
# directory to the the kit build directory, renaming the file with the
|
||||
# correct kit name. All strings in this file of the form
|
||||
# <<<buildkit_WILL_INSERT_kitname_HERE>>>
|
||||
# will be replaced with the full kit name. In order for buildkit to
|
||||
# correctly edit this file, do not remove these strings.
|
||||
|
||||
|
||||
# Global Variables
|
||||
|
||||
# This is the full name of the kit which this plugin belongs
|
||||
# to. The kit name is used by some code in process_request()
|
||||
# to determine if the plugin should run. When you are testing
|
||||
# your plugin the kit name should be set to "TESTMODE" to
|
||||
# bypass the plugin check in process_request().
|
||||
|
||||
our ($PLUGIN_KITNAME);
|
||||
#$PLUGIN_KITNAME = "TESTMODE";
|
||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head1
|
||||
|
||||
Image Profile Kit Plugin
|
||||
This plugin contains commands to run custom actions
|
||||
during image profile operations.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
|
||||
Return list of kit plugin commands handled by this plugin
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
kitimagevalidatecomps => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
|
||||
kitimageimport => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 process_request
|
||||
|
||||
Process the kit plugin command.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
|
||||
# This kit plugin is passed the name of an image profile.
|
||||
# We need to determine which kits is used by this
|
||||
# image profile to decide if this plugin should run or not.
|
||||
|
||||
my $imgprofilename = $request->{arg}->[0];
|
||||
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata)) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_image_profiles([$imgprofilename]);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
||||
if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Name of command and node list
|
||||
my $command = $request->{command}->[0];
|
||||
my $args = $request->{arg};
|
||||
|
||||
if($command eq 'kitimagevalidatecomps') {
|
||||
kitimagevalidatecomps($callback, $args);
|
||||
}
|
||||
elsif ($command eq 'kitimageimport') {
|
||||
kitimageimport($callback, $args);
|
||||
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Command is not supported";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitimagevalidatecomps
|
||||
|
||||
This command is called to validate new changes to an
|
||||
image profile's kit component list before the changes
|
||||
are committed.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitimagevalidatecomps {
|
||||
my $callback = shift;
|
||||
my $args = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $imgprofilename = $args->[0];
|
||||
my $newcomplist = $args->[1];
|
||||
my @newcomplist = ();
|
||||
if (defined($newcomplist)) {
|
||||
@newcomplist = split(/,/, $newcomplist);
|
||||
}
|
||||
my $newosdistro = $args->[2];
|
||||
my $newosdistroupdate = $args->[3];
|
||||
|
||||
$rsp->{data}->[0] = "Running kitimagevalidatecomps";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitimageimport
|
||||
|
||||
This command is called after changes to an image profile
|
||||
have been committed.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitimageimport {
|
||||
my $callback = shift;
|
||||
my $args = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $imgprofilename = $args->[0];
|
||||
|
||||
$rsp->{data}->[0] = "Running kitimageimport";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
@ -1,251 +0,0 @@
|
||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
require xCAT::KitPluginUtils;
|
||||
|
||||
# buildkit Processing
|
||||
# In order to avoid collisions with other plugins, the package
|
||||
# name for this plugin must contain the full kit name.
|
||||
# The buildkit buildtar command will copy this file from your plugins
|
||||
# directory to the the kit build directory, renaming the file with the
|
||||
# correct kit name. All strings in this file of the form
|
||||
# <<<buildkit_WILL_INSERT_kitname_HERE>>>
|
||||
# will be replaced with the full kit name. In order for buildkit to
|
||||
# correctly edit this file, do not remove these strings.
|
||||
|
||||
# Global Variables
|
||||
|
||||
# This is the full name of the kit which this plugin belongs
|
||||
# to. The kit name is used by some code in process_request()
|
||||
# to determine if the plugin should run. When you are testing
|
||||
# your plugin the kit name should be set to "TESTMODE" to
|
||||
# bypass the plugin check in process_request().
|
||||
|
||||
our ($PLUGIN_KITNAME);
|
||||
#$PLUGIN_KITNAME = "TESTMODE";
|
||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head1
|
||||
|
||||
Node Management Kit Plugin
|
||||
This plugin contains commands to run custom actions
|
||||
during node management operations.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
|
||||
Return list of kit plugin commands handled by this plugin
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
kitnodeadd => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnoderemove => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnodeupdate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnoderefresh => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnodefinished => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 process_request
|
||||
|
||||
Process the kit plugin command.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
|
||||
# Name of command and node list
|
||||
my $command = $request->{command}->[0];
|
||||
my $nodes = $request->{node};
|
||||
|
||||
# This kit plugin is passed a list of node names.
|
||||
# We need to determine which kits are used by these
|
||||
# nodes to decide if this plugin should run or not.
|
||||
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata)) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_nodes($nodes);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
||||
if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Get the nodes using this plugin's kit
|
||||
$nodes = $kitdata->{$PLUGIN_KITNAME};
|
||||
|
||||
|
||||
if($command eq 'kitnodeadd') {
|
||||
kitnodeadd($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnoderemove') {
|
||||
kitnoderemove($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnodeupdate') {
|
||||
kitnodeupdate($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnoderefresh') {
|
||||
kitnoderefresh($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnodefinished') {
|
||||
kitnodefinished($callback);
|
||||
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Command is not supported";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodeadd
|
||||
|
||||
This command is called when one or more nodes are added
|
||||
to the cluster.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodeadd {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodeadd";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnoderemove
|
||||
|
||||
This command is called when one or more nodes are
|
||||
removed from the cluster.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnoderemove {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnoderemove";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodeupdate
|
||||
|
||||
This command is called when the configuration of one
|
||||
or more nodes are updated.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodeupdate {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodeupdate";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnoderefresh
|
||||
|
||||
This command is called when node-related configuration
|
||||
files are updated.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnoderefresh {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnoderefresh";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodefinished
|
||||
|
||||
This command is called at the end of a node management
|
||||
operation.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodefinished {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodefinished";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
@ -1,38 +0,0 @@
|
||||
#!/bin/sh
|
||||
# xCAT postscript to configure GPFS on a stateless node.
|
||||
# Before booting nodes with this postscript, gpfs must be up and configured correctly on the node
|
||||
# pointed to by the -p flag below. The $MASTER environment variable will be set by xCAT to
|
||||
# the service node or management node of this booting node. If you want the nodes to get their
|
||||
# GPFS configuration from a different node, replace $MASTER with that IP address.
|
||||
|
||||
|
||||
# The source server:location of the mmsdrfs file. Default is this xCAT MN.
|
||||
#SOURCE=gpfsmgr:/var/mmfs/gen/mmsdrfs
|
||||
SOURCE=/var/mmfs/gen/mmsdrfs
|
||||
|
||||
# The gpfsmgr which save the mmsdrfs file. generally it is XCATMASTER
|
||||
GPFSMGR=$MASTER
|
||||
|
||||
if [[ ! -z "$installroot" ]]; then
|
||||
OS=`uname`
|
||||
if [[ "$OS" != "AIX" ]]; then
|
||||
rsync -i -t $SOURCE $installroot/var/mmfs/gen/mmsdrfs
|
||||
if [[ $? != 0 ]]
|
||||
then
|
||||
echo "Error: rsync -i -t $SOURCE $installroot/var/mmfs/gen/mmsdrfs failed. Please make sure GPFS is configured correctly!"
|
||||
else
|
||||
echo "rsync -i -t $SOURCE $installroot/var/mmfs/gen/mmsdrfs succeed"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
else
|
||||
cmd="/usr/lpp/mmfs/bin/mmsdrrestore -p $GPFSMGR -R /usr/bin/scp&"
|
||||
$cmd > /dev/null 2>&1
|
||||
if [[ $? != 0 ]]
|
||||
then
|
||||
echo "mmsdrrestore failed!"
|
||||
exit 2
|
||||
else
|
||||
echo "mmsdrrestore succeeded"
|
||||
fi
|
||||
fi
|
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Run this script as a postscript on any node (stateless, statefull,
|
||||
# full-disk install, AIX, Linux) to start the GPFS daemon
|
||||
#
|
||||
|
||||
# If you have any special network dependencies, you may want to add code
|
||||
# to check them first
|
||||
|
||||
/usr/lpp/mmfs/bin/mmstartup
|
||||
|
@ -1,84 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Sample script to install and configure GPFS
|
||||
# For AIX:
|
||||
# Assumes the GPFS filesets and updates were installed using
|
||||
# xCAT bundle files or some other mechanism. This script does not
|
||||
# install additional software.
|
||||
# It will do the following:
|
||||
# - create /var/mmfs/etc/nsddevices that simply returns 0
|
||||
# - add GPFS paths to profile
|
||||
# For Linux:
|
||||
# Assumes the base GPFS rpms were installed with the xCAT 'otherpkgs'
|
||||
# postscript (stateful install) or with the otherpkgs processing of
|
||||
# genimage (stateless/statelite install). This script will install any
|
||||
# gpfs update rpms that exist on the xCAT management node in the
|
||||
# /install/post/gpfs_updates directory.
|
||||
# This is necessary because the GPFS updates can ONLY be installed
|
||||
# after the base rpms have been installed, and the update rpms cannot
|
||||
# exist in any rpm repositories used by xCAT otherpkgs processing
|
||||
# since they will confuse rpm tools such as zypper and yum.
|
||||
# This script will also do the following:
|
||||
# - create /var/mmfs/etc/nsddevices that simply returns 0
|
||||
# - add GPFS paths to profile
|
||||
|
||||
OS=`uname`
|
||||
INSTALL_DIR='/install'
|
||||
UPDATES_DIR='post/otherpkgs/gpfs_updates'
|
||||
|
||||
if [ $OS != "AIX" ]; then
|
||||
if [ -f "/proc/cmdline" ]; then
|
||||
# Being run from a stateful install postscript
|
||||
# Copy rpms directly from the xCAT management node and install
|
||||
mkdir -p /tmp/gpfs_updates
|
||||
rm -f -R /tmp/gpfs_updates/*
|
||||
cd /tmp/gpfs_updates
|
||||
# wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -t 10 -T 60 -nH --cut-dirs=3 ftp://$SITEMASTER/$UPDATES_DIR/*.rpm 2> /tmp/wget.log
|
||||
wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -t 10 -T 60 -nH --cut-dirs=4 --reject "index.html*" --no-parent http://$SITEMASTER$INSTALL_DIR/$UPDATES_DIR/ 2> /tmp/wget.log
|
||||
if [ -n "`ls *.rpm 2> /dev/null`" ] ; then
|
||||
rpm -Uvh *.rpm
|
||||
fi
|
||||
cd /
|
||||
rm -f -R /tmp/gpfs_updates
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create an empty nsddevices script for GPFS
|
||||
# This assumes that the node is NOT an NSD server
|
||||
if [ $OS != "AIX" ]; then
|
||||
# Create the script on the node
|
||||
mkdir -p /var/mmfs/etc
|
||||
echo 'return 0' > /var/mmfs/etc/nsddevices
|
||||
chmod 744 /var/mmfs/etc/nsddevices
|
||||
fi
|
||||
|
||||
|
||||
# Add GPFS path to profile
|
||||
if [ $OS != "AIX" ]; then
|
||||
gpfsprofile=/etc/profile.d/gpfs
|
||||
if [ ! -f "/proc/cmdline" ]; then
|
||||
gpfsprofile=$gpfsprofile
|
||||
fi
|
||||
if [ ! -e $gpfsprofile.sh ]; then
|
||||
echo 'export PATH=$PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.sh
|
||||
echo 'setenv PATH $PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.csh
|
||||
# Turn off LANG support since we did not install other msg catalogs
|
||||
echo 'export LC_CTYPE=POSIX' >> $gpfsprofile.sh
|
||||
echo 'setenv LC_CTYPE POSIX' >> $gpfsprofile.csh
|
||||
echo 'export LC_ALL=POSIX' >> $gpfsprofile.sh
|
||||
echo 'setenv LC_ALL POSIX' >> $gpfsprofile.csh
|
||||
chmod 744 $gpfsprofile.sh
|
||||
chmod 744 $gpfsprofile.csh
|
||||
fi
|
||||
fi
|
||||
|
||||
# If you are using a shared home directory stored in GPFS,
|
||||
# create the symbolic link
|
||||
#
|
||||
# GPFSHOME=/gpfs/home
|
||||
# HOMEDIR=/u
|
||||
# ln -s $GPFSHOME $HOMEDIR
|
||||
|
||||
|
||||
|
@ -1,84 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Sample script to install and configure GPFS
|
||||
# For AIX:
|
||||
# Assumes the GPFS filesets and updates were installed using
|
||||
# xCAT bundle files or some other mechanism. This script does not
|
||||
# install additional software.
|
||||
# It will do the following:
|
||||
# - create /var/mmfs/etc/nsddevices that simply returns 0
|
||||
# - add GPFS paths to profile
|
||||
# For Linux:
|
||||
# Assumes the base GPFS rpms were installed with the xCAT 'otherpkgs'
|
||||
# postscript (stateful install) or with the otherpkgs processing of
|
||||
# genimage (stateless/statelite install). This script will install any
|
||||
# gpfs update rpms that exist on the xCAT management node in the
|
||||
# /install/post/gpfs_updates directory.
|
||||
# This is necessary because the GPFS updates can ONLY be installed
|
||||
# after the base rpms have been installed, and the update rpms cannot
|
||||
# exist in any rpm repositories used by xCAT otherpkgs processing
|
||||
# since they will confuse rpm tools such as zypper and yum.
|
||||
# This script will also do the following:
|
||||
# - create /var/mmfs/etc/nsddevices that simply returns 0
|
||||
# - add GPFS paths to profile
|
||||
|
||||
OS=`uname`
|
||||
INSTALL_DIR='/install'
|
||||
UPDATES_DIR='post/otherpkgs/gpfs_updates'
|
||||
|
||||
if [ $OS != "AIX" ]; then
|
||||
if [ -f "/proc/cmdline" ]; then
|
||||
# Being run from a stateful install postscript
|
||||
# Copy rpms directly from the xCAT management node and install
|
||||
mkdir -p /tmp/gpfs_updates
|
||||
rm -f -R /tmp/gpfs_updates/*
|
||||
cd /tmp/gpfs_updates
|
||||
# wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -t 10 -T 60 -nH --cut-dirs=3 ftp://$SITEMASTER/$UPDATES_DIR/*.rpm 2> /tmp/wget.log
|
||||
wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -t 10 -T 60 -nH --cut-dirs=4 --reject "index.html*" --no-parent http://$SITEMASTER$INSTALL_DIR/$UPDATES_DIR/ 2> /tmp/wget.log
|
||||
if [ -n "`ls *.rpm 2> /dev/null`" ] ; then
|
||||
rpm -Uvh *.rpm
|
||||
fi
|
||||
cd /
|
||||
rm -f -R /tmp/gpfs_updates
|
||||
fi
|
||||
fi
|
||||
|
||||
## Create an empty nsddevices script for GPFS
|
||||
## This assumes that the node is NOT an NSD server
|
||||
#if [ $OS != "AIX" ]; then
|
||||
# # Create the script on the node
|
||||
# mkdir -p /var/mmfs/etc
|
||||
# echo 'return 0' > /var/mmfs/etc/nsddevices
|
||||
# chmod 744 /var/mmfs/etc/nsddevices
|
||||
#fi
|
||||
|
||||
|
||||
# Add GPFS path to profile
|
||||
if [ $OS != "AIX" ]; then
|
||||
gpfsprofile=/etc/profile.d/gpfs
|
||||
if [ ! -f "/proc/cmdline" ]; then
|
||||
gpfsprofile=$gpfsprofile
|
||||
fi
|
||||
if [ ! -e $gpfsprofile.sh ]; then
|
||||
echo 'export PATH=$PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.sh
|
||||
echo 'setenv PATH $PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.csh
|
||||
# Turn off LANG support since we did not install other msg catalogs
|
||||
echo 'export LC_CTYPE=POSIX' >> $gpfsprofile.sh
|
||||
echo 'setenv LC_CTYPE POSIX' >> $gpfsprofile.csh
|
||||
echo 'export LC_ALL=POSIX' >> $gpfsprofile.sh
|
||||
echo 'setenv LC_ALL POSIX' >> $gpfsprofile.csh
|
||||
chmod 744 $gpfsprofile.sh
|
||||
chmod 744 $gpfsprofile.csh
|
||||
fi
|
||||
fi
|
||||
|
||||
# If you are using a shared home directory stored in GPFS,
|
||||
# create the symbolic link
|
||||
#
|
||||
# GPFSHOME=/gpfs/home
|
||||
# HOMEDIR=/u
|
||||
# ln -s $GPFSHOME $HOMEDIR
|
||||
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
|
||||
echo "running sample-comp1 post script"
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo "running sample-comp1 postboot script"
|
||||
|
@ -1,3 +0,0 @@
|
||||
|
||||
echo "running sample-comp1 postun script"
|
||||
|
@ -1,3 +0,0 @@
|
||||
|
||||
echo "running sample-comp1 postup script"
|
||||
|
@ -1,3 +0,0 @@
|
||||
|
||||
echo "running sample-comp1 pre script"
|
||||
|
@ -1,3 +0,0 @@
|
||||
|
||||
echo "running sample-comp1 preun script"
|
||||
|
@ -1,3 +0,0 @@
|
||||
|
||||
echo "running sample-comp1 preup script"
|
||||
|
@ -1,327 +0,0 @@
|
||||
# Kit Build File
|
||||
#
|
||||
# This file was initially auto-generated by the buildkit CLI command.
|
||||
# To create a new kit, the user should modify this file accordingly.
|
||||
# Refer to the buildkit manpage for further details.
|
||||
#
|
||||
|
||||
# kit: This section defines general info for the Kit.
|
||||
# There must be exactly one kit section in a kit build file.
|
||||
#
|
||||
# kit attributes:
|
||||
# basename (mandatory) Kit base name. e.g., kit-lsf
|
||||
# description (optional) Kit description.
|
||||
# version (mandatory) Kit version. e.g., 1.0
|
||||
# ostype (mandatory) Kit OS type. Must be Linux.
|
||||
# AIX is currently not supported.
|
||||
# isinternal (optional) PCM use only.
|
||||
# Indicate if Kit is for internal use.
|
||||
# Use 1 for yes, 0 for no. Default: 0
|
||||
# kitdeployparams (optional) Filename containing a list of kit deployment
|
||||
# parameters, relative to
|
||||
# <Kit Build Directory>/other_files
|
||||
kit:
|
||||
basename=gpfs
|
||||
description=General Parallel File System
|
||||
version=3.5.0-7
|
||||
ostype=Linux
|
||||
kitlicense=IPLA
|
||||
#kitdeployparams=
|
||||
|
||||
|
||||
# kitrepo: This section defines a Kit Package Repository.
|
||||
# There must be at least one kitrepo section in a kit build file.
|
||||
# If you want to support multiple OSes, you should create a separate
|
||||
# repo for each OS. Also, no two repos can be defined with the same
|
||||
# OS name, major/minor version and arch. For example, you cannot have
|
||||
# two repos for RHEL 6.2 ppc64 in the same kit.
|
||||
#
|
||||
# kitrepo attributes:
|
||||
# kitrepoid (mandatory) Kit package repository ID.
|
||||
# Must be unique within this file.
|
||||
# osbasename (mandatory) OS distro base name. e.g., rhels.
|
||||
# osmajorversion (mandatory) OS major version. e.g., 6
|
||||
# osminorversion (optional) OS minor version.
|
||||
# osarch (mandatory) OS architecture. e.g., ppc64
|
||||
# compat_osbasenames (optional) Comma-separated list of compatible
|
||||
# OS distro base names. e.g., centos
|
||||
|
||||
kitrepo:
|
||||
kitrepoid=rhels6-ppc64
|
||||
osbasename=rhels
|
||||
osmajorversion=6
|
||||
osarch=ppc64
|
||||
|
||||
#compat_osbasenames=
|
||||
|
||||
kitrepo:
|
||||
kitrepoid=sles11-ppc64
|
||||
osbasename=sles
|
||||
osmajorversion=11
|
||||
osarch=ppc64
|
||||
|
||||
# kitcomponent: This section defines one Kit Component.
|
||||
# There can be zero or more kitcomponent sections.
|
||||
# If you want to build a component which supports multiple OSes,
|
||||
# you should create one kitcomponent section for each OS.
|
||||
# Also, no two components in a kit can be defined with the same
|
||||
# base name.
|
||||
# You can define multiple kit components with the same base name
|
||||
# only if each kit component using this base name meets these
|
||||
# requirements:
|
||||
# - Each kit component must be defined with the same version
|
||||
# and release number
|
||||
# - Each kit component must be defined with a unique kitrepoid
|
||||
|
||||
#
|
||||
# kitcomponent attributes:
|
||||
# basename (mandatory) Kit component base name
|
||||
# description (optional) Kit component description
|
||||
# version (mandatory) Kit component version
|
||||
# release (mandatory) Kit component release
|
||||
# serverroles (mandatory) Comma-separated list of servers that this
|
||||
# component can install on. Valid values:
|
||||
# mgtnode,servicenode,compute,login,storage,utility
|
||||
# kitrepoid (mandatory) The ID of the kit package repository this
|
||||
# component belongs to
|
||||
# kitcompdeps (optional) Comma-separated list of kit component
|
||||
# dependencies. These kit components can be included in
|
||||
# this kit or in other kits.
|
||||
# ospkgdeps (optional) Comma-separated list of OS package dependencies
|
||||
# These packages must be shipped with the OS distro.
|
||||
# kitpkgdeps (optional) Comma-separated list of kit package names that
|
||||
# will be listed as "REQUIRES" when building this kit
|
||||
# component. Each package must be defined in a separate
|
||||
# kitpackage section. Each package must be in the same
|
||||
# kitrepo as this kit component.
|
||||
# non_native_pkgs (optional) TBD -- NOT SUPPORTED YET!
|
||||
# Comma-separated list of non_native package
|
||||
# paths that will be included as files in this kit
|
||||
# component. All filenames are relative to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# Kit component deployment scripts must be specified
|
||||
# to manage these files.
|
||||
# driverpacks (optional) Comma-separated list of driver package filenames
|
||||
# Each driverpack must be defined in a separate kitpackage
|
||||
# section.
|
||||
# exlist (optional) Exclude list file for stateless image, relative
|
||||
# to <Kit Build Directory>/other_files
|
||||
# Kit component deployment scripts (optional) Each attribute specifies
|
||||
# script path relative to <Kit Build Directory>/scripts
|
||||
# Script attributes:
|
||||
# preinstall, postinstall, preuninstall, postuninstall,
|
||||
# preupgrade, postupgrade, postbootscripts
|
||||
kitcomponent:
|
||||
basename=gpfs_compute
|
||||
description=GPFS for compute nodes
|
||||
version=3.5.0
|
||||
release=7
|
||||
serverroles=compute,servicenode
|
||||
kitrepoid=rhels6-ppc64
|
||||
#kitcompdeps=
|
||||
ospkgdeps=yum
|
||||
kitpkgdeps=gpfs.libsrc >= 3.5.0,gpfs.src >= 3.5.0,gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0,gpfs.docs >= 3.5.0
|
||||
#driverpacks=
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-7.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=min_gpfs_compute
|
||||
description=Minimal GPFS for compute nodes
|
||||
version=3.5.0
|
||||
release=7
|
||||
serverroles=compute,servicenode
|
||||
kitrepoid=rhels6-ppc64
|
||||
#kitcompdeps=
|
||||
ospkgdeps=yum
|
||||
kitpkgdeps=gpfs.libsrc >= 3.5.0,gpfs.src >= 3.5.0,gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0
|
||||
exlist=min-gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-7.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=gpfs_login
|
||||
description=GPFS for login nodes
|
||||
version=3.5.0
|
||||
release=7
|
||||
serverroles=login
|
||||
kitrepoid=rhels6-ppc64
|
||||
#kitcompdeps=
|
||||
ospkgdeps=yum
|
||||
kitpkgdeps=gpfs.libsrc >= 3.5.0,gpfs.src >= 3.5.0,gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0,gpfs.docs >= 3.5.0
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-7.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=gpfs_storage
|
||||
description=GPFS for storage nodes
|
||||
version=3.5.0
|
||||
release=7
|
||||
serverroles=storage,servicenode
|
||||
kitrepoid=rhels6-ppc64
|
||||
#kitcompdeps=
|
||||
ospkgdeps=yum
|
||||
kitpkgdeps=gpfs.libsrc >= 3.5.0,gpfs.src >= 3.5.0,gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0,gpfs.docs >= 3.5.0
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config_storage
|
||||
genimage_postinstall=gpfs_update_storage
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-7.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=gpfs_compute
|
||||
description=GPFS for compute nodes
|
||||
version=3.5.0
|
||||
release=7
|
||||
serverroles=compute,servicenode
|
||||
kitrepoid=sles11-ppc64
|
||||
#kitcompdeps=
|
||||
ospkgdeps=zypper
|
||||
kitpkgdeps=gpfs.libsrc >= 3.5.0,gpfs.src >= 3.5.0,gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0 ,gpfs.docs >= 3.5.0
|
||||
#driverpacks=
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-7.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=min_gpfs_compute
|
||||
description=Minimal GPFS for compute nodes
|
||||
version=3.5.0
|
||||
release=7
|
||||
serverroles=compute,servicenode
|
||||
kitrepoid=sles11-ppc64
|
||||
#kitcompdeps=
|
||||
ospkgdeps=zypper
|
||||
kitpkgdeps=gpfs.libsrc >= 3.5.0,gpfs.src >= 3.5.0,gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0
|
||||
#driverpacks=
|
||||
exlist=min-gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-7.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=gpfs_login
|
||||
description=GPFS for login nodes
|
||||
version=3.5.0
|
||||
release=7
|
||||
serverroles=login
|
||||
kitrepoid=sles11-ppc64
|
||||
#kitcompdeps=
|
||||
ospkgdeps=zypper
|
||||
kitpkgdeps=gpfs.libsrc >= 3.5.0,gpfs.src >= 3.5.0,gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0,gpfs.docs >= 3.5.0
|
||||
#driverpacks=
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config
|
||||
genimage_postinstall=gpfs_update
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-7.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
kitcomponent:
|
||||
basename=gpfs_storage
|
||||
description=GPFS for storage nodes
|
||||
version=3.5.0
|
||||
release=7
|
||||
serverroles=storage,servicenode
|
||||
kitrepoid=sles11-ppc64
|
||||
#kitcompdeps=
|
||||
ospkgdeps=zypper
|
||||
kitpkgdeps=gpfs.libsrc >= 3.5.0,gpfs.src >= 3.5.0,gpfs.base >= 3.5.0,gpfs.gpl >= 3.5.0,gpfs.msg.en_US >= 3.5.0,gpfs.docs >= 3.5.0
|
||||
#driverpacks=
|
||||
exlist=gpfs.exlist
|
||||
postbootscripts=gpfs_mmsdrfs,gpfs_start,gpfs_config_storage
|
||||
genimage_postinstall=gpfs_update_storage
|
||||
non_native_pkgs=EXTERNALPKGS:gpfs.base-3.5.0-7.ppc64.update.rpm,EXTERNALPKGS:gpfs.gplbin*
|
||||
|
||||
|
||||
|
||||
# kitpackage: This section defines one Kit Package, and how to build it.
|
||||
# There can be zero or more kitpackage sections.
|
||||
# All filenames should be relative paths to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# If you want to build a package which can run on multiple OSes,
|
||||
# you have two options:
|
||||
# 1. Build a separate package for each OS you want to support.
|
||||
# For this option, you need to define one kitpackage section
|
||||
# per supported OS.
|
||||
# 2. Build one package that can run on multiple OSes.
|
||||
# If you are building an RPM package, you are responsible for
|
||||
# creating an RPM spec file that can run on multiple OSes.
|
||||
# For this option, you need to define one kitpackage section
|
||||
# which contains multiple kitrepoid lines.
|
||||
#
|
||||
# kitpackage attributes:
|
||||
# filename (mandatory) Package filename
|
||||
# kitrepoid (mandatory) The repo(s) this package belongs to.
|
||||
# If multiple repos are defined, the package will be built for
|
||||
# the first repo only. For the other repos, a symlink is created
|
||||
# to the package built for the first repo.
|
||||
# Package build methods (optional)
|
||||
# Define how to build the packages.
|
||||
# If you don't specify a build method, the default behavior is
|
||||
# to assume the package is pre-built under
|
||||
# <Kit Build Directory>/source_packages
|
||||
# All files in this section are relative to
|
||||
# <Kit Build Directory>/source_packages
|
||||
# There are four methods to build packages.
|
||||
# 1. Use pre-built RPM package
|
||||
# isexternalpkg: 'no'|'0', 'yes'|'1' (default: 'no')
|
||||
# Indicates whether the RPM package will be added to the
|
||||
# the kit tar file now as part of the kit build process,
|
||||
# or whether the customer will need to separately
|
||||
# obtain the RPM pacakage and add it to the kit tar file
|
||||
# using 'buildkit addpkgs'
|
||||
# rpm_prebuiltdir: If isexternalpkg=no, path to directory
|
||||
# containing pre-built RPM package
|
||||
# 2. Build RPM from spec + src dir
|
||||
# rpm_spec: Path to spec file.
|
||||
# rpm_srcdir: Path to source directory.
|
||||
# 3. Build RPM from spec + src tarball
|
||||
# rpm_spec: Path to spec file.
|
||||
# rpm_srctarball: Path to source tarball.
|
||||
# 4. Build RPM from source RPM
|
||||
# rpm_srpm: Path to source RPM package.
|
||||
kitpackage:
|
||||
filename=gpfs.base-3.5.0-7.ppc64.rpm
|
||||
kitrepoid=rhels6-ppc64,sles11-ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
||||
|
||||
kitpackage:
|
||||
filename=gpfs.gpl-3.5.0-7.noarch.rpm
|
||||
kitrepoid=rhels6-ppc64,sles11-ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
||||
|
||||
kitpackage:
|
||||
filename=gpfs.docs-3.5.0-7.noarch.rpm
|
||||
kitrepoid=rhels6-ppc64,sles11-ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
||||
|
||||
kitpackage:
|
||||
filename=gpfs.msg.en_US-3.5.0-7.noarch.rpm
|
||||
kitrepoid=rhels6-ppc64,sles11-ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
||||
|
||||
kitpackage:
|
||||
filename=gpfs.libsrc-3.5.0-7.noarch.rpm
|
||||
kitrepoid=rhels6-ppc64,sles11-ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
||||
|
||||
kitpackage:
|
||||
filename=gpfs.src-3.5.0-7.noarch.rpm
|
||||
kitrepoid=rhels6-ppc64,sles11-ppc64
|
||||
# Method 1: Use pre-built RPM package
|
||||
isexternalpkg=no
|
||||
rpm_prebuiltdir=base
|
@ -1,3 +0,0 @@
|
||||
./usr/lpp/mmfs/include*
|
||||
./usr/lpp/mmfs/samples*
|
||||
|
@ -1,5 +0,0 @@
|
||||
# Exclude list for building a minimal diskless image
|
||||
|
||||
./usr/lpp/mmfs/include*
|
||||
./usr/lpp/mmfs/samples*
|
||||
./usr/lpp/mmfs/src*
|
@ -1,175 +0,0 @@
|
||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
require xCAT::KitPluginUtils;
|
||||
|
||||
|
||||
# buildkit Processing
|
||||
# In order to avoid collisions with other plugins, the package
|
||||
# name for this plugin must contain the full kit name.
|
||||
# The buildkit buildtar command will copy this file from your plugins
|
||||
# directory to the the kit build directory, renaming the file with the
|
||||
# correct kit name. All strings in this file of the form
|
||||
# <<<buildkit_WILL_INSERT_kitname_HERE>>>
|
||||
# will be replaced with the full kit name. In order for buildkit to
|
||||
# correctly edit this file, do not remove these strings.
|
||||
|
||||
|
||||
# Global Variables
|
||||
|
||||
# This is the full name of the kit which this plugin belongs
|
||||
# to. The kit name is used by some code in process_request()
|
||||
# to determine if the plugin should run. When you are testing
|
||||
# your plugin the kit name should be set to "TESTMODE" to
|
||||
# bypass the plugin check in process_request().
|
||||
|
||||
our ($PLUGIN_KITNAME);
|
||||
#$PLUGIN_KITNAME = "TESTMODE";
|
||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head1
|
||||
|
||||
Image Profile Kit Plugin
|
||||
This plugin contains commands to run custom actions
|
||||
during image profile operations.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
|
||||
Return list of kit plugin commands handled by this plugin
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
kitimagevalidatecomps => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
|
||||
kitimageimport => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 process_request
|
||||
|
||||
Process the kit plugin command.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
|
||||
# This kit plugin is passed the name of an image profile.
|
||||
# We need to determine which kits is used by this
|
||||
# image profile to decide if this plugin should run or not.
|
||||
|
||||
my $imgprofilename = $request->{arg}->[0];
|
||||
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata)) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_image_profiles([$imgprofilename]);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
||||
if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Name of command and node list
|
||||
my $command = $request->{command}->[0];
|
||||
my $args = $request->{arg};
|
||||
|
||||
if($command eq 'kitimagevalidatecomps') {
|
||||
kitimagevalidatecomps($callback, $args);
|
||||
}
|
||||
elsif ($command eq 'kitimageimport') {
|
||||
kitimageimport($callback, $args);
|
||||
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Command is not supported";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitimagevalidatecomps
|
||||
|
||||
This command is called to validate new changes to an
|
||||
image profile's kit component list before the changes
|
||||
are committed.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitimagevalidatecomps {
|
||||
my $callback = shift;
|
||||
my $args = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $imgprofilename = $args->[0];
|
||||
my $newcomplist = $args->[1];
|
||||
my @newcomplist = ();
|
||||
if (defined($newcomplist)) {
|
||||
@newcomplist = split(/,/, $newcomplist);
|
||||
}
|
||||
my $newosdistro = $args->[2];
|
||||
my $newosdistroupdate = $args->[3];
|
||||
|
||||
$rsp->{data}->[0] = "Running kitimagevalidatecomps";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitimageimport
|
||||
|
||||
This command is called after changes to an image profile
|
||||
have been committed.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitimageimport {
|
||||
my $callback = shift;
|
||||
my $args = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $imgprofilename = $args->[0];
|
||||
|
||||
$rsp->{data}->[0] = "Running kitimageimport";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
@ -1,251 +0,0 @@
|
||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
require xCAT::KitPluginUtils;
|
||||
|
||||
# buildkit Processing
|
||||
# In order to avoid collisions with other plugins, the package
|
||||
# name for this plugin must contain the full kit name.
|
||||
# The buildkit buildtar command will copy this file from your plugins
|
||||
# directory to the the kit build directory, renaming the file with the
|
||||
# correct kit name. All strings in this file of the form
|
||||
# <<<buildkit_WILL_INSERT_kitname_HERE>>>
|
||||
# will be replaced with the full kit name. In order for buildkit to
|
||||
# correctly edit this file, do not remove these strings.
|
||||
|
||||
# Global Variables
|
||||
|
||||
# This is the full name of the kit which this plugin belongs
|
||||
# to. The kit name is used by some code in process_request()
|
||||
# to determine if the plugin should run. When you are testing
|
||||
# your plugin the kit name should be set to "TESTMODE" to
|
||||
# bypass the plugin check in process_request().
|
||||
|
||||
our ($PLUGIN_KITNAME);
|
||||
#$PLUGIN_KITNAME = "TESTMODE";
|
||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head1
|
||||
|
||||
Node Management Kit Plugin
|
||||
This plugin contains commands to run custom actions
|
||||
during node management operations.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
|
||||
Return list of kit plugin commands handled by this plugin
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
kitnodeadd => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnoderemove => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnodeupdate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnoderefresh => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
kitnodefinished => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 process_request
|
||||
|
||||
Process the kit plugin command.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
|
||||
# Name of command and node list
|
||||
my $command = $request->{command}->[0];
|
||||
my $nodes = $request->{node};
|
||||
|
||||
# This kit plugin is passed a list of node names.
|
||||
# We need to determine which kits are used by these
|
||||
# nodes to decide if this plugin should run or not.
|
||||
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata)) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_nodes($nodes);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
||||
if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Get the nodes using this plugin's kit
|
||||
$nodes = $kitdata->{$PLUGIN_KITNAME};
|
||||
|
||||
|
||||
if($command eq 'kitnodeadd') {
|
||||
kitnodeadd($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnoderemove') {
|
||||
kitnoderemove($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnodeupdate') {
|
||||
kitnodeupdate($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnoderefresh') {
|
||||
kitnoderefresh($callback, $nodes);
|
||||
}
|
||||
elsif ($command eq 'kitnodefinished') {
|
||||
kitnodefinished($callback);
|
||||
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Command is not supported";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodeadd
|
||||
|
||||
This command is called when one or more nodes are added
|
||||
to the cluster.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodeadd {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodeadd";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnoderemove
|
||||
|
||||
This command is called when one or more nodes are
|
||||
removed from the cluster.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnoderemove {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnoderemove";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodeupdate
|
||||
|
||||
This command is called when the configuration of one
|
||||
or more nodes are updated.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodeupdate {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodeupdate";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnoderefresh
|
||||
|
||||
This command is called when node-related configuration
|
||||
files are updated.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnoderefresh {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
# Parameters
|
||||
my $nodes = shift;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnoderefresh";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 kitnodefinished
|
||||
|
||||
This command is called at the end of a node management
|
||||
operation.
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
sub kitnodefinished {
|
||||
my $callback = shift;
|
||||
my $rsp;
|
||||
|
||||
$rsp->{data}->[0] = "Running kitnodefinished";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
|
||||
# TODO
|
||||
# ... ADD YOUR CODE HERE
|
||||
}
|
||||
|
@ -1,65 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Sample script to install and configure GPFS
|
||||
# For AIX:
|
||||
# Assumes the GPFS filesets and updates were installed using
|
||||
# xCAT bundle files or some other mechanism. This script does not
|
||||
# install additional software.
|
||||
# It will do the following:
|
||||
# - create /var/mmfs/etc/nsddevices that simply returns 0
|
||||
# - add GPFS paths to profile
|
||||
# For Linux:
|
||||
# Assumes the base GPFS rpms were installed with the xCAT 'otherpkgs'
|
||||
# postscript (stateful install) or with the otherpkgs processing of
|
||||
# genimage (stateless/statelite install). This script will install any
|
||||
# gpfs update rpms that exist on the xCAT management node in the
|
||||
# /install/post/gpfs_updates directory.
|
||||
# This is necessary because the GPFS updates can ONLY be installed
|
||||
# after the base rpms have been installed, and the update rpms cannot
|
||||
# exist in any rpm repositories used by xCAT otherpkgs processing
|
||||
# since they will confuse rpm tools such as zypper and yum.
|
||||
# This script will also do the following:
|
||||
# - create /var/mmfs/etc/nsddevices that simply returns 0
|
||||
# - add GPFS paths to profile
|
||||
|
||||
OS=`uname`
|
||||
|
||||
# Create an empty nsddevices script for GPFS
|
||||
# This assumes that the node is NOT an NSD server
|
||||
if [ $OS != "AIX" ]; then
|
||||
# Create the script on the node
|
||||
mkdir -p /var/mmfs/etc
|
||||
echo 'return 0' > /var/mmfs/etc/nsddevices
|
||||
chmod 744 /var/mmfs/etc/nsddevices
|
||||
fi
|
||||
|
||||
|
||||
# Add GPFS path to profile
|
||||
if [ $OS != "AIX" ]; then
|
||||
gpfsprofile=/etc/profile.d/gpfs
|
||||
if [ ! -f "/proc/cmdline" ]; then
|
||||
gpfsprofile=$gpfsprofile
|
||||
fi
|
||||
if [ ! -e $gpfsprofile.sh ]; then
|
||||
echo 'export PATH=$PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.sh
|
||||
echo 'setenv PATH $PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.csh
|
||||
# Turn off LANG support since we did not install other msg catalogs
|
||||
echo 'export LC_CTYPE=POSIX' >> $gpfsprofile.sh
|
||||
echo 'setenv LC_CTYPE POSIX' >> $gpfsprofile.csh
|
||||
echo 'export LC_ALL=POSIX' >> $gpfsprofile.sh
|
||||
echo 'setenv LC_ALL POSIX' >> $gpfsprofile.csh
|
||||
chmod 744 $gpfsprofile.sh
|
||||
chmod 744 $gpfsprofile.csh
|
||||
fi
|
||||
fi
|
||||
|
||||
# If you are using a shared home directory stored in GPFS,
|
||||
# create the symbolic link
|
||||
#
|
||||
# GPFSHOME=/gpfs/home
|
||||
# HOMEDIR=/u
|
||||
# ln -s $GPFSHOME $HOMEDIR
|
||||
|
||||
|
||||
|
@ -1,65 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Sample script to install and configure GPFS
|
||||
# For AIX:
|
||||
# Assumes the GPFS filesets and updates were installed using
|
||||
# xCAT bundle files or some other mechanism. This script does not
|
||||
# install additional software.
|
||||
# It will do the following:
|
||||
# - create /var/mmfs/etc/nsddevices that simply returns 0
|
||||
# - add GPFS paths to profile
|
||||
# For Linux:
|
||||
# Assumes the base GPFS rpms were installed with the xCAT 'otherpkgs'
|
||||
# postscript (stateful install) or with the otherpkgs processing of
|
||||
# genimage (stateless/statelite install). This script will install any
|
||||
# gpfs update rpms that exist on the xCAT management node in the
|
||||
# /install/post/gpfs_updates directory.
|
||||
# This is necessary because the GPFS updates can ONLY be installed
|
||||
# after the base rpms have been installed, and the update rpms cannot
|
||||
# exist in any rpm repositories used by xCAT otherpkgs processing
|
||||
# since they will confuse rpm tools such as zypper and yum.
|
||||
# This script will also do the following:
|
||||
# - create /var/mmfs/etc/nsddevices that simply returns 0
|
||||
# - add GPFS paths to profile
|
||||
|
||||
OS=`uname`
|
||||
|
||||
## Create an empty nsddevices script for GPFS
|
||||
## This assumes that the node is NOT an NSD server
|
||||
#if [ $OS != "AIX" ]; then
|
||||
# # Create the script on the node
|
||||
# mkdir -p /var/mmfs/etc
|
||||
# echo 'return 0' > /var/mmfs/etc/nsddevices
|
||||
# chmod 744 /var/mmfs/etc/nsddevices
|
||||
#fi
|
||||
|
||||
|
||||
# Add GPFS path to profile
|
||||
if [ $OS != "AIX" ]; then
|
||||
gpfsprofile=/etc/profile.d/gpfs
|
||||
if [ ! -f "/proc/cmdline" ]; then
|
||||
gpfsprofile=$gpfsprofile
|
||||
fi
|
||||
if [ ! -e $gpfsprofile.sh ]; then
|
||||
echo 'export PATH=$PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.sh
|
||||
echo 'setenv PATH $PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.csh
|
||||
# Turn off LANG support since we did not install other msg catalogs
|
||||
echo 'export LC_CTYPE=POSIX' >> $gpfsprofile.sh
|
||||
echo 'setenv LC_CTYPE POSIX' >> $gpfsprofile.csh
|
||||
echo 'export LC_ALL=POSIX' >> $gpfsprofile.sh
|
||||
echo 'setenv LC_ALL POSIX' >> $gpfsprofile.csh
|
||||
chmod 744 $gpfsprofile.sh
|
||||
chmod 744 $gpfsprofile.csh
|
||||
fi
|
||||
fi
|
||||
|
||||
# If you are using a shared home directory stored in GPFS,
|
||||
# create the symbolic link
|
||||
#
|
||||
# GPFSHOME=/gpfs/home
|
||||
# HOMEDIR=/u
|
||||
# ln -s $GPFSHOME $HOMEDIR
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user