Compare commits
99 Commits
fix/makero
...
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 | |||
6f3e2fb2f0 | |||
7f18ae6d6f | |||
b906c24816 | |||
476c3387cc | |||
ad004fa062 | |||
6e96acde8a | |||
4feb1eacf1 | |||
9ba0674087 | |||
77f1b1b726 | |||
f8967bc0b6 | |||
863ba244c3 | |||
47ab424f70 | |||
bae3e6b789 | |||
093b05b784 | |||
3948b72c22 | |||
093fa0578c | |||
dcd1acab69 | |||
5dbcb3dd65 | |||
2f218a06f4 | |||
6c8f3298fa | |||
a4000ce977 | |||
7ba40528e4 | |||
7fd00ce8ae | |||
c2dec7b40b | |||
4a3919e899 | |||
4da96c27a3 | |||
72b785338b | |||
711b13383f | |||
8253aee359 | |||
07fa06c4dc | |||
184487e37e | |||
05ade551f4 | |||
6aee46151c | |||
550b50149c | |||
ba121aef4a | |||
40a9d41e0b | |||
84ba7a178c | |||
e11b310efd | |||
232f325351 | |||
b56f7e9e94 | |||
68b6032dbb | |||
364e652e59 | |||
29f32d10ae | |||
aba74b7d52 | |||
1616e26c94 | |||
86042cc1f4 | |||
fa2eeecb0d | |||
509934b9d5 | |||
bb90fdf022 | |||
c24aadccfc | |||
cbcb75cdb5 | |||
1e9af7be3b | |||
7c678fd174 | |||
982d3f1aed | |||
e7e4071365 | |||
136e94ab83 | |||
33193fc495 | |||
4f6485c841 | |||
e0390d78e9 |
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.
|
||||
|
@ -2186,12 +2186,17 @@ sub isValidMAC
|
||||
sub isValidHostname
|
||||
{
|
||||
my ($class, $hostname) = @_;
|
||||
if ($hostname =~ /^[a-z0-9][\-a-z0-9]+[a-z0-9]$/){
|
||||
return 1;
|
||||
if ($hostname =~ /^[a-z0-9]/){
|
||||
if ($hostname =~ /[a-z0-9]$/){
|
||||
if ($hostname =~ /^[\-a-z0-9]+$/){
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
=head3 isValidFQDN
|
||||
|
@ -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, "");
|
||||
}
|
||||
|
||||
|
@ -260,6 +260,21 @@ virtsd => {
|
||||
}
|
||||
},
|
||||
|
||||
storage => {
|
||||
cols => [qw(node osvolume comments disable)],
|
||||
keys => [qw(node)],
|
||||
table_descr => "Node storage resources",
|
||||
descriptions => {
|
||||
'node' => 'The node name',
|
||||
osvolume => "Specification of what storage to place the node OS image onto. Examples include:
|
||||
localdisk (Install to first non-FC attached disk)
|
||||
usbdisk (Install to first USB mass storage deice seen)
|
||||
wwn=0x50000393c813840c (Install to storage device with given WWN)
|
||||
WARNING: This is as yet unimplemented by the stock OS deployment templates
|
||||
WARNING: SAS SAN devices may be considered to be 'localdisk' class.
|
||||
The default behavior if unspecified is presumed to be 'localdisk'",
|
||||
}
|
||||
},
|
||||
websrv => {
|
||||
cols => [qw(node port username password comments disable)],
|
||||
keys => [qw(node)],
|
||||
@ -2074,6 +2089,13 @@ my @nodeattrs = (
|
||||
access_tabentry => 'nics.node=attr:node',
|
||||
},
|
||||
######################
|
||||
# storage table #
|
||||
######################
|
||||
{attr_name => 'osvolume',
|
||||
tabentry => 'storage.osvolume',
|
||||
access_tabentry => 'storage.node=attr:node',
|
||||
},
|
||||
######################
|
||||
# vm table #
|
||||
######################
|
||||
{attr_name => 'vmmanager',
|
||||
|
@ -387,7 +387,7 @@ sub getIp {
|
||||
# Get IP address
|
||||
# You need the extra space in the pattern,
|
||||
# else it will confuse gpok2 with gpok21
|
||||
my $out = `cat /etc/hosts | grep "$node "`;
|
||||
my $out = `cat /etc/hosts | egrep -i "$node | $node."`;
|
||||
my @parms = split( ' ', $out );
|
||||
|
||||
return $parms[0];
|
||||
@ -682,7 +682,7 @@ sub getMdisks {
|
||||
sub getDedicates {
|
||||
|
||||
# Get inputs
|
||||
my ( $class, $user, $callback, $node ) = @_;
|
||||
my ( $class, $callback, $user, $node ) = @_;
|
||||
|
||||
my $sudo = "sudo";
|
||||
if ($user eq "root") {
|
||||
@ -697,18 +697,18 @@ sub getDedicates {
|
||||
my $propVals = xCAT::zvmUtils->getNodeProps( 'zvm', $node, @propNames );
|
||||
my $hcp = $propVals->{'hcp'};
|
||||
|
||||
# Get node userID
|
||||
# Get node userId
|
||||
my $userId = $propVals->{'userid'};
|
||||
|
||||
my $out = `ssh $user\@$hcp "$sudo $dir/getuserentry $userId" | grep "DEDICATE"`;
|
||||
|
||||
my $out = `ssh $user\@$hcp "$sudo $dir/smcli Image_Query_DM -T $userId" | egrep -i "DEDICATE"`;
|
||||
|
||||
# Get DEDICATE statements
|
||||
my @lines = split( '\n', $out );
|
||||
my @dedicates;
|
||||
foreach (@lines) {
|
||||
$_ = xCAT::zvmUtils->trimStr($_);
|
||||
|
||||
# Save MDISK statements
|
||||
# Save statements
|
||||
push( @dedicates, $_ );
|
||||
}
|
||||
|
||||
@ -2125,6 +2125,7 @@ sub querySSI {
|
||||
Description : Execute a remote command
|
||||
Arguments : User (root or non-root)
|
||||
Node
|
||||
Command to execute
|
||||
Returns : Output returned from executing command
|
||||
Example : my $out = xCAT::zvmUtils->rExecute($user, $node, $cmd);
|
||||
|
||||
@ -2146,4 +2147,51 @@ sub rExecute {
|
||||
$cmd = "'" . $cmd . "'";
|
||||
$out = `ssh $user\@$node "$sudo sh -c $cmd"`;
|
||||
return $out;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 getUsedFcpDevices
|
||||
|
||||
Description : Get a list of used FCP devices in the zFCP pools
|
||||
Arguments : User (root or non-root)
|
||||
zHCP
|
||||
Returns : List of known FCP devices
|
||||
Example : my %devices = xCAT::zvmUtils->getUsedFcpDevices($user, $zhcp);
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
sub getUsedFcpDevices {
|
||||
my ( $class, $user, $hcp ) = @_;
|
||||
|
||||
# Directory where zFCP pools are
|
||||
my $pool = "/var/opt/zhcp/zfcp";
|
||||
|
||||
my $sudo = "sudo";
|
||||
if ($user eq "root") {
|
||||
$sudo = "";
|
||||
}
|
||||
|
||||
# Grep the pools for used or allocated zFCP devices
|
||||
my %usedDevices;
|
||||
my @args;
|
||||
my @devices = split("\n", `ssh $user\@$hcp "$sudo cat $pool/*.conf" | egrep -i "used|allocated"`);
|
||||
foreach (@devices) {
|
||||
@args = split(",", $_);
|
||||
|
||||
# Sample pool configuration file:
|
||||
# #status,wwpn,lun,size,range,owner,channel,tag
|
||||
# used,1000000000000000,2000000000000110,8g,3B00-3B3F,ihost1,1a23,$root_device$
|
||||
# free,1000000000000000,2000000000000111,,3B00-3B3F,,,
|
||||
# free,1230000000000000,2000000000000112,,3B00-3B3F,,,
|
||||
$args[6] = xCAT::zvmUtils->trimStr($args[6]);
|
||||
|
||||
# Push used or allocated devices into hash
|
||||
if ($args[6]) {
|
||||
$usedDevices{uc($args[6])} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return %usedDevices;
|
||||
}
|
@ -60,9 +60,9 @@ function loadServicePage(tabId) {
|
||||
title = 'z/VM';
|
||||
|
||||
// Get zVM host names
|
||||
if (!$.cookie('srv_zvm')){
|
||||
if (!$.cookie('zvms')){
|
||||
$.ajax( {
|
||||
url : 'lib/srv_cmd.php',
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'webportal',
|
||||
@ -349,24 +349,45 @@ function imageDialog() {
|
||||
var info = createInfoBar('Provide the following attributes for the image. The image name will be generated based on the attributes you will give.');
|
||||
imageForm.append(info);
|
||||
|
||||
var imageName = $('<div><label>Image name:</label><input type="text" name="imagename" disabled="disabled"/></div>');
|
||||
var selectable = $('<div><label>Selectable:</label><input type="checkbox" name="selectable"/></div>');
|
||||
var imageType = $('<div><label>Image type:</label><input type="text" name="imagetype" value="linux"/></div>');
|
||||
var architecture = $('<div><label>OS architecture:</label><input type="text" name="osarch"/></div>');
|
||||
var osName = $('<div><label>OS name:</label><input type="text" name="osname" value="Linux"/></div>');
|
||||
var osVersion = $('<div><label>OS version:</label><input type="text" name="osvers"/></div>');
|
||||
var profile = $('<div><label>Profile:</label><input type="text" name="profile"/></div>');
|
||||
var imageName = $('<div><label>Image name:</label><input type="text" name="imagename" disabled="disabled" title="The name of the image"/></div>');
|
||||
var selectable = $('<div><label>Selectable:</label><input type="checkbox" name="selectable" title="Select if you want this image to appear on the self service portal"/></div>');
|
||||
var imageType = $('<div><label>Image type:</label><input type="text" name="imagetype" value="linux" title="The type of operating system image this definition represents"/></div>');
|
||||
var architecture = $('<div><label>OS architecture:</label><input type="text" name="osarch" title="The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64, and s390x."/></div>');
|
||||
var osName = $('<div><label>OS name:</label><input type="text" name="osname" value="Linux" title="Operating system name"/></div>');
|
||||
var osVersion = $('<div><label>OS version:</label><input type="text" name="osvers" title="The Linux operating system deployed on this node. Valid values: rhel*, centos*, fedora*, and sles* (where * is the version #)."/></div>');
|
||||
var profile = $('<div><label>Profile:</label><input type="text" name="profile" title="The node usage category"/></div>');
|
||||
var provisionMethod = $('<div><label>Provision method:</label></div>');
|
||||
var provisionSelect = $('<select name="provmethod">'
|
||||
var provisionSelect = $('<select name="provmethod" title="The provisioning method for node deployment">'
|
||||
+ '<option value=""></option>'
|
||||
+ '<option value="install">install</option>'
|
||||
+ '<option value="netboot">netboot</option>'
|
||||
+ '<option value="statelite">statelite</option>'
|
||||
+ '</select>');
|
||||
provisionMethod.append(provisionSelect);
|
||||
var comments = $('<div><label>Description:</label><input type="text" name="comments"/></div>');
|
||||
var comments = $('<div><label>Description:</label><input type="text" name="comments" title="Any user-written notes"/></div>');
|
||||
imageForm.append(imageName, selectable, imageType, architecture, osName, osVersion, profile, provisionMethod, comments);
|
||||
|
||||
// Generate tooltips
|
||||
imageForm.find('div input[title],textarea[title],select[title]').tooltip({
|
||||
position: "center right",
|
||||
offset: [-2, 10],
|
||||
effect: "fade",
|
||||
opacity: 0.8,
|
||||
delay: 0,
|
||||
predelay: 800,
|
||||
events: {
|
||||
def: "mouseover,mouseout",
|
||||
input: "mouseover,mouseout",
|
||||
widget: "focus mouseover,blur mouseout",
|
||||
tooltip: "mouseover,mouseout"
|
||||
},
|
||||
|
||||
// Change z index to show tooltip in front
|
||||
onBeforeShow: function() {
|
||||
this.getTip().css('z-index', $.topZIndex());
|
||||
}
|
||||
});
|
||||
|
||||
// Open dialog to add image
|
||||
imageForm.dialog({
|
||||
title:'Create image',
|
||||
@ -466,30 +487,37 @@ function imageDialog() {
|
||||
* @param iComments Image description
|
||||
*/
|
||||
function editImageDialog(iName, iSelectable, iOsVersion, iOsArch, iOsName, iType, iProfile, iMethod, iComments) {
|
||||
// Create form to add profile
|
||||
var dialogId = 'editImage';
|
||||
var inst = 0;
|
||||
var dialogId = 'editImage' + inst;
|
||||
while ($('#' + dialogId).length) {
|
||||
// If one already exists, generate another one
|
||||
inst = inst + 1;
|
||||
dialogId = 'editImage' + inst;
|
||||
}
|
||||
|
||||
// Create form to add profile
|
||||
var imageForm = $('<div id="' + dialogId + '" class="form"></div>');
|
||||
|
||||
// Create info bar
|
||||
var info = createInfoBar('Provide the following attributes for the image. The image name will be generated based on the attributes you will give.');
|
||||
imageForm.append(info);
|
||||
|
||||
var imageName = $('<div><label>Image name:</label><input type="text" name="imagename" disabled="disabled"/></div>');
|
||||
var selectable = $('<div><label>Selectable:</label><input type="checkbox" name="selectable"/></div>');
|
||||
var imageType = $('<div><label>Image type:</label><input type="text" name="imagetype" value="linux"/></div>');
|
||||
var architecture = $('<div><label>OS architecture:</label><input type="text" name="osarch"/></div>');
|
||||
var osName = $('<div><label>OS name:</label><input type="text" name="osname"/></div>');
|
||||
var osVersion = $('<div><label>OS version:</label><input type="text" name="osvers"/></div>');
|
||||
var profile = $('<div><label>Profile:</label><input type="text" name="profile"/></div>');
|
||||
var imageName = $('<div><label>Image name:</label><input type="text" name="imagename" disabled="disabled" title="The name of the image"/></div>');
|
||||
var selectable = $('<div><label>Selectable:</label><input type="checkbox" name="selectable" title="Select if you want this image to appear on the self service portal"/></div>');
|
||||
var imageType = $('<div><label>Image type:</label><input type="text" name="imagetype" value="linux" title="The type of operating system image this definition represents"/></div>');
|
||||
var architecture = $('<div><label>OS architecture:</label><input type="text" name="osarch" title="The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64, and s390x."/></div>');
|
||||
var osName = $('<div><label>OS name:</label><input type="text" name="osname" value="Linux" title="Operating system name"/></div>');
|
||||
var osVersion = $('<div><label>OS version:</label><input type="text" name="osvers" title="The Linux operating system deployed on this node. Valid values: rhel*, centos*, fedora*, and sles* (where * is the version #)."/></div>');
|
||||
var profile = $('<div><label>Profile:</label><input type="text" name="profile" title="The node usage category"/></div>');
|
||||
var provisionMethod = $('<div><label>Provision method:</label></div>');
|
||||
var provisionSelect = $('<select name="provmethod">'
|
||||
var provisionSelect = $('<select name="provmethod" title="The provisioning method for node deployment">'
|
||||
+ '<option value=""></option>'
|
||||
+ '<option value="install">install</option>'
|
||||
+ '<option value="netboot">netboot</option>'
|
||||
+ '<option value="statelite">statelite</option>'
|
||||
+ '</select>');
|
||||
provisionMethod.append(provisionSelect);
|
||||
var comments = $('<div><label>Description:</label><input type="text" name="comments"/></div>');
|
||||
var comments = $('<div><label>Description:</label><input type="text" name="comments" title="Any user-written notes"/></div>');
|
||||
imageForm.append(imageName, selectable, imageType, architecture, osName, osVersion, profile, provisionMethod, comments);
|
||||
|
||||
// Fill in image attributes
|
||||
@ -504,6 +532,27 @@ function editImageDialog(iName, iSelectable, iOsVersion, iOsArch, iOsName, iType
|
||||
if (iSelectable == "yes")
|
||||
imageForm.find('input[name="selectable"]').attr('checked', 'checked');
|
||||
|
||||
// Generate tooltips
|
||||
imageForm.find('div input[title],textarea[title],select[title]').tooltip({
|
||||
position: "center right",
|
||||
offset: [-2, 10],
|
||||
effect: "toggle",
|
||||
opacity: 0.8,
|
||||
delay: 0,
|
||||
predelay: 800,
|
||||
events: {
|
||||
def: "mouseover,mouseout",
|
||||
input: "mouseover,mouseout",
|
||||
widget: "focus mouseover,blur mouseout",
|
||||
tooltip: "mouseover,mouseout"
|
||||
},
|
||||
|
||||
// Change z index to show tooltip in front
|
||||
onBeforeShow: function() {
|
||||
this.getTip().css('z-index', $.topZIndex());
|
||||
}
|
||||
});
|
||||
|
||||
// Open dialog to add image
|
||||
imageForm.dialog({
|
||||
title:'Edit image',
|
||||
@ -860,14 +909,35 @@ function groupDialog() {
|
||||
var info = createInfoBar('Provide the following attributes for the group.');
|
||||
groupForm.append(info);
|
||||
|
||||
var group = $('<div><label>Group:</label><input type="text" name="group"/></div>');
|
||||
var selectable = $('<div><label>Selectable:</label><input type="checkbox" name="selectable"/></div>');
|
||||
var ip = $('<div><label>IP:</label><input type="text" name="ip"/></div>');
|
||||
var hostnames = $('<div><label>Hostnames:</label><input type="text" name="hostnames"/></div>');
|
||||
var network = $('<div><label>Network:</label><input type="text" name="network"/></div>');
|
||||
var comments = $('<div><label>Description:</label><input type="text" name="comments"/></div>');
|
||||
var group = $('<div><label>Group:</label><input type="text" name="group" title="The group name"/></div>');
|
||||
var selectable = $('<div><label>Selectable:</label><input type="checkbox" name="selectable" title="Select if you want this group to appear on the self service portal"/></div>');
|
||||
var ip = $('<div><label>IP:</label><input type="text" name="ip" title="The IP address of the nodes, usually given as a regular expression, e.g. |ihost(\d+)|10.1.1.($1+0)|"/></div>');
|
||||
var hostnames = $('<div><label>Hostnames:</label><input type="text" name="hostnames" title="The hostname of the nodes, usually given as a regular expression, e.g. |(.*)|($1).sourceforge.net|"/></div>');
|
||||
var network = $('<div><label>Network:</label><input type="text" name="network" title="The groups network and its subnet mask, e.g. 10.1.1.0/24"/></div>');
|
||||
var comments = $('<div><label>Description:</label><input type="text" name="comments" title="A description of the group"/></div>');
|
||||
groupForm.append(group, selectable, ip, hostnames, network, comments);
|
||||
|
||||
// Generate tooltips
|
||||
groupForm.find('div input[title],textarea[title],select[title]').tooltip({
|
||||
position: "center right",
|
||||
offset: [-2, 10],
|
||||
effect: "fade",
|
||||
opacity: 0.8,
|
||||
delay: 0,
|
||||
predelay: 800,
|
||||
events: {
|
||||
def: "mouseover,mouseout",
|
||||
input: "mouseover,mouseout",
|
||||
widget: "focus mouseover,blur mouseout",
|
||||
tooltip: "mouseover,mouseout"
|
||||
},
|
||||
|
||||
// Change z index to show tooltip in front
|
||||
onBeforeShow: function() {
|
||||
this.getTip().css('z-index', $.topZIndex());
|
||||
}
|
||||
});
|
||||
|
||||
// Open dialog to add image
|
||||
groupForm.dialog({
|
||||
title:'Create group',
|
||||
@ -956,19 +1026,19 @@ function groupDialog() {
|
||||
*/
|
||||
function editGroupDialog(iGroup, iSelectable, iIp, iHostnames, iNetwork, iComments) {
|
||||
// Create form to add profile
|
||||
var dialogId = 'createGroup';
|
||||
var dialogId = 'createGroup-' + iGroup;
|
||||
var groupForm = $('<div id="' + dialogId + '" class="form"></div>');
|
||||
|
||||
// Create info bar
|
||||
var info = createInfoBar('Provide the following attributes for the group.');
|
||||
groupForm.append(info);
|
||||
|
||||
var group = $('<div><label>Group:</label><input type="text" name="group"/></div>');
|
||||
var selectable = $('<div><label>Selectable:</label><input type="checkbox" name="selectable"/></div>');
|
||||
var ip = $('<div><label>IP:</label><input type="text" name="ip"/></div>');
|
||||
var hostnames = $('<div><label>Hostnames:</label><input type="text" name="hostnames"/></div>');
|
||||
var network = $('<div><label>Network:</label><input type="text" name="network"/></div>');
|
||||
var comments = $('<div><label>Description:</label><input type="text" name="comments"/></div>');
|
||||
var group = $('<div><label>Group:</label><input type="text" name="group" title="The group name"/></div>');
|
||||
var selectable = $('<div><label>Selectable:</label><input type="checkbox" name="selectable" title="Select if you want this group to appear on the self service portal"/></div>');
|
||||
var ip = $('<div><label>IP:</label><input type="text" name="ip" title="The IP address for the group, usually given as a regular expression, e.g. |ihost(\d+)|10.1.1.($1+0)|"/></div>');
|
||||
var hostnames = $('<div><label>Hostnames:</label><input type="text" name="hostnames" title="The hostname for the group, usually given as a regular expression, e.g. |(.*)|($1).sourceforge.net|"/></div>');
|
||||
var network = $('<div><label>Network:</label><input type="text" name="network" title="The groups network and its subnet mask, e.g. 10.1.1.0/24"/></div>');
|
||||
var comments = $('<div><label>Description:</label><input type="text" name="comments" title="A description of the group"/></div>');
|
||||
groupForm.append(group, selectable, ip, hostnames, network, comments);
|
||||
|
||||
// Fill in group attributes
|
||||
@ -980,6 +1050,27 @@ function editGroupDialog(iGroup, iSelectable, iIp, iHostnames, iNetwork, iCommen
|
||||
if (iSelectable == "yes")
|
||||
groupForm.find('input[name="selectable"]').attr('checked', 'checked');
|
||||
|
||||
// Generate tooltips
|
||||
groupForm.find('div input[title],textarea[title],select[title]').tooltip({
|
||||
position: "center right",
|
||||
offset: [-2, 10],
|
||||
effect: "toggle",
|
||||
opacity: 0.8,
|
||||
delay: 0,
|
||||
predelay: 800,
|
||||
events: {
|
||||
def: "mouseover,mouseout",
|
||||
input: "mouseover,mouseout",
|
||||
widget: "focus mouseover,blur mouseout",
|
||||
tooltip: "mouseover,mouseout"
|
||||
},
|
||||
|
||||
// Change z index to show tooltip in front
|
||||
onBeforeShow: function() {
|
||||
this.getTip().css('z-index', $.topZIndex());
|
||||
}
|
||||
});
|
||||
|
||||
// Open dialog to add image
|
||||
groupForm.dialog({
|
||||
title:'Edit group',
|
||||
|
@ -224,15 +224,15 @@ function openCreateUserDialog(data) {
|
||||
|
||||
createUserForm.append(info, userFS, optionFS);
|
||||
|
||||
userAttr.append($('<div><label>Priority:</label><input type="text" name="priority" disabled="disabled" value="' + priority + '"/></div>'));
|
||||
userAttr.append($('<div><label>User name:</label><input type="text" name="name"/></div>'));
|
||||
userAttr.append($('<div><label>Password:</label><input name="password" type="password"></div>'));
|
||||
userAttr.append($('<div><label>Confirm password:</label><input name="confirm_password" type="password"></div>'));
|
||||
optionAttr.append($('<div><label>Host:</label><input type="text" name="host"/></div>'));
|
||||
optionAttr.append($('<div><label>Commands:</label><input type="text" name="commands"/></div>'));
|
||||
optionAttr.append($('<div><label>Parameters:</label><input type="text" name="parameters"/></div>'));
|
||||
optionAttr.append($('<div><label>Node Range:</label><input type="text" name="nodeRange"/></div>'));
|
||||
optionAttr.append($('<div><label>Rule:</label><select name="rule">' +
|
||||
userAttr.append($('<div><label>Priority:</label><input type="text" name="priority" disabled="disabled" value="' + priority + '" title="The priority value for this user"/></div>'));
|
||||
userAttr.append($('<div><label>User name:</label><input type="text" name="name" title="The user name to log into xCAT with"/></div>'));
|
||||
userAttr.append($('<div><label>Password:</label><input name="password" type="password" title="The user password that will be used to log into xCAT"></div>'));
|
||||
userAttr.append($('<div><label>Confirm password:</label><input name="confirm_password" type="password" title="The user password that will be used to log into xCAT"></div>'));
|
||||
optionAttr.append($('<div><label>Host:</label><input type="text" name="host" title="The host from which users may issue the commands specified by this rule. By default, it is all hosts."/></div>'));
|
||||
optionAttr.append($('<div><label>Commands:</label><input type="text" name="commands" title="The list of commands that this rule applies to. By default, it is all commands."/></div>'));
|
||||
optionAttr.append($('<div><label>Parameters:</label><input type="text" name="parameters" title="A regular expression that matches the command parameters (everything except the noderange) that this rule applies to. By default, it is all parameters."/></div>'));
|
||||
optionAttr.append($('<div><label>Node Range:</label><input type="text" name="nodeRange" title="The node range that this rule applies to. By default, it is all nodes."/></div>'));
|
||||
optionAttr.append($('<div><label>Rule:</label><select name="rule" title="Specifies how this rule should be applied. Valid values are: allow, accept, trusted, and deny.">' +
|
||||
'<option value="allow">Allow</option>' +
|
||||
'<option value="accept">Accept</option>' +
|
||||
'<option value="trusted">Trusted</option>' +
|
||||
@ -243,12 +243,33 @@ function openCreateUserDialog(data) {
|
||||
optionAttr.append(rootPrivilege);
|
||||
rootPrivilege.append(accessCheckbox);
|
||||
|
||||
optionAttr.append($('<div><label>Comments:</label><input type="text" name="comments" style="width: 250px;"/></div>'));
|
||||
optionAttr.append($('<div><label>Disable:</label><select name="disable">' +
|
||||
optionAttr.append($('<div><label>Comments:</label><input type="text" name="comments" style="width: 250px;" title="Any user written notes"/></div>'));
|
||||
optionAttr.append($('<div><label>Disable:</label><select name="disable" title="Set to yes to disable the user">' +
|
||||
'<option value="">No</option>' +
|
||||
'<option value="yes">Yes</option>' +
|
||||
'</select></div>'));
|
||||
|
||||
// Generate tooltips
|
||||
createUserForm.find('div input[title],select[title]').tooltip({
|
||||
position: "center right",
|
||||
offset: [-2, 10],
|
||||
effect: "fade",
|
||||
opacity: 0.8,
|
||||
delay: 0,
|
||||
predelay: 800,
|
||||
events: {
|
||||
def: "mouseover,mouseout",
|
||||
input: "mouseover,mouseout",
|
||||
widget: "focus mouseover,blur mouseout",
|
||||
tooltip: "mouseover,mouseout"
|
||||
},
|
||||
|
||||
// Change z index to show tooltip in front
|
||||
onBeforeShow: function() {
|
||||
this.getTip().css('z-index', $.topZIndex());
|
||||
}
|
||||
});
|
||||
|
||||
// Open dialog to add disk
|
||||
createUserForm.dialog({
|
||||
title:'Configure user',
|
||||
@ -323,7 +344,7 @@ function openCreateUserDialog(data) {
|
||||
data : {
|
||||
cmd : 'webrun',
|
||||
tgt : '',
|
||||
args : 'policy|' + priority + '|' + args,
|
||||
args : 'policy||' + priority + '||' + args,
|
||||
msg : dialogId
|
||||
},
|
||||
|
||||
@ -337,7 +358,7 @@ function openCreateUserDialog(data) {
|
||||
data : {
|
||||
cmd : 'webrun',
|
||||
tgt : '',
|
||||
args : 'passwd|' + usrName + '|' + password,
|
||||
args : 'passwd||' + usrName + '||' + password,
|
||||
msg : dialogId
|
||||
},
|
||||
|
||||
@ -455,7 +476,7 @@ function openDeleteUserDialog(users) {
|
||||
data : {
|
||||
cmd : 'webrun',
|
||||
tgt : '',
|
||||
args : 'deleteuser|' + users,
|
||||
args : 'deleteuser||' + users,
|
||||
msg : dialogId
|
||||
},
|
||||
success : updatePanel
|
||||
|
@ -70,6 +70,15 @@ esxPlugin.prototype.loadConfigPage = function(tabId) {
|
||||
profileLnk.trigger('click');
|
||||
};
|
||||
|
||||
/**
|
||||
* Migrate node
|
||||
*
|
||||
* @param node Node to migrate
|
||||
*/
|
||||
esxPlugin.prototype.loadMigratePage = function(node) {
|
||||
openDialog('info', 'Not yet supported');
|
||||
};
|
||||
|
||||
/**
|
||||
* Clone node (service page)
|
||||
*
|
||||
|
@ -68,6 +68,15 @@ kvmPlugin.prototype.loadConfigPage = function(tabId) {
|
||||
profileLnk.trigger('click');
|
||||
};
|
||||
|
||||
/**
|
||||
* Migrate node
|
||||
*
|
||||
* @param node Node to migrate
|
||||
*/
|
||||
kvmPlugin.prototype.loadMigratePage = function(node) {
|
||||
openDialog('info', 'Not yet supported');
|
||||
};
|
||||
|
||||
/**
|
||||
* Clone node (service page)
|
||||
*
|
||||
|
@ -149,7 +149,7 @@ zvmPlugin.prototype.loadServiceProvisionPage = function(tabId) {
|
||||
loadOSImages(imageCol);
|
||||
|
||||
// Get zVM host names
|
||||
if (!$.cookie('zvm')){
|
||||
if (!$.cookie('zvms')){
|
||||
$.ajax( {
|
||||
url : 'lib/srv_cmd.php',
|
||||
dataType : 'json',
|
||||
@ -516,8 +516,8 @@ zvmPlugin.prototype.loadServiceInventory = function(data) {
|
||||
var nicVDev, nicType, nicPortName, nicNumOfDevs, nicLanName;
|
||||
|
||||
// Loop through each NIC (Data contained in 2 lines)
|
||||
for (l = 0; l < attrs[keys[k]].length; l = l + 2) {
|
||||
if (attrs[keys[k]][l]) {
|
||||
for (l = 0; l < attrs[keys[k]].length; l++) {
|
||||
if (attrs[keys[k]][l].indexOf('Adapter') != -1) {
|
||||
args = attrs[keys[k]][l].split(' ');
|
||||
|
||||
// Get NIC virtual device, type, port name, and number of devices
|
||||
@ -953,6 +953,8 @@ zvmPlugin.prototype.loadInventory = function(data) {
|
||||
var tabId = args[0].replace('out=', '');
|
||||
// Get node
|
||||
var node = args[1].replace('node=', '');
|
||||
// Clear any existing cookie
|
||||
$.cookie(node + 'processes', null);
|
||||
|
||||
// Remove loader
|
||||
$('#' + tabId).find('img').remove();
|
||||
@ -1528,8 +1530,8 @@ zvmPlugin.prototype.loadInventory = function(data) {
|
||||
var nicVDev, nicType, nicPortName, nicNumOfDevs, nicLanName;
|
||||
|
||||
// Loop through each NIC (Data contained in 2 lines)
|
||||
for (l = 0; l < attrs[keys[k]].length; l = l + 2) {
|
||||
if (attrs[keys[k]][l]) {
|
||||
for (l = 0; l < attrs[keys[k]].length; l++) {
|
||||
if (attrs[keys[k]][l].indexOf('Adapter') != -1) {
|
||||
args = attrs[keys[k]][l].split(' ');
|
||||
|
||||
// Get NIC virtual device, type, port name, and number of devices
|
||||
@ -1864,20 +1866,20 @@ zvmPlugin.prototype.addNode = function() {
|
||||
// Create provision type drop down
|
||||
var type = $('<div></div>');
|
||||
var typeLabel = $('<label>Type:</label>');
|
||||
var typeSelect = $('<select type="text" name="type"></select>');
|
||||
var typeSelect = $('<select type="text" name="type" title="The type of node"></select>');
|
||||
typeSelect.append('<option value="vm" selected="selected">VM</option>');
|
||||
typeSelect.append('<option value="host">Host</option>');
|
||||
type.append(typeLabel);
|
||||
type.append(typeSelect);
|
||||
addNodeForm.append(type);
|
||||
|
||||
addNodeForm.append('<div><label>Node range *:</label><input type="text" name="node"/></div>');
|
||||
addNodeForm.append('<div><label>User ID range *:</label><input type="text" name="userId"/></div>');
|
||||
addNodeForm.append('<div><label>zHCP *:</label><input type="text" name="hcp"/></div>');
|
||||
addNodeForm.append('<div><label>Groups *:</label><input type="text" name="groups"/></div>');
|
||||
addNodeForm.append('<div><label>Operating system *:</label><input type="text" name="os"/></div>');
|
||||
addNodeForm.append('<div><label>IP address range:</label><input name="ip" type="text"></div>');
|
||||
addNodeForm.append('<div><label>Hostname range:</label><input name="hostname" type="text"></div>');
|
||||
addNodeForm.append('<div><label>Node range *:</label><input type="text" name="node" title="The node or node range to add into xCAT. A node range must be given as: node1-node9 or node[1-9]."/></div>');
|
||||
addNodeForm.append('<div><label>User ID range *:</label><input type="text" name="userId" title="The user ID or a user ID range. A user ID range must be given as: user1-user9 or user[1-9]."/></div>');
|
||||
addNodeForm.append('<div><label>zHCP *:</label><input type="text" name="hcp" title="The System z hardware control point (zHCP) responsible for managing the node(s)"/></div>');
|
||||
addNodeForm.append('<div><label>Groups *:</label><input type="text" name="groups" title="The group where the new node(s) will be placed under"/></div>');
|
||||
addNodeForm.append('<div><label>Operating system *:</label><input type="text" name="os" title="The z/VM operating system version, e.g. zvm6.1."/></div>');
|
||||
addNodeForm.append('<div><label>IP address range:</label><input name="ip" type="text" title="The IP address range for the node(s). An IP address range must be given in the following format: 192.168.0.1-192.168.9."></div>');
|
||||
addNodeForm.append('<div><label>Hostname range:</label><input name="hostname" type="text" title="The hostname range for the node(s). A hostname range must be given in the following format: ihost1.sourceforge.net-ihost9.sourceforge.net."></div>');
|
||||
addNodeForm.append('<div><label>* required</label></div>');
|
||||
|
||||
// OS field only required for hosts
|
||||
@ -1895,6 +1897,27 @@ zvmPlugin.prototype.addNode = function() {
|
||||
}
|
||||
});
|
||||
|
||||
// Generate tooltips
|
||||
addNodeForm.find('div input[title],select[title]').tooltip({
|
||||
position: "center right",
|
||||
offset: [-2, 10],
|
||||
effect: "fade",
|
||||
opacity: 0.8,
|
||||
delay: 0,
|
||||
predelay: 800,
|
||||
events: {
|
||||
def: "mouseover,mouseout",
|
||||
input: "mouseover,mouseout",
|
||||
widget: "focus mouseover,blur mouseout",
|
||||
tooltip: "mouseover,mouseout"
|
||||
},
|
||||
|
||||
// Change z index to show tooltip in front
|
||||
onBeforeShow: function() {
|
||||
this.getTip().css('z-index', $.topZIndex());
|
||||
}
|
||||
});
|
||||
|
||||
// Open form as a dialog
|
||||
addNodeForm.dialog({
|
||||
title: 'Add node',
|
||||
@ -2211,7 +2234,7 @@ zvmPlugin.prototype.loadMigratePage = function(tgtNode) {
|
||||
var hcp = new Object();
|
||||
|
||||
// Create a drop-down for z/VM destinations
|
||||
var destSelect = $('<select name="dest"></select>')
|
||||
var destSelect = $('<select name="dest" title="The z/VM SSI cluster name of the destination system to which the specified virtual machine will be relocated."></select>')
|
||||
destSelect.append($('<option></option>'));
|
||||
for (var i in hosts) {
|
||||
args = hosts[i].split(':');
|
||||
@ -2279,7 +2302,12 @@ zvmPlugin.prototype.loadMigratePage = function(tgtNode) {
|
||||
vmAttr.append(dest);
|
||||
|
||||
// Action Parameter
|
||||
var actionparam = $('<div><label>Action:</label><select name="action"><option value=""></option><option value="MOVE">Move</option><option value="TEST">Test</option><option value="CANCEL">Cancel</option></select></div>');
|
||||
var actionparam = $('<div><label>Action:</label><select name="action" title="Initiate a VMRELOCATE of the virtual machine. Test the specified virtual machine and determine if it is eligible to be relocated. Stop the relocation of the specified virtual machine.">' +
|
||||
'<option value=""></option>' +
|
||||
'<option value="MOVE">Move</option>' +
|
||||
'<option value="TEST">Test</option>' +
|
||||
'<option value="CANCEL">Cancel</option>' +
|
||||
'</select></div>');
|
||||
vmAttr.append(actionparam);
|
||||
|
||||
// Parameters label
|
||||
@ -2291,7 +2319,10 @@ zvmPlugin.prototype.loadMigratePage = function(tgtNode) {
|
||||
optionalFS.append(optAttr);
|
||||
|
||||
// Immediate Parameter
|
||||
var immediateparam = $('<div><label>Immediate:</label><select name="immediate"><option value="NO">No (default)</option><option value="YES">Yes</option></select></div>');
|
||||
var immediateparam = $('<div><label>Immediate:</label><select name="immediate" title="Select No to specify immediate processing (default). Select Yes to specify the VMRELOCATE command will do one early pass through virtual machine storage and then go directly to the quiesce stage. The defaults for both max_total and max_quiesce are NOLIMIT when immediate=YES is specified.">' +
|
||||
'<option value="NO">No (default)</option>' +
|
||||
'<option value="YES">Yes</option>' +
|
||||
'</select></div>');
|
||||
optAttr.append(immediateparam);
|
||||
immediateparam.change(function() {
|
||||
if ($('#' + newTabId + ' select[name=immediate]').val() == 'yes') {
|
||||
@ -2314,7 +2345,7 @@ zvmPlugin.prototype.loadMigratePage = function(tgtNode) {
|
||||
optAttr.append(forceParam);
|
||||
|
||||
// Generate tooltips
|
||||
migrateForm.find('div input[title]').tooltip({
|
||||
migrateForm.find('div input[title],select[title]').tooltip({
|
||||
position: "center right",
|
||||
offset: [-2, 10],
|
||||
effect: "fade",
|
||||
@ -2394,18 +2425,16 @@ zvmPlugin.prototype.loadMigratePage = function(tgtNode) {
|
||||
if (maxQuiesce.val() <= 0) {
|
||||
args = args + "max_quiesce=NOLIMIT;";
|
||||
} else {
|
||||
args = args + "'max_quiesce=" + maxQuiesce.val() + "';";
|
||||
args = args + "max_quiesce=" + maxQuiesce.val() + ";";
|
||||
}
|
||||
|
||||
// Append force argument
|
||||
if ($("input[name=force]:checked").length > 0) {
|
||||
args = args + "'force="
|
||||
$("input[name=force]:checked").each(function() {
|
||||
args = args + $(this).val() + ' ';
|
||||
args += $(this).val() + ' ';
|
||||
});
|
||||
args = args + "';";
|
||||
} else {
|
||||
args = args + ";";
|
||||
args += "';";
|
||||
}
|
||||
|
||||
var statBarId = 'migrateStatusBar' + inst;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -418,24 +418,24 @@ function mkAddNodeLink() {
|
||||
|
||||
var plugin;
|
||||
switch(mgt) {
|
||||
case "kvm":
|
||||
plugin = new kvmPlugin();
|
||||
break;
|
||||
case "esx":
|
||||
plugin = new esxPlugin();
|
||||
break;
|
||||
case "blade":
|
||||
plugin = new bladePlugin();
|
||||
break;
|
||||
case "hmc":
|
||||
plugin = new hmcPlugin();
|
||||
break;
|
||||
case "ipmi":
|
||||
plugin = new ipmiPlugin();
|
||||
break;
|
||||
case "zvm":
|
||||
plugin = new zvmPlugin();
|
||||
break;
|
||||
case "kvm":
|
||||
plugin = new kvmPlugin();
|
||||
break;
|
||||
case "esx":
|
||||
plugin = new esxPlugin();
|
||||
break;
|
||||
case "blade":
|
||||
plugin = new bladePlugin();
|
||||
break;
|
||||
case "hmc":
|
||||
plugin = new hmcPlugin();
|
||||
break;
|
||||
case "ipmi":
|
||||
plugin = new ipmiPlugin();
|
||||
break;
|
||||
case "zvm":
|
||||
plugin = new zvmPlugin();
|
||||
break;
|
||||
}
|
||||
|
||||
plugin.addNode();
|
||||
@ -686,24 +686,15 @@ function loadNodes(data) {
|
||||
// Create an instance of the plugin
|
||||
var plugin;
|
||||
switch(mgt) {
|
||||
case "blade":
|
||||
plugin = new bladePlugin();
|
||||
break;
|
||||
case "fsp":
|
||||
plugin = new fspPlugin();
|
||||
break;
|
||||
case "hmc":
|
||||
plugin = new hmcPlugin();
|
||||
break;
|
||||
case "ipmi":
|
||||
plugin = new ipmiPlugin();
|
||||
break;
|
||||
case "ivm":
|
||||
plugin = new ivmPlugin();
|
||||
break;
|
||||
case "zvm":
|
||||
plugin = new zvmPlugin();
|
||||
break;
|
||||
case "kvm":
|
||||
plugin = new kvmPlugin();
|
||||
break;
|
||||
case "esx":
|
||||
plugin = new esxPlugin();
|
||||
break;
|
||||
case "zvm":
|
||||
plugin = new zvmPlugin();
|
||||
break;
|
||||
}
|
||||
|
||||
plugin.loadClonePage(tgtNodes[i]);
|
||||
@ -741,34 +732,35 @@ function loadNodes(data) {
|
||||
var migrateLnk = $('<a>Migrate</a>');
|
||||
migrateLnk.click(function() {
|
||||
var tgtNodes = getNodesChecked(nodesTableId).split(',');
|
||||
var mgt = "", tmp = "";
|
||||
for (var i in tgtNodes) {
|
||||
var mgt = getNodeAttr(tgtNodes[i], 'mgt');
|
||||
|
||||
// Create an instance of the plugin
|
||||
var plugin;
|
||||
switch(mgt) {
|
||||
case "blade":
|
||||
plugin = new bladePlugin();
|
||||
break;
|
||||
case "fsp":
|
||||
plugin = new fspPlugin();
|
||||
break;
|
||||
case "hmc":
|
||||
plugin = new hmcPlugin();
|
||||
break;
|
||||
case "ipmi":
|
||||
plugin = new ipmiPlugin();
|
||||
break;
|
||||
case "ivm":
|
||||
plugin = new ivmPlugin();
|
||||
break;
|
||||
case "zvm":
|
||||
plugin = new zvmPlugin();
|
||||
break;
|
||||
tmp = getNodeAttr(tgtNodes[i], 'mgt');
|
||||
if (!mgt) {
|
||||
mgt = tmp
|
||||
} else {
|
||||
if (tmp != mgt) {
|
||||
openDialog('warn', "You can pick only one type (mgt) of node to migrate!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
plugin.loadMigratePage(tgtNodes[i]);
|
||||
}
|
||||
|
||||
// Create an instance of the plugin
|
||||
var plugin;
|
||||
switch(mgt) {
|
||||
// Only hypervisors support migration
|
||||
case "kvm":
|
||||
plugin = new kvmPlugin();
|
||||
break;
|
||||
case "esx":
|
||||
plugin = new esxPlugin();
|
||||
break;
|
||||
case "zvm":
|
||||
plugin = new zvmPlugin();
|
||||
break;
|
||||
}
|
||||
|
||||
plugin.loadMigratePage(tgtNodes);
|
||||
});
|
||||
|
||||
// Update
|
||||
@ -854,24 +846,24 @@ function loadNodes(data) {
|
||||
// Create an instance of the plugin
|
||||
var plugin;
|
||||
switch(mgt) {
|
||||
case "blade":
|
||||
plugin = new bladePlugin();
|
||||
break;
|
||||
case "fsp":
|
||||
plugin = new fspPlugin();
|
||||
break;
|
||||
case "hmc":
|
||||
plugin = new hmcPlugin();
|
||||
break;
|
||||
case "ipmi":
|
||||
plugin = new ipmiPlugin();
|
||||
break;
|
||||
case "ivm":
|
||||
plugin = new ivmPlugin();
|
||||
break;
|
||||
case "zvm":
|
||||
plugin = new zvmPlugin();
|
||||
break;
|
||||
case "kvm":
|
||||
plugin = new kvmPlugin();
|
||||
break;
|
||||
case "esx":
|
||||
plugin = new esxPlugin();
|
||||
break;
|
||||
case "blade":
|
||||
plugin = new bladePlugin();
|
||||
break;
|
||||
case "hmc":
|
||||
plugin = new hmcPlugin();
|
||||
break;
|
||||
case "ipmi":
|
||||
plugin = new ipmiPlugin();
|
||||
break;
|
||||
case "zvm":
|
||||
plugin = new zvmPlugin();
|
||||
break;
|
||||
}
|
||||
|
||||
plugin.loadLogPage(tgtNodes[i]);
|
||||
@ -1635,24 +1627,24 @@ function loadNode(e) {
|
||||
// Create an instance of the plugin
|
||||
var plugin;
|
||||
switch(mgt) {
|
||||
case "blade":
|
||||
plugin = new bladePlugin();
|
||||
break;
|
||||
case "fsp":
|
||||
plugin = new fspPlugin();
|
||||
break;
|
||||
case "hmc":
|
||||
plugin = new hmcPlugin();
|
||||
break;
|
||||
case "ipmi":
|
||||
plugin = new ipmiPlugin();
|
||||
break;
|
||||
case "ivm":
|
||||
plugin = new ivmPlugin();
|
||||
break;
|
||||
case "zvm":
|
||||
plugin = new zvmPlugin();
|
||||
break;
|
||||
case "kvm":
|
||||
plugin = new kvmPlugin();
|
||||
break;
|
||||
case "esx":
|
||||
plugin = new esxPlugin();
|
||||
break;
|
||||
case "blade":
|
||||
plugin = new bladePlugin();
|
||||
break;
|
||||
case "hmc":
|
||||
plugin = new hmcPlugin();
|
||||
break;
|
||||
case "ipmi":
|
||||
plugin = new ipmiPlugin();
|
||||
break;
|
||||
case "zvm":
|
||||
plugin = new zvmPlugin();
|
||||
break;
|
||||
}
|
||||
|
||||
// Get tab area where a new tab will be inserted
|
||||
@ -1864,8 +1856,12 @@ function loadScriptPage(tgtNodes) {
|
||||
upload.append(label, file, subBtn);
|
||||
scriptAttr.append(upload);
|
||||
|
||||
// Script
|
||||
var script = $('<div><label>Script:</label><textarea title="The code to run against the node range"/>');
|
||||
scriptAttr.append(script);
|
||||
|
||||
// Generate tooltips
|
||||
scriptForm.find('div input[title]').tooltip({
|
||||
scriptForm.find('div input[title],textarea').tooltip({
|
||||
position: "center right",
|
||||
offset: [-2, 10],
|
||||
effect: "fade",
|
||||
@ -1879,10 +1875,6 @@ function loadScriptPage(tgtNodes) {
|
||||
}
|
||||
});
|
||||
|
||||
// Script
|
||||
var script = $('<div><label>Script:</label><textarea/>');
|
||||
scriptAttr.append(script);
|
||||
|
||||
// Ajax form options
|
||||
var options = {
|
||||
// Output to text area
|
||||
@ -2958,7 +2950,7 @@ function openSetAttrsDialog() {
|
||||
$(this).remove();
|
||||
},
|
||||
height: 400,
|
||||
width: 700,
|
||||
width: 800,
|
||||
buttons: {
|
||||
"Save": function() {
|
||||
// Remove any warning messages
|
||||
@ -3284,7 +3276,6 @@ function advancedLoad(group){
|
||||
|
||||
success : function(data) {
|
||||
setzVMCookies(data);
|
||||
loadWwpns();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ function loadNodesetPage(tgtNodes) {
|
||||
// Create boot method drop down
|
||||
var method = $('<div></div>');
|
||||
var methodLabel = $('<label>Boot method:</label>');
|
||||
var methodSelect = $('<select id="bootMethod" name="bootMethod"></select>');
|
||||
var methodSelect = $('<select id="bootMethod" name="bootMethod" title="The method for node deployment"></select>');
|
||||
methodSelect.append('<option value="boot">boot</option>'
|
||||
+ '<option value="install">install</option>'
|
||||
+ '<option value="iscsiboot">iscsiboot</option>'
|
||||
@ -86,7 +86,7 @@ function loadNodesetPage(tgtNodes) {
|
||||
// Create boot type drop down
|
||||
var type = $('<div></div>');
|
||||
var typeLabel = $('<label>Boot type:</label>');
|
||||
var typeSelect = $('<select id="bootType" name="bootType"></select>');
|
||||
var typeSelect = $('<select id="bootType" name="bootType" title="The type of network booting to use for this node"></select>');
|
||||
typeSelect.append('<option value="zvm">zvm</option>'
|
||||
+ '<option value="install">pxe</option>'
|
||||
+ '<option value="iscsiboot">yaboot</option>'
|
||||
@ -147,7 +147,7 @@ function loadNodesetPage(tgtNodes) {
|
||||
imageAttr.append(profile);
|
||||
|
||||
// Generate tooltips
|
||||
nodesetForm.find('div input[title]').tooltip({
|
||||
nodesetForm.find('div input[title],select').tooltip({
|
||||
position: "center right",
|
||||
offset: [-2, 10],
|
||||
effect: "fade",
|
||||
|
@ -364,17 +364,32 @@ function openAddImageDialog() {
|
||||
|
||||
// Create info bar
|
||||
var info = createInfoBar('Provide the following attributes for the image. The image name will be generated based on the attributes you will give.');
|
||||
addImageForm.append(info);
|
||||
|
||||
var imageFS = $('<fieldset></fieldset>');
|
||||
var imageLegend = $('<legend>Image</legend>');
|
||||
imageFS.append(imageLegend);
|
||||
var imageAttr = $('<div style="display: inline-table; vertical-align: middle;"></div>');
|
||||
imageFS.append($('<div style="display: inline-table; vertical-align: middle;"><img src="images/provision/operating_system.png"></img></div>'));
|
||||
imageFS.append(imageAttr);
|
||||
|
||||
var optionFS = $('<fieldset></fieldset>');
|
||||
var optionLegend = $('<legend>Options</legend>');
|
||||
optionFS.append(optionLegend);
|
||||
var optionAttr = $('<div style="display: inline-table; vertical-align: middle;"></div>');
|
||||
optionFS.append($('<div style="display: inline-table; vertical-align: middle;"><img src="images/provision/setting.png" style="width: 70px;"></img></div>'));
|
||||
optionFS.append(optionAttr);
|
||||
|
||||
addImageForm.append(info, imageFS, optionFS);
|
||||
|
||||
// Create inputs for image attributes
|
||||
var imageName = $('<div><label>Image name:</label><input type="text" name="imagename" disabled="disabled"/></div>');
|
||||
var imageType = $('<div><label>Image type:</label><input type="text" name="imagetype"/></div>');
|
||||
var architecture = $('<div><label>OS architecture:</label><input type="text" name="osarch"/></div>');
|
||||
var osName = $('<div><label>OS name:</label><input type="text" name="osname"/></div>');
|
||||
var osVersion = $('<div><label>OS version:</label><input type="text" name="osvers"/></div>');
|
||||
var profile = $('<div><label>Profile:</label><input type="text" name="profile"/></div>');
|
||||
var imageName = $('<div><label>Image name:</label><input type="text" name="imagename" disabled="disabled" title="The name of this xCAT OS image definition"/></div>');
|
||||
var imageType = $('<div><label>Image type:</label><input type="text" name="imagetype" value="linux" title="The type of operating system image this definition represents"/></div>');
|
||||
var architecture = $('<div><label>OS architecture:</label><input type="text" name="osarch" title="The hardware architecture of this image. Valid values: x86_64, x86, ia64, ppc64, and s390x."/></div>');
|
||||
var osName = $('<div><label>OS name:</label><input type="text" name="osname" value="Linux" title="Operating system name"/></div>');
|
||||
var osVersion = $('<div><label>OS version:</label><input type="text" name="osvers" title="The operating system deployed on this node. Valid values: rhel*, centos*, fedora*, sles* (where * is the version #)."/></div>');
|
||||
var profile = $('<div><label>Profile:</label><input type="text" name="profile" title="The node usage category"/></div>');
|
||||
var provisionMethod = $('<div><label>Provision method:</label></div>');
|
||||
var provisionSelect = $('<select name="provmethod">'
|
||||
var provisionSelect = $('<select name="provmethod" title="The provisioning method for node deployment">'
|
||||
+ '<option value=""></option>'
|
||||
+ '<option value="install">install</option>'
|
||||
+ '<option value="netboot">netboot</option>'
|
||||
@ -383,32 +398,8 @@ function openAddImageDialog() {
|
||||
provisionMethod.append(provisionSelect);
|
||||
|
||||
// Create inputs for optional attributes
|
||||
var exList = $('<div><label>Exclusion list:</label></div>');
|
||||
var exListInput = $('<input type="text" name="exlist"/>');
|
||||
exList.append(exListInput);
|
||||
exListInput.serverBrowser({
|
||||
onSelect : function(path) {
|
||||
$('#addImage input[name="exlist"]').val(path);
|
||||
},
|
||||
onLoad : function() {
|
||||
return $('#addImage input[name="exlist"]').val();
|
||||
},
|
||||
knownPaths : [{
|
||||
text : 'Install',
|
||||
image : 'desktop.png',
|
||||
path : '/install'
|
||||
}],
|
||||
imageUrl : 'images/serverbrowser/',
|
||||
systemImageUrl : 'images/serverbrowser/',
|
||||
handlerUrl : 'lib/getpath.php',
|
||||
title : 'Browse',
|
||||
requestMethod : 'POST',
|
||||
width : '500',
|
||||
height : '300',
|
||||
basePath : '/install' // Limit user to only install directory
|
||||
});
|
||||
var otherpkgDirectory = $('<div><label>Other package directory:</label></div>');
|
||||
var otherpkgDirectoryInput = $('<input type="text" name="otherpkgdir"/>');
|
||||
var otherpkgDirectoryInput = $('<input type="text" name="otherpkgdir" title="The base directory where the non-distro packages are stored"/>');
|
||||
otherpkgDirectory.append(otherpkgDirectoryInput);
|
||||
otherpkgDirectoryInput.serverBrowser({
|
||||
onSelect : function(path) {
|
||||
@ -432,7 +423,7 @@ function openAddImageDialog() {
|
||||
basePath : '/install' // Limit user to only install directory
|
||||
});
|
||||
var packageDirectory = $('<div><label>Package directory:</label></div>');
|
||||
var packageDirectoryInput = $('<input type="text" name="pkgdir"/>');
|
||||
var packageDirectoryInput = $('<input type="text" name="pkgdir" title="The name of the directory where the distro packages are stored"/>');
|
||||
packageDirectory.append(packageDirectoryInput);
|
||||
packageDirectoryInput.serverBrowser({
|
||||
onSelect : function(path) {
|
||||
@ -456,7 +447,7 @@ function openAddImageDialog() {
|
||||
basePath : '/install' // Limit user to only install directory
|
||||
});
|
||||
var packageList = $('<div><label>Package list:</label></div>');
|
||||
var packageListInput = $('<input type="text" name="pkglist"/>');
|
||||
var packageListInput = $('<input type="text" name="pkglist" title="The fully qualified name of the file that stores the distro packages list that will be included in the image"/>');
|
||||
packageList.append(packageListInput);
|
||||
packageListInput.serverBrowser({
|
||||
onSelect : function(path) {
|
||||
@ -479,32 +470,8 @@ function openAddImageDialog() {
|
||||
height : '300',
|
||||
basePath : '/install' // Limit user to only install directory
|
||||
});
|
||||
var postInstall = $('<div><label>Post install script:</label></div>');
|
||||
var postInstallInput = $('<input type="text" name="postinstall"/>');
|
||||
postInstall.append(postInstallInput);
|
||||
postInstallInput.serverBrowser({
|
||||
onSelect : function(path) {
|
||||
$('#addImage input[name="postinstall"]').val(path);
|
||||
},
|
||||
onLoad : function() {
|
||||
return $('#addImage input[name="postinstall"]').val();
|
||||
},
|
||||
knownPaths : [{
|
||||
text : 'Install',
|
||||
image : 'desktop.png',
|
||||
path : '/install'
|
||||
}],
|
||||
imageUrl : 'images/serverbrowser/',
|
||||
systemImageUrl : 'images/serverbrowser/',
|
||||
handlerUrl : 'lib/getpath.php',
|
||||
title : 'Browse',
|
||||
requestMethod : 'POST',
|
||||
width : '500',
|
||||
height : '300',
|
||||
basePath : '/install' // Limit user to only install directory
|
||||
});
|
||||
var template = $('<div><label>Template:</label></div>');
|
||||
var templateInput = $('<input type="text" name="template"/>');
|
||||
var templateInput = $('<input type="text" name="template" title="The fully qualified name of the template file that is used to create the kickstart or autoyast file for diskful installation"/>');
|
||||
template.append(templateInput);
|
||||
templateInput.serverBrowser({
|
||||
onSelect : function(path) {
|
||||
@ -528,9 +495,30 @@ function openAddImageDialog() {
|
||||
basePath : '/install' // Limit user to only install directory
|
||||
});
|
||||
|
||||
addImageForm.append(imageName, imageType, architecture, osName, osVersion, profile, provisionMethod,
|
||||
exList, otherpkgDirectory, packageDirectory, packageList, postInstall, template);
|
||||
imageAttr.append(imageName, imageType, architecture, osName, osVersion, profile, provisionMethod);
|
||||
optionAttr.append(otherpkgDirectory, packageDirectory, packageList, template);
|
||||
|
||||
// Generate tooltips
|
||||
addImageForm.find('div input[title],select[title]').tooltip({
|
||||
position: "center right",
|
||||
offset: [-2, 10],
|
||||
effect: "fade",
|
||||
opacity: 0.8,
|
||||
delay: 0,
|
||||
predelay: 800,
|
||||
events: {
|
||||
def: "mouseover,mouseout",
|
||||
input: "mouseover,mouseout",
|
||||
widget: "focus mouseover,blur mouseout",
|
||||
tooltip: "mouseover,mouseout"
|
||||
},
|
||||
|
||||
// Change z index to show tooltip in front
|
||||
onBeforeShow: function() {
|
||||
this.getTip().css('z-index', $.topZIndex());
|
||||
}
|
||||
});
|
||||
|
||||
// Open dialog to add image
|
||||
addImageForm.dialog({
|
||||
title:'Add image',
|
||||
@ -538,7 +526,8 @@ function openAddImageDialog() {
|
||||
close: function(){
|
||||
$(this).remove();
|
||||
},
|
||||
width: 400,
|
||||
beight: 400,
|
||||
width: 600,
|
||||
buttons: {
|
||||
"Ok": function(){
|
||||
// Remove any warning messages
|
||||
@ -553,11 +542,9 @@ function openAddImageDialog() {
|
||||
var provisionMethod = $(this).find('select[name="provmethod"]');
|
||||
|
||||
// Get optional image attributes
|
||||
var exList = $(this).find('input[name="exlist"]');
|
||||
var otherpkgDirectory = $(this).find('input[name="otherpkgdir"]');
|
||||
var pkgDirectory = $(this).find('input[name="pkgdir"]');
|
||||
var pkgList = $(this).find('input[name="pkglist"]');
|
||||
var postInstall = $(this).find('input[name="postinstall"]');
|
||||
var template = $(this).find('input[name="template"]');
|
||||
|
||||
// Check that image attributes are provided before continuing
|
||||
@ -595,16 +582,12 @@ function openAddImageDialog() {
|
||||
'provmethod=' + provisionMethod.val();
|
||||
|
||||
// Get optional attributes
|
||||
if (exList.val())
|
||||
args += ';exlist=' + exList.val();
|
||||
if (otherpkgDirectory.val())
|
||||
args += ';otherpkgdir=' + otherpkgDirectory.val();
|
||||
if (pkgDirectory.val())
|
||||
args += ';pkgdir=' + pkgDirectory.val();
|
||||
if (pkgList.val())
|
||||
args += ';pkglist=' + pkgList.val();
|
||||
if (postInstall.val())
|
||||
args += ';postinstall=' + postInstall.val();
|
||||
if (template.val())
|
||||
args += ';template=' + template.val();
|
||||
|
||||
@ -1059,8 +1042,8 @@ function openEditImagePage(tgtImage) {
|
||||
// There is an element called groups that will override the defaults for the groups attribute.
|
||||
// Hence, the input must have use CSS to override the float and width.
|
||||
|
||||
// Split attributes into 3 per row
|
||||
if (attrIndex > 0 && !(attrIndex % 3)) {
|
||||
// Split attributes into 2 per row
|
||||
if (attrIndex > 0 && !(attrIndex % 2)) {
|
||||
div.css('display', 'inline-block');
|
||||
}
|
||||
|
||||
@ -1303,15 +1286,15 @@ function openCopyCdDialog() {
|
||||
// Create Linux ISO input
|
||||
var iso = $('<div></div>');
|
||||
var isoLabel = $('<label> Linux ISO/DVD:</label>').css('vertical-align', 'middle');
|
||||
var isoInput = $('<input type="text" id="iso" name="iso"/>').css('width', '300px');
|
||||
var isoInput = $('<input type="text" id="iso" name="iso" title="The fully qualified name of the disk image file"/>').css('width', '300px');
|
||||
iso.append(isoLabel);
|
||||
iso.append(isoInput);
|
||||
copyLinuxForm.append(iso);
|
||||
|
||||
// Create architecture input
|
||||
copyLinuxForm.append('<div><label>Architecture:</label><input type="text" id="arch" name="arch"/></div>');
|
||||
copyLinuxForm.append('<div><label>Architecture:</label><input type="text" id="arch" name="arch" title="The hardware architecture of this node. Valid values: x86_64, x86, ia64, ppc64, and s390x."/></div>');
|
||||
// Create distribution input
|
||||
copyLinuxForm.append('<div><label>Distribution:</label><input type="text" id="distro" name="distro"/></div>');
|
||||
copyLinuxForm.append('<div><label>Distribution:</label><input type="text" id="distro" name="distro" title="The operating system name. Valid values: rhel*, centos*, fedora*, sles* (where * is the version #)."/></div>');
|
||||
|
||||
/**
|
||||
* Browse
|
||||
@ -1342,6 +1325,27 @@ function openCopyCdDialog() {
|
||||
basePath : '/install' // Limit user to only install directory
|
||||
});
|
||||
|
||||
// Generate tooltips
|
||||
copyLinuxForm.find('div input[title],select[title]').tooltip({
|
||||
position: "center right",
|
||||
offset: [-2, 10],
|
||||
effect: "fade",
|
||||
opacity: 0.8,
|
||||
delay: 0,
|
||||
predelay: 800,
|
||||
events: {
|
||||
def: "mouseover,mouseout",
|
||||
input: "mouseover,mouseout",
|
||||
widget: "focus mouseover,blur mouseout",
|
||||
tooltip: "mouseover,mouseout"
|
||||
},
|
||||
|
||||
// Change z index to show tooltip in front
|
||||
onBeforeShow: function() {
|
||||
this.getTip().css('z-index', $.topZIndex());
|
||||
}
|
||||
});
|
||||
|
||||
// Open dialog to copy CD
|
||||
copyLinuxForm.dialog({
|
||||
title:'Copy CD',
|
||||
|
@ -114,47 +114,45 @@ function loadServicePage() {
|
||||
}
|
||||
});
|
||||
|
||||
// Get OS image names
|
||||
$.ajax({
|
||||
url : 'lib/srv_cmd.php',
|
||||
dataType : 'json',
|
||||
async : true,
|
||||
data : {
|
||||
cmd : 'tabdump',
|
||||
tgt : '',
|
||||
args : 'osimage',
|
||||
msg : ''
|
||||
},
|
||||
|
||||
success : function(data) {
|
||||
setOSImageCookies(data);
|
||||
}
|
||||
});
|
||||
|
||||
// Get contents of hosts table
|
||||
$.ajax({
|
||||
url : 'lib/srv_cmd.php',
|
||||
dataType : 'json',
|
||||
async : true,
|
||||
data : {
|
||||
cmd : 'tabdump',
|
||||
tgt : '',
|
||||
args : 'hosts',
|
||||
msg : ''
|
||||
},
|
||||
|
||||
success : function(data) {
|
||||
setGroupCookies(data);
|
||||
}
|
||||
});
|
||||
|
||||
var provTabId = 'provisionTab';
|
||||
serviceTabs.add(provTabId, 'Provision', '', false);
|
||||
loadServiceProvisionPage(provTabId);
|
||||
|
||||
serviceTabs.select(manageTabId);
|
||||
|
||||
// Get OS image names
|
||||
if (!$.cookie('srv_imagenames')){
|
||||
$.ajax( {
|
||||
url : 'lib/srv_cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'tabdump',
|
||||
tgt : '',
|
||||
args : 'osimage',
|
||||
msg : ''
|
||||
},
|
||||
|
||||
success : function(data) {
|
||||
setOSImageCookies(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Get contents of hosts table
|
||||
if (!$.cookie('srv_groups')) {
|
||||
$.ajax( {
|
||||
url : 'lib/srv_cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'tabdump',
|
||||
tgt : '',
|
||||
args : 'hosts',
|
||||
msg : ''
|
||||
},
|
||||
|
||||
success : function(data) {
|
||||
setGroupCookies(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -241,7 +239,7 @@ function loadServiceProvisionPage(tabId) {
|
||||
title = 'z/VM';
|
||||
|
||||
// Get zVM host names
|
||||
if (!$.cookie('srv_zvm')){
|
||||
if (!$.cookie('zvms')){
|
||||
$.ajax( {
|
||||
url : 'lib/srv_cmd.php',
|
||||
dataType : 'json',
|
||||
@ -858,18 +856,15 @@ function loadNode(e) {
|
||||
// Create an instance of the plugin
|
||||
var plugin;
|
||||
switch (mgt) {
|
||||
case "blade":
|
||||
plugin = new bladePlugin();
|
||||
break;
|
||||
case "hmc":
|
||||
plugin = new hmcPlugin();
|
||||
break;
|
||||
case "ipmi":
|
||||
plugin = new ipmiPlugin();
|
||||
break;
|
||||
case "zvm":
|
||||
plugin = new zvmPlugin();
|
||||
break;
|
||||
case "kvm":
|
||||
plugin = new kvmPlugin();
|
||||
break;
|
||||
case "esx":
|
||||
plugin = new esxPlugin();
|
||||
break;
|
||||
case "zvm":
|
||||
plugin = new zvmPlugin();
|
||||
break;
|
||||
}
|
||||
|
||||
// Select tab
|
||||
@ -1317,18 +1312,15 @@ function cloneNode(tgtNodes) {
|
||||
// Create an instance of the plugin
|
||||
var plugin;
|
||||
switch (hw) {
|
||||
case "blade":
|
||||
plugin = new bladePlugin();
|
||||
break;
|
||||
case "hmc":
|
||||
plugin = new hmcPlugin();
|
||||
break;
|
||||
case "ipmi":
|
||||
plugin = new ipmiPlugin();
|
||||
break;
|
||||
case "zvm":
|
||||
plugin = new zvmPlugin();
|
||||
break;
|
||||
case "kvm":
|
||||
plugin = new kvmPlugin();
|
||||
break;
|
||||
case "esx":
|
||||
plugin = new esxPlugin();
|
||||
break;
|
||||
case "zvm":
|
||||
plugin = new zvmPlugin();
|
||||
break;
|
||||
}
|
||||
|
||||
// Clone node
|
||||
@ -1684,7 +1676,7 @@ function getMonitorMetrics(node) {
|
||||
var node, status;
|
||||
|
||||
// Get the ganglia status
|
||||
for ( var i in ganglia) {
|
||||
for (var i in ganglia) {
|
||||
// ganglia[0] = nodeName and ganglia[1] = state
|
||||
node = jQuery.trim(ganglia[i][0]);
|
||||
status = jQuery.trim(ganglia[i][1]);
|
||||
|
@ -490,6 +490,7 @@ function initPage() {
|
||||
includeJs("js/jquery/jquery.jqplot.min.js");
|
||||
includeJs("js/jquery/jqplot.pieRenderer.min.js");
|
||||
includeJs("js/jquery/jqplot.dateAxisRenderer.min.js");
|
||||
includeJs("js/jquery/jquery.topzindex.min.js");
|
||||
|
||||
// Page plugins
|
||||
includeJs("js/configure/configure.js");
|
||||
@ -586,7 +587,6 @@ function initPage() {
|
||||
loadHelpPage();
|
||||
} else {
|
||||
// Load nodes page by default
|
||||
includeJs("js/jquery/jquery.topzindex.min.js");
|
||||
includeJs("js/nodes/nodeset.js");
|
||||
includeJs("js/nodes/rnetboot.js");
|
||||
includeJs("js/nodes/updatenode.js");
|
||||
@ -676,21 +676,21 @@ function writeRsp(rsp, pattern) {
|
||||
* @param msg Message to show
|
||||
*/
|
||||
function openDialog(type, msg) {
|
||||
var msgDialog;
|
||||
var msgDialog = $('<div></div>');
|
||||
var title = "";
|
||||
if (type == "warn") {
|
||||
// Create warning message
|
||||
msgDialog = $('<div class="ui-state-error ui-corner-all">'
|
||||
+ '<p><span class="ui-icon ui-icon-alert"></span>' + msg + '</p>'
|
||||
+ '</div>');
|
||||
msgDialog.append(createWarnBar(msg));
|
||||
title = "Warning";
|
||||
} else {
|
||||
// Create info message
|
||||
msgDialog = $('<div class="ui-state-highlight ui-corner-all">'
|
||||
+ '<p><span class="ui-icon ui-icon-info"></span>' + msg + '</p>'
|
||||
+'</div>');
|
||||
msgDialog.append(createInfoBar(msg));
|
||||
title = "Info";
|
||||
}
|
||||
|
||||
// Open dialog
|
||||
msgDialog.dialog({
|
||||
title: title,
|
||||
modal: true,
|
||||
close: function(){
|
||||
$(this).remove();
|
||||
|
@ -41,14 +41,14 @@ if (isset($_GET["cmd"])) {
|
||||
}
|
||||
|
||||
// If no $args are given, set $args_array to NULL
|
||||
// Separators used are: | or ;
|
||||
// Separators used are: || or ;
|
||||
$args_array = array();
|
||||
if ($args) {
|
||||
// If $args contains multiple arguments, split it into an array
|
||||
if (strpos($args, "|")) {
|
||||
if (strpos($args, "||")) {
|
||||
// Split the arguments into an array
|
||||
$args_array = array();
|
||||
$args_array = explode("|", $args);
|
||||
$args_array = explode("||", $args);
|
||||
} else if (strpos($args, ";")) {
|
||||
// Split the arguments into an array
|
||||
$args_array = array();
|
||||
|
@ -45,11 +45,11 @@ if (isset($_GET["cmd"])) {
|
||||
}
|
||||
|
||||
// If $args contains multiple arguments, split it into an array
|
||||
// Separators used are: | or ;
|
||||
if (strpos($args, "|")) {
|
||||
// Separators used are: || or ;
|
||||
if (strpos($args, "||")) {
|
||||
// Split the arguments into an array
|
||||
$arr = array();
|
||||
$arr = explode("|", $args);
|
||||
$arr = explode("||", $args);
|
||||
} else if (strpos($args, ";")) {
|
||||
// Split the arguments into an array
|
||||
$arr = array();
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user