Compare commits
400 Commits
2.8.1
...
traffic-co
Author | SHA1 | Date | |
---|---|---|---|
6c6b43f60f | |||
d569677196 | |||
f17024abe5 | |||
ec114e2fde | |||
7a33da03de | |||
1138ab87d4 | |||
0a226feef7 | |||
efa051a181 | |||
d5ef187fe1 | |||
bfee3cf96a | |||
6801e064cf | |||
db6fc2c563 | |||
89f238f5cd | |||
cdb7aa0ab6 | |||
91a1736e61 | |||
3e02ce0e4f | |||
e2e7c0b35c | |||
beadfcd627 | |||
dfd91e4d4a | |||
64af7cbc19 | |||
2d555c821a | |||
786cfde0a8 | |||
e1c60cb830 | |||
b7daccfe36 | |||
571487bf46 | |||
85b4be21c5 | |||
aca5b290c2 | |||
97e50a2aae | |||
4a30157492 | |||
c72f824670 | |||
e30d85bf2d | |||
1d37352e85 | |||
c0e81dc8ad | |||
bd67c19612 | |||
0768e46b91 | |||
c1a25ac668 | |||
3995fae3b6 | |||
2d0f36801a | |||
66e30f3a17 | |||
cb415007ba | |||
0a89522d18 | |||
8990dc25ff | |||
c256f1c0fe | |||
c5e3b1a06d | |||
acbcc58858 | |||
be6a71e607 | |||
f69b6ac018 | |||
7ace2412fe | |||
ea3431f5a7 | |||
8360cddd12 | |||
d3043285f2 | |||
28d75b347f | |||
9a639e015e | |||
ce4e807a04 | |||
e05b6c62b2 | |||
e705fc08e9 | |||
8f37638f66 | |||
e0b1400489 | |||
fb0028623a | |||
528ecb3e56 | |||
b5afe5e3b9 | |||
525d1dcb63 | |||
e01282f5eb | |||
a1fdfce779 | |||
85e66bdcfc | |||
2d9139705f | |||
e927682f24 | |||
69812d996a | |||
ff67a1d864 | |||
a9e5f73abd | |||
9e26b11fe2 | |||
ef9db848fd | |||
a2c0e85f08 | |||
265cbde35b | |||
9eda055ddd | |||
ce3ea63680 | |||
83e983106c | |||
30d3984998 | |||
1e1b6417d7 | |||
d8824a068f | |||
70414d2b08 | |||
236a415bf7 | |||
4c82d3101f | |||
4c2f0c2ceb | |||
6b9baa15e5 | |||
f93460d4f6 | |||
b5f73f7a23 | |||
43c44ee347 | |||
25eb443587 | |||
e899e3d62b | |||
52620d3edd | |||
d7987c5e46 | |||
e9441739a0 | |||
abf400572b | |||
5cabc2b9ef | |||
1d11ddb65f | |||
03eb28bb46 | |||
430d5c0c09 | |||
ea966447d6 | |||
1533cf185c | |||
749cf2f240 | |||
c06c616558 | |||
7dbd6aaf3e | |||
51fe0df1c4 | |||
045b83d76d | |||
3d8c237a01 | |||
5ac785b6f6 | |||
4768f5adba | |||
18193f31a4 | |||
aad6c3c311 | |||
42ae915878 | |||
e5755dbc64 | |||
4b2e5beb12 | |||
ee48169642 | |||
f20e77dd93 | |||
cdf3b7aeb2 | |||
1a2383d9f8 | |||
037f32bd54 | |||
61158bbfcf | |||
6a8534a0f6 | |||
f19761ef71 | |||
a4187efcb2 | |||
922921a739 | |||
cee8a7a73b | |||
474c298630 | |||
0575001ef2 | |||
3ceb5fe7e4 | |||
d00ded29a2 | |||
4312042e2a | |||
d129856a4f | |||
5c1c601119 | |||
a2a91cdd21 | |||
4940906c05 | |||
b857a25081 | |||
83bed2cb04 | |||
079665a651 | |||
bd38609ba1 | |||
5777cd4dd7 | |||
bab48dbc50 | |||
6c1a840369 | |||
2830bab937 | |||
eda584a0f5 | |||
67787dad86 | |||
4c6b234e13 | |||
d095c0fc5f | |||
cab8191379 | |||
586c212d93 | |||
8d8c38d3b4 | |||
c9778bf3f7 | |||
029df230d6 | |||
1eb4411009 | |||
d4e79d7a95 | |||
3bcdc5e371 | |||
cfed625f4c | |||
c6672270ea | |||
f0161a5c45 | |||
2d6b18cfc9 | |||
eb3ccaa773 | |||
de9fbe4f82 | |||
0a4d227a2d | |||
9d374c1421 | |||
ef8f762590 | |||
95c6a3d93d | |||
c519c111ec | |||
717cd66082 | |||
4a572f5015 | |||
0344b08ba1 | |||
4bde0a0ded | |||
c602006c04 | |||
7eaed897e8 | |||
16642a0810 | |||
4337554e71 | |||
1dc28f2540 | |||
43826a511a | |||
57707391b4 | |||
f211c92b82 | |||
17abb515db | |||
3c81f67a62 | |||
221a44d1bd | |||
45fb564db6 | |||
5a4e5a3559 | |||
2fbdba3fe3 | |||
c4e7fe9f02 | |||
df466fe7b6 | |||
8df12f9219 | |||
bc44b57b73 | |||
dea73cdb01 | |||
621ad77911 | |||
29945eb0d1 | |||
111782a728 | |||
4b09b8f926 | |||
d07d624b01 | |||
10ad3b6945 | |||
46ad21d88c | |||
2de350cf80 | |||
2ce147d84b | |||
e05797bb60 | |||
774c178272 | |||
5f8ed93998 | |||
50445cdc26 | |||
4de0a47920 | |||
c4c942fbab | |||
5d3e1f3d53 | |||
fbfe3777b4 | |||
907b14ba9d | |||
ede3d3ced7 | |||
e59dc8a9ce | |||
f5ed6658ec | |||
2abdf800d9 | |||
180eb62560 | |||
e6a50b4215 | |||
e2aa75569f | |||
a0d1d5b41a | |||
80b20c444f | |||
15447d0398 | |||
51d4c30e4a | |||
7ab0cf1ffd | |||
20ff90225a | |||
04e63c307e | |||
6d6ab9b951 | |||
9765d32dc6 | |||
86b29b0edb | |||
4613a85c23 | |||
f2eb32b3c9 | |||
93bcbc5e71 | |||
361cd8c42b | |||
6ae785af6e | |||
a288b88bd9 | |||
1e797ed26b | |||
89dba8092d | |||
2195f9261e | |||
87a957642f | |||
a5fd918ba7 | |||
7f90243337 | |||
11ecff91d4 | |||
d342bab175 | |||
9c367350c9 | |||
002b2ec9df | |||
59e4b3df05 | |||
2bdbf688ab | |||
845774a571 | |||
8612355df9 | |||
002d093a37 | |||
b787fc643b | |||
0073bfd6b3 | |||
09d423997e | |||
9a7dba6d86 | |||
7d2ad45443 | |||
1c2f665993 | |||
706eca1ef7 | |||
0d195918e3 | |||
dc488dfc08 | |||
2a5ae3d1b4 | |||
acd8d676c1 | |||
01f1a52525 | |||
46a89fa1c6 | |||
d53284d914 | |||
e36f3e5684 | |||
17ae3213cd | |||
111793e3a6 | |||
f9069a18e0 | |||
a0bb9e1665 | |||
92ecdf8b0b | |||
2c8c8257a8 | |||
e706f5cbd4 | |||
37c015a7ca | |||
200e369d5d | |||
a9829ab17b | |||
b6ff220b06 | |||
6b2012900a | |||
e5011c3919 | |||
72cf13e8e3 | |||
2c6158570b | |||
5be856cddc | |||
cbf108f8b8 | |||
6e9b41d4bc | |||
0f17710b39 | |||
0308e63ef4 | |||
6a8f62a2ac | |||
05bc99e483 | |||
d9725518d8 | |||
6116ea5bd7 | |||
9aacc4d203 | |||
b79f6bb7ee | |||
651e259871 | |||
889ef5508e | |||
dee47b2c55 | |||
39230d1672 | |||
a5a4feb798 | |||
5a21746fe8 | |||
b22f425c3e | |||
56684fb6da | |||
d49c882778 | |||
e166962d49 | |||
a19b640ba4 | |||
9581e25412 | |||
a035d397ce | |||
6208b57203 | |||
05687101ee | |||
9d01a63782 | |||
73eae21f3c | |||
dabd5d5f09 | |||
bcfacb1dbf | |||
bbd1498272 | |||
311a25a05a | |||
cece5458f9 | |||
816d98fb73 | |||
2192c8e148 | |||
2e9d460772 | |||
3c4b71e06a | |||
adfb223fd4 | |||
38b5874b32 | |||
2142411c43 | |||
b9034410a9 | |||
a840161de9 | |||
3d98c4fe6e | |||
2b61bf2c91 | |||
200373f48d | |||
6bbbfeff81 | |||
ba1cadb6e9 | |||
68f86b703b | |||
413f6c0010 | |||
a3caf9e5aa | |||
b5d6951f62 | |||
1c1e78bf89 | |||
116e770bfb | |||
bf2aa12fd3 | |||
afe5dd5024 | |||
dbdd43de8d | |||
cfcca53716 | |||
85828d24aa | |||
bd812ab851 | |||
daf319a402 | |||
9154b2edc9 | |||
e69cdc2d5f | |||
d5c6ad426c | |||
4650f29bb7 | |||
6329990417 | |||
1acb9398d6 | |||
fa89345a5c | |||
bb1f68f440 | |||
b4ad09c0ce | |||
3535bd753d | |||
b6e467acff | |||
a838da18d7 | |||
40dc51dd1b | |||
8bc4dd7476 | |||
04268e1f5d | |||
f942046a68 | |||
24003e0910 | |||
1e2c70f859 | |||
1f69def767 | |||
a60ce4d483 | |||
4b7181dfee | |||
f9f370cd5f | |||
8b1334a3d6 | |||
23f7cd6d36 | |||
3f986ecf29 | |||
2a55eb6ee5 | |||
6f0b9a6eec | |||
0835970d7f | |||
d2e361331a | |||
52db6d0e9a | |||
204d1a8df5 | |||
cad9eca293 | |||
612b2d8098 | |||
efed7f2b66 | |||
5f6ccbff86 | |||
12bf36dfc0 | |||
ab2cfba24a | |||
c4dc675a87 | |||
fde574046e | |||
8fbae2dfa7 | |||
48872e61fd | |||
a215989fb3 | |||
11c5f32f0e | |||
15616a151e | |||
fa783ea9b7 | |||
8066ec5c07 | |||
e665d1dad8 | |||
318d33b9b1 | |||
eda83f4580 | |||
23625b7a48 | |||
af9c8731ee | |||
ae99ef1a30 | |||
5b29162989 | |||
a6eea2c977 | |||
9c69cb198a | |||
8efa7cdd67 | |||
f6c999796f | |||
3f6d09e554 | |||
615363b332 | |||
c2238857f4 | |||
602854999a | |||
72f1715eb0 | |||
2af0eff7ed | |||
4a241ef34e | |||
8c58adf552 | |||
6baabbe7bc | |||
4c5f1d54d6 |
@ -1679,14 +1679,7 @@ sub readFileInput
|
||||
|
||||
$look_for_colon = 0; # ok - we have a colon
|
||||
|
||||
# Remove any trailing whitespace
|
||||
$l =~ s/\s*$//;
|
||||
|
||||
# IPv6 network names could be something like fd59::/64
|
||||
# Use all the characters before the last ":" as the object name
|
||||
# .* means greedy regular expression
|
||||
$l =~ /^(.*):(.*?)$/;
|
||||
($objectname, $junk2) = ($1, $2);
|
||||
($objectname, $junk2) = split(/:/, $l);
|
||||
|
||||
# if $junk2 is defined or there's an =
|
||||
if ($junk2 || grep(/=/, $objectname))
|
||||
|
@ -754,20 +754,8 @@ sub pping_hostnames
|
||||
my ($class, @hostnames) = @_;
|
||||
|
||||
my $hostname_list = join ",", @hostnames;
|
||||
# read site table, usefping attribute
|
||||
# if set then run pping -f to use fping
|
||||
# this fixes a broken nmap in Redhat 6.2 with ip alias (3512)
|
||||
my $cmd="$::XCATROOT/bin/pping $hostname_list"; # default
|
||||
my @usefping=xCAT::TableUtils->get_site_attribute("usefping");
|
||||
if ((defined($usefping[0])) && ($usefping[0] eq "1")) {
|
||||
$cmd = "$::XCATROOT/bin/pping -f $hostname_list";
|
||||
}
|
||||
#my $rsp={};
|
||||
#$rsp->{data}->[0] = "running command $cmd";
|
||||
#xCAT::MsgUtils->message("I", $rsp, $::CALLBACK);
|
||||
|
||||
my @output =
|
||||
xCAT::Utils->runcmd($cmd, -1);
|
||||
xCAT::Utils->runcmd("$::XCATROOT/bin/pping $hostname_list", -1);
|
||||
if ($::RUNCMD_RC !=0) {
|
||||
my $rsp={};
|
||||
$rsp->{error}->[0] = "Error from pping";
|
||||
|
@ -435,7 +435,7 @@ sub lcds {
|
||||
if( $type eq "lpar" ) {
|
||||
$action = "query_lcds";
|
||||
} elsif ($type eq "blade") {
|
||||
$action = "pblade_query_lcds";
|
||||
$action = "pblade_query_lcds";
|
||||
} else {
|
||||
$action = "cec_query_lcds";
|
||||
}
|
||||
|
@ -893,12 +893,12 @@ sub dolitesetup
|
||||
}
|
||||
}
|
||||
|
||||
if (-e $litetreetable) {
|
||||
my $rc = xCAT::Utils->runcmd("rm $litetreetable", -1);
|
||||
if (-e $litetreetab) {
|
||||
my $rc = xCAT::Utils->runcmd("rm $litetreetab", -1);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
my $rsp;
|
||||
push @{$rsp->{data}}, "Could not remove existing $litetreetable file.";
|
||||
push @{$rsp->{data}}, "Could not remove existing $litetreetab file.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
return 1;
|
||||
}
|
||||
|
@ -1849,14 +1849,6 @@ sub boot_network {
|
||||
$state = $newstate[$state];
|
||||
}
|
||||
],
|
||||
# For some old firmware, does not output "----"
|
||||
[qr/BOOTP/=>
|
||||
sub {
|
||||
nc_msg ($verbose, $msg[$state]);
|
||||
$rconsole->clear_accum();
|
||||
$state = $newstate[$state];
|
||||
}
|
||||
],
|
||||
[qr/]/=>
|
||||
sub {
|
||||
nc_msg($verbose, "Unexpected prompt\n");
|
||||
@ -1925,28 +1917,7 @@ sub Boot {
|
||||
#],
|
||||
[qr/BOOTP/=> #-ex
|
||||
sub {
|
||||
nc_msg($verbose, "# Network boot proceeding - matched BOOTP, exiting.\n");
|
||||
$rconsole->clear_accum();
|
||||
}
|
||||
],
|
||||
# Welcome to AIX - some old firmware does not output BOOTP or ----
|
||||
[qr/Welcome/=> #-ex
|
||||
sub {
|
||||
nc_msg($verbose, "# Network boot proceeding - matched Welcome, exiting.\n");
|
||||
$rconsole->clear_accum();
|
||||
}
|
||||
],
|
||||
# tftp file download - some old firmware does not output BOOTP or ----
|
||||
[qr/FILE/=> #-ex
|
||||
sub {
|
||||
nc_msg($verbose, "# Network boot proceeding - matched FILE.\n");
|
||||
$rconsole->clear_accum();
|
||||
}
|
||||
],
|
||||
# some old firmware does not output BOOTP or ----
|
||||
[qr/Elapsed/=> #-ex
|
||||
sub {
|
||||
nc_msg($verbose, "# Network boot proceeding - matched Elapsed, exiting.\n");
|
||||
nc_msg($verbose, "# Network boot proceeding, exiting.\n");
|
||||
$rconsole->clear_accum();
|
||||
}
|
||||
],
|
||||
@ -3177,12 +3148,12 @@ sub lparnetbootexp
|
||||
}
|
||||
],
|
||||
);
|
||||
return [1] if ($rc eq 1);
|
||||
nc_msg($verbose, "# bootp sent over network.\n");
|
||||
$rc = Boot($rconsole, $node, $verbose);#, @expect_out);
|
||||
unless ($rc eq 0) {
|
||||
nc_msg($verbose, "Can't boot here. \n");
|
||||
}
|
||||
return [1] if ($rc eq 1);
|
||||
}
|
||||
nc_msg($verbose, "# bootp sent over network.\n");
|
||||
$rc = Boot($rconsole, $node, $verbose);#, @expect_out);
|
||||
unless ($rc eq 0) {
|
||||
nc_msg($verbose, "Can't boot here. \n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2196,7 +2196,6 @@ sub isValidHostname
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
=head3 isValidFQDN
|
||||
|
@ -1022,7 +1022,7 @@ site => {
|
||||
" useNmapfromMN: When set to yes, nodestat command should obtain the node status\n".
|
||||
" using nmap (if available) from the management node instead of the\n".
|
||||
" service node. This will improve the performance in a flat network.\n\n".
|
||||
" useSSHonAIX: (yes/1 or no/0). If yes, ssh/scp will be setup and used. If no, rsh/rcp. The support for rsh/rcp is deprecated.\n".
|
||||
" useSSHonAIX: (yes/1 or no/0). If yes, ssh/scp will be setup and used. If no,\n".
|
||||
" usexhrm: Have xCAT run its xHRM script when booting up KVM guests to set the\n".
|
||||
" virtual network bridge up correctly. See\n".
|
||||
" https://sourceforge.net/apps/mediawiki/xcat/index.php?title=XCAT_Virtualization_with_KVM#Setting_up_a_network_bridge\n\n".
|
||||
@ -1930,11 +1930,6 @@ my @nodeattrs = (
|
||||
tabentry => 'mp.nodetype',
|
||||
access_tabentry => 'mp.node=attr:node',
|
||||
},
|
||||
{attr_name => 'hwtype',
|
||||
only_if => 'mgt=ipmi',
|
||||
tabentry => 'mp.nodetype',
|
||||
access_tabentry => 'mp.node=attr:node',
|
||||
},
|
||||
{attr_name => 'supernode',
|
||||
tabentry => 'ppc.supernode',
|
||||
access_tabentry => 'ppc.node=attr:node',
|
||||
@ -2053,7 +2048,7 @@ my @nodeattrs = (
|
||||
tabentry => 'mp.id',
|
||||
access_tabentry => 'mp.node=attr:node',
|
||||
},
|
||||
{attr_name => 'slotid',
|
||||
{attr_name => 'id',
|
||||
only_if => 'mgt=ipmi',
|
||||
tabentry => 'mp.id',
|
||||
access_tabentry => 'mp.node=attr:node',
|
||||
|
@ -36,7 +36,7 @@ my %usage = (
|
||||
LPAR(using Direct FSP Management) specific:
|
||||
rpower <noderange> [on|off|reset|stat|state|boot|of|sms]
|
||||
Blade(using Direct FSP Management) specific:
|
||||
rpower <noderange> [on|onstandby|off|cycle|state|sms]
|
||||
rpower <noderange> [on|off|cycle|state]
|
||||
Blade(using AMM) specific:
|
||||
rpower <noderange> [cycle|softoff] [-V|--verbose]
|
||||
zVM specific:
|
||||
@ -262,7 +262,7 @@ my %usage = (
|
||||
"lsslp" =>
|
||||
"Usage: lsslp [-h|--help|-v|--version]
|
||||
lsslp [<noderange>][-V|--verbose][-i ip[,ip..]][-w][-r|-x|-z][-n][-I][-s FRAME|CEC|MM|IVM|RSA|HMC|CMM|IMM2|FSP]
|
||||
[-t tries][--vpdtable][-C counts][-T timeout]",
|
||||
[-t tries][--vpdtable][-C counts][-T timeout][--flexdiscover]",
|
||||
"rflash" =>
|
||||
"Usage:
|
||||
rflash [ -h|--help|-v|--version]
|
||||
@ -317,24 +317,10 @@ my %usage = (
|
||||
renergy noderange [-V] { all | { [savingstatus] [dsavingstatus] [cappingstatus] [cappingmaxmin] [cappingvalue] [cappingsoftmin] [averageAC] [averageDC] [ambienttemp] [exhausttemp] [CPUspeed] [syssbpower] [sysIPLtime] [fsavingstatus] [ffoMin] [ffoVmin] [ffoTurbo] [ffoNorm] [ffovalue] } }
|
||||
renergy noderange [-V] { {savingstatus}={on | off} | {dsavingstatus}={on-norm | on-maxp | off} | {fsavingstatus}={on | off} | {ffovalue}=MHZ | {cappingstatus}={on | off} | {cappingwatt}=watt | {cappingperc}=percentage }
|
||||
|
||||
BladeCenter specific :
|
||||
For Management Modules:
|
||||
renergy noderange [-V] { all | pd1all | pd2all | [pd1status] [pd2status] [pd1policy] [pd2policy] [pd1powermodule1] [pd1powermodule2] [pd2powermodule1] [pd2powermodule2] [pd1avaiablepower] [pd2avaiablepower] [pd1reservedpower] [pd2reservedpower] [pd1remainpower] [pd2remainpower] [pd1inusedpower] [pd2inusedpower] [availableDC] [averageAC] [thermaloutput] [ambienttemp] [mmtemp] }
|
||||
For a blade server nodes:
|
||||
renergy noderange [-V] { all | [averageDC] [capability] [cappingvalue] [CPUspeed] [maxCPUspeed] [savingstatus] [dsavingstatus] }
|
||||
renergy noderange [-V] { savingstatus={on | off} | dsavingstatus={on-norm | on-maxp | off} }
|
||||
|
||||
Flex specific :
|
||||
For Flex Management Modules:
|
||||
renergy noderange [-V] { all | [powerstatus] [powerpolicy] [powermodule] [avaiablepower] [reservedpower] [remainpower] [inusedpower] [availableDC] [averageAC] [thermaloutput] [ambienttemp] [mmtemp] }
|
||||
|
||||
For Flex node (power and x86):
|
||||
renergy noderange [-V] { all | [averageDC] [capability] [cappingvalue] [cappingmaxmin] [cappingmax] [cappingmin] [cappingGmin] [CPUspeed] [maxCPUspeed] [savingstatus] [dsavingstatus] }
|
||||
renergy noderange [-V] { cappingstatus={on | off} | cappingwatt=watt | cappingperc=percentage | savingstatus={on | off} | dsavingstatus={on-norm | on-maxp | off} }
|
||||
|
||||
iDataPlex specific :
|
||||
renergy noderange [-V] [ { cappingmaxmin | cappingmax | cappingmin } ] [cappingstatus] [cappingvalue] [relhistogram]
|
||||
renergy noderange [-V] { cappingstatus={on | enable | off | disable} | {cappingwatt|cappingvalue}=watt }",
|
||||
Blade specific :
|
||||
renergy noderange [-V] { all | pd1all | pd2all | { [pd1status] [pd2status] [pd1policy] [pd2policy] [pd1powermodule1] [pd1powermodule2] [pd2powermodule1] [pd2powermodule2] [pd1avaiablepower] [pd2avaiablepower] [pd1reservedpower] [pd2reservedpower] [pd1remainpower] [pd2remainpower] [pd1inusedpower] [pd2inusedpower] [availableDC] [averageAC] [thermaloutput] [ambienttemp] [mmtemp] } }
|
||||
renergy noderange [-V] { all | { [averageDC] [capability] [cappingvalue] [CPUspeed] [maxCPUspeed] [savingstatus] [dsavingstatus] } }
|
||||
renergy noderange [-V] { {savingstatus}={on | off} | {dsavingstatus}={on-norm | on-maxp | off} }",
|
||||
"updatenode" =>
|
||||
"Usage:
|
||||
updatenode [-h|--help|-v|--version]
|
||||
|
@ -3244,14 +3244,12 @@ sub filter_nodes{
|
||||
if (@args && ($cmd eq "rspconfig")) {
|
||||
if (!(grep /^(cec_off_policy|pending_power_on_side)/, @args)) {
|
||||
push @{$mpnodes}, @ngpfsp;
|
||||
if (grep /^(network=)/, @args) {
|
||||
push @{$mpnodes}, @ngpbmc;
|
||||
}
|
||||
} else {
|
||||
push @{$fspnodes}, @ngpfsp;
|
||||
}
|
||||
if (grep /^(network|textid)/, @args) {
|
||||
push @{$mpnodes}, @ngpbmc;
|
||||
} else {
|
||||
push @{$bmcnodes}, @ngpbmc;
|
||||
}
|
||||
} elsif($cmd eq "getmacs") {
|
||||
if (@args && (grep /^-D$/,@args)) {
|
||||
push @{$fspnodes}, @ngpfsp;
|
||||
@ -3265,11 +3263,7 @@ sub filter_nodes{
|
||||
push @{$mpnodes}, @ngpfsp;
|
||||
}
|
||||
} elsif ($cmd eq "renergy") {
|
||||
if (grep /^(relhistogram)/, @args) {
|
||||
push @{$bmcnodes}, @ngpbmc;
|
||||
} else {
|
||||
push @{$mpnodes}, @ngpbmc;
|
||||
}
|
||||
push @{$mpnodes}, @ngpbmc;
|
||||
push @{$mpnodes}, @ngpfsp;
|
||||
} else {
|
||||
push @{$fspnodes}, @ngpfsp;
|
||||
|
@ -1090,23 +1090,16 @@ sub createMacAddr {
|
||||
return -1;
|
||||
}
|
||||
|
||||
# Get USER Prefix
|
||||
my $prefix = `ssh -o ConnectTimeout=5 $user\@$hcp "$sudo /sbin/vmcp q vmlan" | egrep -i "USER Prefix:"`;
|
||||
$prefix =~ s/(.*?)USER Prefix:(.*)/$2/;
|
||||
$prefix =~ s/^\s+//;
|
||||
$prefix =~ s/\s+$//;
|
||||
|
||||
# Get MACADDR Prefix instead if USER Prefix is not defined
|
||||
if (!$prefix) {
|
||||
$prefix = `ssh -o ConnectTimeout=5 $user\@$hcp "$sudo /sbin/vmcp q vmlan" | egrep -i "MACADDR Prefix:"`;
|
||||
$prefix =~ s/(.*?)MACADDR Prefix:(.*)/$2/;
|
||||
$prefix =~ s/^\s+//;
|
||||
$prefix =~ s/\s+$//;
|
||||
|
||||
if (!$prefix) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
# Get HCP MAC address
|
||||
# Get the first MAC address found
|
||||
my $out = `ssh -o ConnectTimeout=5 $user\@$hcp "$sudo /sbin/vmcp q v nic" | grep "MAC:"`;
|
||||
my @lines = split( "\n", $out );
|
||||
my @vars = split( " ", $lines[0] );
|
||||
|
||||
# Extract MAC prefix
|
||||
my $prefix = $vars[1];
|
||||
$prefix = xCAT::zvmUtils->replaceStr( $prefix, "-", "" );
|
||||
$prefix = substr( $prefix, 0, 6 );
|
||||
|
||||
# Generate MAC address of source node
|
||||
my $mac = $prefix . $suffix;
|
||||
|
@ -315,7 +315,7 @@ function configImagePanel(data) {
|
||||
});
|
||||
|
||||
// Create an action menu
|
||||
var actionsMenu = createMenu([refreshLnk, createLnk, editLnk, deleteLnk]);
|
||||
var actionsMenu = createMenu([createLnk, editLnk, deleteLnk, refreshLnk]);
|
||||
actionsMenu.superfish();
|
||||
actionsMenu.css('display', 'inline-block');
|
||||
actionBar.append(actionsMenu);
|
||||
@ -868,7 +868,7 @@ function configGroupPanel(data) {
|
||||
});
|
||||
|
||||
// Create an action menu
|
||||
var actionsMenu = createMenu([refreshLnk, createLnk, editLnk, deleteLnk]);
|
||||
var actionsMenu = createMenu([createLnk, editLnk, deleteLnk, refreshLnk]);
|
||||
actionsMenu.superfish();
|
||||
actionsMenu.css('display', 'inline-block');
|
||||
actionBar.append(actionsMenu);
|
||||
|
@ -84,35 +84,26 @@ function loadUserTable(data){
|
||||
// Add table rows
|
||||
// Start with the 2nd row (1st row is the headers)
|
||||
for (var i = 1; i < data.rsp.length; i++) {
|
||||
// Split into columns
|
||||
var cols = data.rsp[i].split(',');
|
||||
|
||||
// Trim returned data
|
||||
data.rsp[i] = jQuery.trim(data.rsp[i]);
|
||||
// Split data into columns
|
||||
var cols = data.rsp[i].split(',');
|
||||
|
||||
// Go through each column
|
||||
// Column names are: priority, name, host, commands, noderange, parameters, time, rule, comments, disable
|
||||
for (var j = 0; j < cols.length; j++) {
|
||||
|
||||
// If the column is not complete
|
||||
if (cols[j].count('"') == 1) {
|
||||
while (cols[j].count('"') != 2) {
|
||||
// Merge this column with the adjacent one
|
||||
cols[j] = cols[j] + "," + cols[j + 1];
|
||||
|
||||
// Remove merged row
|
||||
cols.splice(j + 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Replace quote
|
||||
cols[j] = cols[j].replace(new RegExp('"', 'g'), '');
|
||||
cols[j] = cols[j].replace(/"/g, '');
|
||||
}
|
||||
|
||||
// Set the highest priority
|
||||
priority = cols[0];
|
||||
if (priority > topPriority)
|
||||
topPriority = priority;
|
||||
|
||||
|
||||
// Add check box where name = user name
|
||||
cols.unshift('<input type="checkbox" name="' + cols[0] + '"/>');
|
||||
|
||||
|
||||
// Add row
|
||||
table.add(cols);
|
||||
}
|
||||
@ -178,7 +169,7 @@ function loadUserTable(data){
|
||||
});
|
||||
|
||||
// Create an action menu
|
||||
var actionsMenu = createMenu([refreshLnk, createLnk, editLnk, deleteLnk]);
|
||||
var actionsMenu = createMenu([createLnk, editLnk, deleteLnk, refreshLnk]);
|
||||
actionsMenu.superfish();
|
||||
actionsMenu.css('display', 'inline-block');
|
||||
actionBar.append(actionsMenu);
|
||||
@ -235,16 +226,8 @@ function openCreateUserDialog(data) {
|
||||
|
||||
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>'));
|
||||
var type = $('<div><label>Type:</label></div>');
|
||||
var typeSelect = $('<select name="user_type" title="Specifies the type of user.">' +
|
||||
'<option value="guest">Guest</option>' +
|
||||
'<option value="admin">Administrator</option>' +
|
||||
'</select>');
|
||||
type.append(typeSelect);
|
||||
userAttr.append(type);
|
||||
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>'));
|
||||
@ -255,6 +238,10 @@ function openCreateUserDialog(data) {
|
||||
'<option value="trusted">Trusted</option>' +
|
||||
'<option value="deny">Deny</option>' +
|
||||
'</select></div>'));
|
||||
var rootPrivilege = $('<div><label>Root privilege:</label></div>');
|
||||
var accessCheckbox = $('<input type="checkbox" name="rootprivilege"/>');
|
||||
optionAttr.append(rootPrivilege);
|
||||
rootPrivilege.append(accessCheckbox);
|
||||
|
||||
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">' +
|
||||
@ -338,13 +325,8 @@ function openCreateUserDialog(data) {
|
||||
args += ' policy.rule=' + rule;
|
||||
} if (disable) {
|
||||
args += ' policy.disable=' + disable;
|
||||
}
|
||||
|
||||
// Handle cases where there are comments and no comments
|
||||
if (comments) {
|
||||
} if (comments) {
|
||||
args += " policy.comments='" + comments + "'";
|
||||
} else {
|
||||
args += " policy.comments=''";
|
||||
}
|
||||
|
||||
// Trim any extra spaces
|
||||
@ -394,13 +376,13 @@ function openCreateUserDialog(data) {
|
||||
});
|
||||
|
||||
// Change comments if access checkbox is checked
|
||||
typeSelect.change(function() {
|
||||
accessCheckbox.click( function(){
|
||||
var comments = createUserForm.find('input[name=comments]').val();
|
||||
var tag = "privilege:root";
|
||||
comments = jQuery.trim(comments);
|
||||
|
||||
// Append tag to comments
|
||||
if (typeSelect.val().indexOf("admin") > -1) {
|
||||
if (accessCheckbox.is(':checked')) {
|
||||
if (comments && comments.charAt(comments.length - 1) != ";") {
|
||||
comments += ";";
|
||||
}
|
||||
@ -451,7 +433,7 @@ function openCreateUserDialog(data) {
|
||||
createUserForm.find('select[name=disable]').val(disable);
|
||||
|
||||
if (comments.indexOf("privilege:root") > -1) {
|
||||
typeSelect.val("admin");
|
||||
accessCheckbox.attr("checked", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ function addAmmNode(){
|
||||
$('#addBladeCenter').prepend(createInfoBar('AMM node was successfully added'));
|
||||
$('#addBladeCenter').dialog("option", "buttons", {
|
||||
"Close" : function() {
|
||||
$('#addBladeCenter').dialog('destroy').remove();
|
||||
$('#addBladeCenter').dialog('close');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -547,7 +547,7 @@ function addMmScanNode(){
|
||||
msg : ''
|
||||
},
|
||||
success : function(data){
|
||||
$('#addBladeCenter').dialog('destroy').remove();
|
||||
$('#addBladeCenter').dialog('close');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -546,10 +546,10 @@ esxPlugin.prototype.addNode = function() {
|
||||
title: 'Add node',
|
||||
modal: true,
|
||||
width: 400,
|
||||
close: function() {$(this).remove();},
|
||||
close: function(){$(this).remove();},
|
||||
buttons: {
|
||||
"OK" : function() {addEsxNode();},
|
||||
"Cancel": function() {$(this).dialog('destroy').remove();}
|
||||
"OK" : function(){addEsxNode();},
|
||||
"Cancel": function(){$(this).dialog('close');}
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -587,8 +587,8 @@ function addEsxNode(){
|
||||
|
||||
// Change dialog buttons
|
||||
$('#addEsx').dialog('option', 'buttons', {
|
||||
'Close':function() {
|
||||
$('#addEsx').dialog('destroy').remove();
|
||||
'Close':function(){
|
||||
$('#addEsx').dialog('close');
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -217,7 +217,7 @@ hmcPlugin.prototype.addNode = function() {
|
||||
addHmcNode();
|
||||
},
|
||||
'Cancel' : function() {
|
||||
$('#addHmc').dialog('destroy').remove();
|
||||
$('#addHmc').dialog('close');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@ -227,7 +227,7 @@ hmcPlugin.prototype.addNode = function() {
|
||||
// Change dialog buttons
|
||||
$('#addHmc').dialog('option', 'buttons', {
|
||||
'Cancel' : function() {
|
||||
$('#addHmc').dialog('destroy').remove();
|
||||
$('#addHmc').dialog('close');
|
||||
}
|
||||
});
|
||||
|
||||
@ -295,7 +295,7 @@ function addHmcNode() {
|
||||
msg : ''
|
||||
},
|
||||
success : function(data) {
|
||||
$('#addHmc').dialog('destroy').remove();
|
||||
$('#addHmc').dialog('close');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -349,7 +349,7 @@ function drawHmcSelector(hmcs) {
|
||||
addPNode();
|
||||
},
|
||||
'Cancel' : function() {
|
||||
$('#addHmc').dialog('destroy').remove();
|
||||
$('#addHmc').dialog('close');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -466,7 +466,7 @@ function addPNode() {
|
||||
},
|
||||
success : function(data) {
|
||||
// Refresh the area on the right side
|
||||
$('#addHmc').dialog('destroy').remove();
|
||||
$('#addHmc').dialog('close');
|
||||
$('.selectgroup').trigger('click');
|
||||
}
|
||||
});
|
||||
|
@ -207,7 +207,7 @@ ipmiPlugin.prototype.addNode = function() {
|
||||
addIdataplex();
|
||||
},
|
||||
"Cancel" : function() {
|
||||
$(this).dialog('destroy').remove();
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -247,7 +247,7 @@ function addIdataplex() {
|
||||
// Change dialog buttons
|
||||
$('#addIdplx').dialog('option', 'buttons', {
|
||||
'Close' : function() {
|
||||
$('#addIdplx').dialog('destroy').remove();
|
||||
$('#addIdplx').dialog('close');
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -544,7 +544,7 @@ kvmPlugin.prototype.addNode = function() {
|
||||
close: function(){$(this).remove();},
|
||||
buttons: {
|
||||
"OK" : function(){addKvmNode();},
|
||||
"Cancel": function(){$(this).dialog('destroy').remove();}
|
||||
"Cancel": function(){$(this).dialog('close');}
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -583,7 +583,7 @@ function addKvmNode(){
|
||||
// Change dialog buttons
|
||||
$('#addKvm').dialog('option', 'buttons', {
|
||||
'Close':function(){
|
||||
$('#addKvm').dialog('destroy').remove();
|
||||
$('#addKvm').dialog('close');
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -2035,12 +2035,12 @@ zvmPlugin.prototype.addNode = function() {
|
||||
|
||||
// If there are no errors
|
||||
if (ready) {
|
||||
$('#addZvm').append(createLoader());
|
||||
$('#addZvm').append(createLoader());
|
||||
|
||||
// Change dialog buttons
|
||||
$('#addZvm').dialog('option', 'buttons', {
|
||||
'Close':function() {
|
||||
$('#addZvm').dialog('destroy').remove();
|
||||
'Close':function(){
|
||||
$('#addZvm').dialog('close');
|
||||
}
|
||||
});
|
||||
|
||||
@ -2233,7 +2233,7 @@ zvmPlugin.prototype.addNode = function() {
|
||||
}
|
||||
},
|
||||
"Cancel": function(){
|
||||
$(this).dialog('destroy').remove();
|
||||
$(this).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -2559,7 +2559,7 @@ zvmPlugin.prototype.loadLogPage = function(node) {
|
||||
logAttr.append(optsList);
|
||||
|
||||
// Create retrieve log checkbox
|
||||
var retrieveChkBox = $('<li><input type="checkbox" name="t"/></li>');
|
||||
var retrieveChkBox = $('<li><input type="checkbox" name="s"/></li>');
|
||||
optsList.append(retrieveChkBox);
|
||||
retrieveChkBox.append('Retrieve log');
|
||||
|
||||
@ -2646,7 +2646,7 @@ zvmPlugin.prototype.loadLogPage = function(node) {
|
||||
optStr += '-' + opt;
|
||||
|
||||
// If it is the retrieve log
|
||||
if (opt == 't') {
|
||||
if (opt == 's') {
|
||||
// Append log destination
|
||||
optStr += ';' + $('#' + newTabId + ' input[name=tgtLog]').val();
|
||||
}
|
||||
|
@ -3233,9 +3233,6 @@ function getDiskPool(data) {
|
||||
});
|
||||
} // End of if
|
||||
} // End of for
|
||||
} else {
|
||||
// Load empty table
|
||||
loadDiskPoolTable();
|
||||
}
|
||||
}
|
||||
|
||||
@ -3271,7 +3268,7 @@ function getZfcpPool(data) {
|
||||
} // End of for
|
||||
} else {
|
||||
// Load empty table
|
||||
loadZfcpPoolTable();
|
||||
loadZfcpPoolTable(null);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3318,29 +3315,20 @@ function loadDiskPoolTable(data) {
|
||||
var panelId = 'zvmDiskResource';
|
||||
$('#' + panelId).find('img[src="images/loader.gif"]').remove();
|
||||
|
||||
var hcp2zvm = new Object();
|
||||
var args, hcp, pool, stat, tmp;
|
||||
if (data) {
|
||||
// Do not continue if the call failed
|
||||
if (!data.rsp.length && data.rsp[0].indexOf("Failed") > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Obtain mapping for zHCP to zVM system
|
||||
hcp2zvm = getHcpZvmHash();
|
||||
|
||||
args = data.msg.split(';');
|
||||
hcp = args[0].replace('hcp=', '');
|
||||
pool = args[1].replace('pool=', '');
|
||||
stat = args[2].replace('stat=', '');
|
||||
tmp = data.rsp[0].split(hcp + ': ');
|
||||
} else {
|
||||
// Provide empty values so the table will be generated
|
||||
hcp = '';
|
||||
pool = '';
|
||||
stat = '';
|
||||
tmp = new Array();
|
||||
// Do not continue if the call failed
|
||||
if (!data.rsp.length && data.rsp[0].indexOf("Failed") > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Obtain mapping for zHCP to zVM system
|
||||
var hcp2zvm = new Object();
|
||||
hcp2zvm = getHcpZvmHash();
|
||||
|
||||
var args = data.msg.split(';');
|
||||
var hcp = args[0].replace('hcp=', '');
|
||||
var pool = args[1].replace('pool=', '');
|
||||
var stat = args[2].replace('stat=', '');
|
||||
var tmp = data.rsp[0].split(hcp + ': ');
|
||||
|
||||
// Resource tab ID
|
||||
var info = $('#' + panelId).find('.ui-state-highlight');
|
||||
@ -3475,7 +3463,7 @@ function loadDiskPoolTable(data) {
|
||||
var actionBar = $('<div id="zvmDiskResourceActions" class="actionBar"></div>').css("width", "450px");
|
||||
|
||||
// Create an action menu
|
||||
var actionsMenu = createMenu([refreshLnk, addLnk, removeLnk, [advancedLnk, advancedMenu]]);
|
||||
var actionsMenu = createMenu([addLnk, removeLnk, refreshLnk, [advancedLnk, advancedMenu]]);
|
||||
actionsMenu.superfish();
|
||||
actionsMenu.css('display', 'inline-block');
|
||||
actionBar.append(actionsMenu);
|
||||
@ -3512,27 +3500,20 @@ function loadZfcpPoolTable(data) {
|
||||
var panelId = 'zfcpResource';
|
||||
$('#' + panelId).find('img[src="images/loader.gif"]').remove();
|
||||
|
||||
var hcp2zvm = new Object();
|
||||
var args, hcp, pool, tmp;
|
||||
if (data) {
|
||||
// Do not continue if the call failed
|
||||
if (!data.rsp.length && data.rsp[0].indexOf("Failed") > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Obtain mapping for zHCP to zVM system
|
||||
hcp2zvm = getHcpZvmHash();
|
||||
|
||||
args = data.msg.split(';');
|
||||
hcp = args[0].replace('hcp=', '');
|
||||
pool = args[1].replace('pool=', '');
|
||||
tmp = data.rsp[0].split(hcp + ': ');
|
||||
} else {
|
||||
// Provide empty values so the table will be generated
|
||||
hcp = '';
|
||||
pool = ''
|
||||
tmp = new Array();
|
||||
// Do not continue if the call failed
|
||||
if (!data.rsp.length && data.rsp[0].indexOf("Failed") > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Obtain mapping for zHCP to zVM system
|
||||
var hcp2zvm = new Object();
|
||||
hcp2zvm = getHcpZvmHash();
|
||||
|
||||
var args, hcp, pool, tmp;
|
||||
args = data.msg.split(';');
|
||||
hcp = args[0].replace('hcp=', '');
|
||||
pool = args[1].replace('pool=', '');
|
||||
tmp = data.rsp[0].split(hcp + ': ');
|
||||
|
||||
// Resource tab ID
|
||||
var info = $('#' + panelId).find('.ui-state-highlight');
|
||||
@ -3675,24 +3656,11 @@ function openRemoveDiskFromPoolDialog(disks2remove) {
|
||||
var hcp2zvm = new Object();
|
||||
hcp2zvm = getHcpZvmHash();
|
||||
|
||||
var disks = new Array();
|
||||
if (disks2remove.indexOf(',') > -1)
|
||||
disks = disks2remove.split(',');
|
||||
else
|
||||
disks.push(disks2remove);
|
||||
var args = disks2remove.split('-');
|
||||
var tgtHcp = args[0];
|
||||
var tgtPool = args[1];
|
||||
var tgtVol = args[2];
|
||||
|
||||
// Pick the last zHCP and pool it finds
|
||||
var args, tgtHcp = "", tgtPool = "", tgtVol = "";
|
||||
for (var i in disks) {
|
||||
args = disks[i].split('-');
|
||||
tgtHcp = args[0];
|
||||
tgtPool = args[1];
|
||||
tgtVol += args[2] + ',';
|
||||
}
|
||||
|
||||
// Strip out last comma
|
||||
tgtVol = tgtVol.slice(0, -1);
|
||||
|
||||
// Create info bar
|
||||
var info = createInfoBar('Remove a disk from a disk pool defined in the EXTENT CONTROL.');
|
||||
deleteDiskForm.append(info);
|
||||
@ -5271,12 +5239,8 @@ function createZProvisionNew(inst) {
|
||||
var thisUserId = $('#' + thisTabId + ' input[name=userId]:visible');
|
||||
var pos = thisUserEntry.val().indexOf('USER ' + thisUserId.val().toUpperCase());
|
||||
if (pos < 0) {
|
||||
|
||||
pos = thisUserEntry.val().indexOf('IDENTITY ' + thisUserId.val().toUpperCase());
|
||||
if (pos < 0) {
|
||||
errMsg = errMsg + 'The directory entry does not contain the correct user/identity ID.<br>';
|
||||
ready = false;
|
||||
}
|
||||
errMsg = errMsg + 'The directory entry does not contain the correct user ID.<br>';
|
||||
ready = false;
|
||||
}
|
||||
|
||||
// If no operating system is specified, create only user entry
|
||||
@ -5898,7 +5862,7 @@ function configProfilePanel(panelId) {
|
||||
});
|
||||
|
||||
// Create an action menu
|
||||
var actionsMenu = createMenu([refreshLnk, createLnk, editLnk, deleteLnk]);
|
||||
var actionsMenu = createMenu([createLnk, editLnk, deleteLnk, refreshLnk]);
|
||||
actionsMenu.superfish();
|
||||
actionsMenu.css('display', 'inline-block');
|
||||
actionBar.append(actionsMenu);
|
||||
@ -6102,7 +6066,7 @@ function profileDialog() {
|
||||
// Change dialog buttons
|
||||
$('#' + dialogId).dialog('option', 'buttons', {
|
||||
'Close':function(){
|
||||
$(this).dialog('destroy').remove();
|
||||
$(this).dialog('close');
|
||||
}
|
||||
});
|
||||
|
||||
@ -6283,7 +6247,7 @@ function editProfileDialog(profile, pool, size, entry) {
|
||||
// Change dialog buttons
|
||||
$('#' + dialogId).dialog('option', 'buttons', {
|
||||
'Close':function(){
|
||||
$(this).dialog('destroy').remove();
|
||||
$(this).dialog('close');
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -828,10 +828,10 @@ function mkCondRespDia() {
|
||||
}
|
||||
});
|
||||
}
|
||||
$(this).dialog('destroy').remove();
|
||||
$(this).dialog('close');
|
||||
},
|
||||
'Cancel' : function() {
|
||||
$(this).dialog('destroy').remove();
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -920,7 +920,7 @@ function chCondScopeDia() {
|
||||
});
|
||||
},
|
||||
'Cancel' : function() {
|
||||
$(this).dialog('destroy').remove();
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -941,10 +941,10 @@ function mkResponseDia() {
|
||||
},
|
||||
buttons : {
|
||||
'Ok' : function() {
|
||||
$(this).dialog('destroy').remove();
|
||||
$(this).dialog('close');
|
||||
},
|
||||
'Cancel' : function() {
|
||||
$(this).dialog('destroy').remove();
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -994,7 +994,7 @@ function startStopCondRespDia() {
|
||||
},
|
||||
buttons : {
|
||||
'Close' : function() {
|
||||
$(this).dialog('destroy').remove();
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -1122,10 +1122,10 @@ function stopCondRespDia() {
|
||||
$('#rmcEventStatus div').empty().append(data.rsp[0]);
|
||||
}
|
||||
});
|
||||
$(this).dialog('destroy').remove();
|
||||
$(this).dialog('close');
|
||||
},
|
||||
'Cancel' : function() {
|
||||
$(this).dialog('destroy').remove();
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -400,7 +400,7 @@ function mkAddNodeLink() {
|
||||
});
|
||||
|
||||
// Close dialog
|
||||
addNodeForm.dialog('destroy').remove();
|
||||
addNodeForm.dialog('close');
|
||||
});
|
||||
advanced.append(advancedLnk);
|
||||
addNodeForm.append(advanced);
|
||||
@ -410,9 +410,9 @@ function mkAddNodeLink() {
|
||||
modal: true,
|
||||
width: 400,
|
||||
title:'Add node',
|
||||
close: function() {$(this).remove();},
|
||||
close: function(){$(this).remove();},
|
||||
buttons: {
|
||||
'Ok': function() {
|
||||
'Ok': function(){
|
||||
// Get hardware management
|
||||
var mgt = $(this).find('select[name=mgt]').val();
|
||||
|
||||
@ -438,11 +438,11 @@ function mkAddNodeLink() {
|
||||
break;
|
||||
}
|
||||
|
||||
$(this).dialog('destroy').remove();
|
||||
plugin.addNode();
|
||||
$(this).dialog('close');
|
||||
},
|
||||
'Cancel': function(){
|
||||
$(this).dialog('destroy').remove();
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -658,15 +658,6 @@ function loadNodes(data) {
|
||||
}
|
||||
});
|
||||
|
||||
// Power softoff
|
||||
var powerSoftoffLnk = $('<a>Shutdown</a>');
|
||||
powerSoftoffLnk.click(function() {
|
||||
var tgtNodes = getNodesChecked(nodesTableId);
|
||||
if (tgtNodes) {
|
||||
powerNode(tgtNodes, 'softoff');
|
||||
}
|
||||
});
|
||||
|
||||
// Turn monitoring on
|
||||
var monitorOnLnk = $('<a>Monitor on</a>');
|
||||
monitorOnLnk.click(function() {
|
||||
@ -881,7 +872,7 @@ function loadNodes(data) {
|
||||
|
||||
// Actions
|
||||
var actionsLnk = '<a>Actions</a>';
|
||||
var actsMenu = createMenu([cloneLnk, deleteLnk, migrateLnk, monitorOnLnk, monitorOffLnk, powerOnLnk, powerOffLnk, scriptLnk, powerSoftoffLnk]);
|
||||
var actsMenu = createMenu([cloneLnk, deleteLnk, migrateLnk, monitorOnLnk, monitorOffLnk, powerOnLnk, powerOffLnk, scriptLnk]);
|
||||
|
||||
// Configurations
|
||||
var configLnk = '<a>Configuration</a>';
|
||||
@ -1355,7 +1346,7 @@ function addNodes2Table(data) {
|
||||
$('.node').bind('click', loadNode);
|
||||
|
||||
// Close dialog for updating table
|
||||
$('.ui-dialog-content').dialog('destroy').remove();
|
||||
$('.ui-dialog-content').dialog('close');
|
||||
|
||||
/**
|
||||
* Enable editable columns
|
||||
@ -2032,30 +2023,22 @@ function loadDeletePage(tgtNodes) {
|
||||
|
||||
// Confirm delete
|
||||
var instr = $('<p>Are you sure you want to delete <b>' + tgtNodesStr + '</b>?</p>').css('word-wrap', 'break-word');
|
||||
var dbOnly = $('<div><input type="checkbox" name="db-only"/>Only delete entries in database</div>');
|
||||
confirmAttr.append(instr);
|
||||
confirmAttr.append(dbOnly);
|
||||
|
||||
/**
|
||||
* Delete
|
||||
*/
|
||||
var deleteBtn = createButton('Delete');
|
||||
deleteBtn.click(function() {
|
||||
var cmd = "rmvm";
|
||||
// Only delete entries in database if checked
|
||||
if ($("#" + newTabId + " input[name='db-only']").attr('checked')) {
|
||||
cmd = "noderm";
|
||||
}
|
||||
|
||||
// Delete the virtual server
|
||||
$.ajax( {
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : cmd,
|
||||
cmd : 'rmvm',
|
||||
tgt : tgtNodes,
|
||||
args : '',
|
||||
msg : 'out=' + statBarId + ';cmd=' + cmd + ';tgt=' + tgtNodes
|
||||
msg : 'out=' + statBarId + ';cmd=rmvm;tgt=' + tgtNodes
|
||||
},
|
||||
|
||||
success : updateStatusBar
|
||||
@ -2118,6 +2101,18 @@ function updateStatusBar(data) {
|
||||
if (prg.html().indexOf('Error') > -1) {
|
||||
failed = true;
|
||||
}
|
||||
|
||||
// Update data table
|
||||
var rowPos;
|
||||
for (var i in tgts) {
|
||||
if (!failed) {
|
||||
// Get row containing the node link and delete it
|
||||
rowPos = findRow(tgts[i], '#' + nodesTableId, 1);
|
||||
dTable.fnDeleteRow(rowPos);
|
||||
}
|
||||
}
|
||||
|
||||
adjustColumnSize(nodesTableId);
|
||||
} else if (cmd == 'xdsh') {
|
||||
// Hide loader
|
||||
$('#' + statBarId).find('img').hide();
|
||||
@ -2140,13 +2135,6 @@ function updateStatusBar(data) {
|
||||
|
||||
// Enable buttons
|
||||
$('#' + statBarId).parent().find('button').removeAttr('disabled');
|
||||
} else if (cmd == 'noderm') {
|
||||
// Hide loader
|
||||
$('#' + statBarId).find('img').hide();
|
||||
|
||||
// Write ajax response to status bar
|
||||
var prg = $('<pre>Entries deleted in database</pre>');
|
||||
$('#' + statBarId).find('div').append(prg);
|
||||
} else {
|
||||
// Hide loader
|
||||
$('#' + statBarId).find('img').hide();
|
||||
|
@ -68,7 +68,21 @@ function loadNodesetPage(tgtNodes) {
|
||||
// Create target node or group
|
||||
var tgt = $('<div><label>Target node range:</label><input type="text" name="target" value="' + tgtNodes + '" title="The node or node range to set the boot state for"/></div>');
|
||||
vmAttr.append(tgt);
|
||||
|
||||
|
||||
// Create boot method drop down
|
||||
var method = $('<div></div>');
|
||||
var methodLabel = $('<label>Boot method:</label>');
|
||||
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>'
|
||||
+ '<option value="netboot">netboot</option>'
|
||||
+ '<option value="statelite">statelite</option>'
|
||||
);
|
||||
method.append(methodLabel);
|
||||
method.append(methodSelect);
|
||||
imageAttr.append(method);
|
||||
|
||||
// Create boot type drop down
|
||||
var type = $('<div></div>');
|
||||
var typeLabel = $('<label>Boot type:</label>');
|
||||
@ -80,24 +94,58 @@ function loadNodesetPage(tgtNodes) {
|
||||
type.append(typeLabel);
|
||||
type.append(typeSelect);
|
||||
imageAttr.append(type);
|
||||
|
||||
// Create operating system image input
|
||||
|
||||
// Create operating system input
|
||||
var os = $('<div></div>');
|
||||
var osLabel = $('<label>Operating system image:</label>');
|
||||
var osSelect = $('<select name="os" title="The operating system image to be installed on this node"></select>');
|
||||
osSelect.append($('<option value=""></option>'));
|
||||
|
||||
var imageNames = $.cookie('imagenames').split(',');
|
||||
if (imageNames) {
|
||||
imageNames.sort();
|
||||
for (var i in imageNames) {
|
||||
osSelect.append($('<option value="' + imageNames[i] + '">' + imageNames[i] + '</option>'));
|
||||
var osLabel = $('<label>Operating system:</label>');
|
||||
var osInput = $('<input type="text" name="os" title="You must give the operating system of this node or node range, e.g. rhel5.5"/>');
|
||||
osInput.one('focus', function(){
|
||||
var tmp = $.cookie('osvers');
|
||||
if (tmp) {
|
||||
// Turn on auto complete
|
||||
$(this).autocomplete({
|
||||
source: tmp.split(',')
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
os.append(osLabel);
|
||||
os.append(osSelect);
|
||||
os.append(osInput);
|
||||
imageAttr.append(os);
|
||||
|
||||
// Create architecture input
|
||||
var arch = $('<div></div>');
|
||||
var archLabel = $('<label>Architecture:</label>');
|
||||
var archInput = $('<input type="text" name="arch" title="You must give the architecture of this node or node range, e.g. s390x"/>');
|
||||
archInput.one('focus', function(){
|
||||
var tmp = $.cookie('osarchs');
|
||||
if (tmp) {
|
||||
// Turn on auto complete
|
||||
$(this).autocomplete({
|
||||
source: tmp.split(',')
|
||||
});
|
||||
}
|
||||
});
|
||||
arch.append(archLabel);
|
||||
arch.append(archInput);
|
||||
imageAttr.append(arch);
|
||||
|
||||
// Create profiles input
|
||||
var profile = $('<div></div>');
|
||||
var profileLabel = $('<label>Profile:</label>');
|
||||
var profileInput = $('<input type="text" name="profile" title="You must give the profile for this node or node range. The typical default profile is: compute."/>');
|
||||
profileInput.one('focus', function(){
|
||||
tmp = $.cookie('profiles');
|
||||
if (tmp) {
|
||||
// Turn on auto complete
|
||||
$(this).autocomplete({
|
||||
source: tmp.split(',')
|
||||
});
|
||||
}
|
||||
});
|
||||
profile.append(profileLabel);
|
||||
profile.append(profileInput);
|
||||
imageAttr.append(profile);
|
||||
|
||||
// Generate tooltips
|
||||
nodesetForm.find('div input[title],select').tooltip({
|
||||
position: "center right",
|
||||
@ -139,11 +187,16 @@ function loadNodesetPage(tgtNodes) {
|
||||
|
||||
if (ready) {
|
||||
// Get nodes
|
||||
var tgts = $('#' + tabId + ' input[name=target]').val();
|
||||
var tgts = $('#' + tabId + ' input[name=target]').val();
|
||||
// Get boot method
|
||||
var method = $('#' + tabId + ' select[id=bootMethod]').val();
|
||||
// Get boot type
|
||||
var type = $('#' + tabId + ' select[id=bootType]').val();
|
||||
// Get operating system image
|
||||
var os = $('#' + tabId + ' select[name=os]').val();
|
||||
|
||||
// Get OS, arch, and profile
|
||||
var os = $('#' + tabId + ' input[name=os]').val();
|
||||
var arch = $('#' + tabId + ' input[name=arch]').val();
|
||||
var profile = $('#' + tabId + ' input[name=profile]').val();
|
||||
|
||||
// Disable all inputs, selects, and Ok button
|
||||
inputs.attr('disabled', 'disabled');
|
||||
@ -159,7 +212,10 @@ function loadNodesetPage(tgtNodes) {
|
||||
data : {
|
||||
cmd : 'nodeadd',
|
||||
tgt : '',
|
||||
args : tgts + ';noderes.netboot=' + type,
|
||||
args : tgts + ';noderes.netboot=' + type
|
||||
+ ';nodetype.os=' + os
|
||||
+ ';nodetype.arch=' + arch
|
||||
+ ';nodetype.profile=' + profile,
|
||||
msg : 'cmd=nodeadd;inst=' + inst
|
||||
},
|
||||
|
||||
@ -203,8 +259,8 @@ function updateNodesetStatus(data) {
|
||||
|
||||
// Get nodes
|
||||
var tgts = $('#' + tabId + ' input[name=target]').val();
|
||||
// Get operating system image
|
||||
var os = $('#' + tabId + ' select[name=os]').val();
|
||||
// Get boot method
|
||||
var method = $('#' + tabId + ' select[id=bootMethod]').val();
|
||||
|
||||
/**
|
||||
* (2) Update /etc/hosts
|
||||
@ -320,7 +376,7 @@ function updateNodesetStatus(data) {
|
||||
data : {
|
||||
cmd : 'nodeset',
|
||||
tgt : tgts,
|
||||
args : 'osimage=' + os,
|
||||
args : method,
|
||||
msg : 'cmd=nodeset;inst=' + inst
|
||||
},
|
||||
|
||||
|
@ -47,10 +47,6 @@ function loadImagesPage() {
|
||||
function loadImages(data) {
|
||||
// Data returned
|
||||
var rsp = data.rsp;
|
||||
if (rsp[0].indexOf('Could not find any object definitions') > -1) {
|
||||
rsp = new Array();
|
||||
}
|
||||
|
||||
// Image attributes hash
|
||||
var attrs = new Object();
|
||||
// Image attributes
|
||||
|
@ -79,12 +79,12 @@ function loadProvisionPage() {
|
||||
|
||||
// Create radio buttons for platforms
|
||||
var hwList = $('<ol>Platforms available:</ol>');
|
||||
var esx = $('<li><input type="radio" name="hw" value="esx" disabled/>ESX</li>');
|
||||
var kvm = $('<li><input type="radio" name="hw" value="kvm" disabled/>KVM</li>');
|
||||
var zvm = $('<li><input type="radio" name="hw" value="zvm" checked/>z\/VM</li>');
|
||||
var ipmi = $('<li><input type="radio" name="hw" value="ipmi" disabled/>iDataPlex</li>');
|
||||
var blade = $('<li><input type="radio" name="hw" value="blade" disabled/>BladeCenter</li>');
|
||||
var hmc = $('<li><input type="radio" name="hw" value="hmc" disabled/>System p</li>');
|
||||
var esx = $('<li><input type="radio" name="hw" value="esx" checked/>ESX</li>');
|
||||
var kvm = $('<li><input type="radio" name="hw" value="kvm"/>KVM</li>');
|
||||
var zvm = $('<li><input type="radio" name="hw" value="zvm"/>z\/VM</li>');
|
||||
var ipmi = $('<li><input type="radio" name="hw" value="ipmi"/>iDataPlex</li>');
|
||||
var blade = $('<li><input type="radio" name="hw" value="blade"/>BladeCenter</li>');
|
||||
var hmc = $('<li><input type="radio" name="hw" value="hmc"/>System p</li>');
|
||||
|
||||
hwList.append(esx);
|
||||
hwList.append(kvm);
|
||||
@ -155,27 +155,27 @@ function loadProvisionPage() {
|
||||
resrcPg.append(resrcInfoBar);
|
||||
|
||||
// Create radio buttons for platforms
|
||||
var rsrcHwList = $('<ol>Platforms available:</ol>');
|
||||
esx = $('<li><input type="radio" name="rsrcHw" value="esx" disabled/>ESX</li>');
|
||||
kvm = $('<li><input type="radio" name="rsrcHw" value="kvm" disabled/>KVM</li>');
|
||||
zvm = $('<li><input type="radio" name="rsrcHw" value="zvm" checked/>z\/VM</li>');
|
||||
ipmi = $('<li><input type="radio" name="rsrcHw" value="ipmi" disabled/>iDataPlex</li>');
|
||||
blade = $('<li><input type="radio" name="rsrcHw" value="blade" disabled/>BladeCenter</li>');
|
||||
hmc = $('<li><input type="radio" name="rsrcHw" value="hmc" disabled/>System p</li>');
|
||||
var hwList = $('<ol>Platforms available:</ol>');
|
||||
var esx = $('<li><input type="radio" name="hw" value="esx" disabled/>ESX</li>');
|
||||
var kvm = $('<li><input type="radio" name="hw" value="kvm" disabled/>KVM</li>');
|
||||
var zvm = $('<li><input type="radio" name="hw" value="zvm" checked/>z\/VM</li>');
|
||||
var ipmi = $('<li><input type="radio" name="hw" value="ipmi" disabled/>iDataPlex</li>');
|
||||
var blade = $('<li><input type="radio" name="hw" value="blade" disabled/>BladeCenter</li>');
|
||||
var hmc = $('<li><input type="radio" name="hw" value="hmc" disabled/>System p</li>');
|
||||
|
||||
rsrcHwList.append(esx);
|
||||
rsrcHwList.append(kvm);
|
||||
rsrcHwList.append(zvm);
|
||||
rsrcHwList.append(blade);
|
||||
rsrcHwList.append(ipmi);
|
||||
rsrcHwList.append(hmc);
|
||||
hwList.append(esx);
|
||||
hwList.append(kvm);
|
||||
hwList.append(zvm);
|
||||
hwList.append(blade);
|
||||
hwList.append(ipmi);
|
||||
hwList.append(hmc);
|
||||
|
||||
resrcPg.append(rsrcHwList);
|
||||
resrcPg.append(hwList);
|
||||
|
||||
var okBtn = createButton('Ok');
|
||||
okBtn.bind('click', function(event) {
|
||||
// Get hardware that was selected
|
||||
var hw = $(this).parent().find('input[name="rsrcHw"]:checked').val();
|
||||
var hw = $(this).parent().find('input[name="hw"]:checked').val();
|
||||
|
||||
// Generate new tab ID
|
||||
var newTabId = hw + 'ResourceTab';
|
||||
|
@ -536,15 +536,6 @@ function loadNodesTable(data) {
|
||||
}
|
||||
});
|
||||
|
||||
// Power softoff
|
||||
var powerSoftoffLnk = $('<a>Shutdown</a>');
|
||||
powerSoftoffLnk.click(function() {
|
||||
var tgtNodes = getNodesChecked(nodesDTId);
|
||||
if (tgtNodes) {
|
||||
powerNode(tgtNodes, 'softoff');
|
||||
}
|
||||
});
|
||||
|
||||
// Turn monitoring on
|
||||
var monitorOnLnk = $('<a>Monitor on</a>');
|
||||
monitorOnLnk.click(function() {
|
||||
@ -639,7 +630,7 @@ function loadNodesTable(data) {
|
||||
});
|
||||
});
|
||||
|
||||
var actionMenu = createMenu([cloneLnk, deleteLnk, monitorOnLnk, monitorOffLnk, powerOnLnk, powerOffLnk, powerSoftoffLnk, unlockLnk]);
|
||||
var actionMenu = createMenu([cloneLnk, deleteLnk, monitorOnLnk, monitorOffLnk, powerOnLnk, powerOffLnk, unlockLnk]);
|
||||
var menu = createMenu([[actionsLnk, actionMenu], refreshLnk]);
|
||||
menu.superfish();
|
||||
actionBar.append(menu);
|
||||
@ -1398,10 +1389,24 @@ function deleteNode(tgtNodes) {
|
||||
}
|
||||
}
|
||||
|
||||
// Confirm delete of node
|
||||
// Confirm delete
|
||||
var confirmMsg = $('<p>Are you sure you want to delete ' + tgtNodesStr + '?</p>').css({
|
||||
'display': 'inline',
|
||||
'margin': '5px',
|
||||
'vertical-align': 'middle',
|
||||
'word-wrap': 'break-word'
|
||||
});
|
||||
|
||||
var style = {
|
||||
'display': 'inline-block',
|
||||
'margin': '5px',
|
||||
'vertical-align': 'middle'
|
||||
};
|
||||
|
||||
var dialog = $('<div></div>');
|
||||
var warn = createWarnBar('Are you sure you want to delete ' + tgtNodesStr + '?');
|
||||
dialog.append(warn);
|
||||
var icon = $('<span class="ui-icon ui-icon-alert"></span>').css(style);
|
||||
dialog.append(icon);
|
||||
dialog.append(confirmMsg);
|
||||
|
||||
// Open dialog
|
||||
dialog.dialog({
|
||||
|
@ -324,6 +324,7 @@ function createStatusBar(barId) {
|
||||
var hide = $('<span class="ui-icon ui-icon-minus"></span>').css({
|
||||
'display': 'inline-block',
|
||||
'float': 'right',
|
||||
'margin': '10px 5px',
|
||||
'cursor': 'pointer'
|
||||
}).click(function() {
|
||||
// Remove info box on-click
|
||||
@ -913,7 +914,7 @@ function changePassword() {
|
||||
// Change dialog buttons
|
||||
$('#changePassword').dialog('option', 'buttons', {
|
||||
'Close':function(){
|
||||
$('#changePassword').dialog('destroy').remove();
|
||||
$('#changePassword').dialog('close');
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -327,7 +327,7 @@ function isRootAcess() {
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp($_SESSION["username"], 'root') == 0 || strcmp($_SESSION["username"], 'admin') == 0) {
|
||||
if (strcmp($_SESSION["username"], 'root') == 0) {
|
||||
$_SESSION["xcatpassvalid"] = 1;
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,6 @@ sub provzlinux {
|
||||
my $disk_pool;
|
||||
my $eckd_size;
|
||||
my $fba_size;
|
||||
my $profile_conf = $profile;
|
||||
my $default_conf = "/var/opt/xcat/profiles/$profile.conf";
|
||||
my $default_direct = "/var/opt/xcat/profiles/$profile.direct";
|
||||
|
||||
@ -146,24 +145,22 @@ sub provzlinux {
|
||||
println( $callback, "$profile.direct does not exist. Using default.direct to generate directory entry." );
|
||||
|
||||
# Exit if default.direct does not exist
|
||||
$default_direct = "/var/opt/xcat/profiles/default.direct";
|
||||
$default_conf = "/var/opt/xcat/profiles/default.conf";
|
||||
$profile_conf = "default";
|
||||
if ( !(`test -e $default_direct && echo Exists`) ) {
|
||||
println( $callback, "(Error) $default_direct does not exists" );
|
||||
$default_direct = '/var/opt/xcat/profiles/default.direct';
|
||||
if ( !(`test -e /var/opt/xcat/profiles/default.direct && echo Exists`) ) {
|
||||
println( $callback, '(Error) $default_direct does not exists' );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
# Exit if default.conf does not exist
|
||||
if ( !(`test -e $default_conf && echo Exists`) ) {
|
||||
println( $callback, "(Error) $default_conf does not exists" );
|
||||
println( $callback, '(Error) $default_conf does not exists' );
|
||||
return;
|
||||
}
|
||||
|
||||
# Exit if default.direct does not exist
|
||||
if ( !(`test -e $default_direct && echo Exists`) ) {
|
||||
println( $callback, "(Error) $default_direct does not exists" );
|
||||
println( $callback, '(Error) $default_direct does not exists' );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -174,9 +171,9 @@ sub provzlinux {
|
||||
# Configuration for virtual machines
|
||||
# default_diskpool=POOL3
|
||||
# default_eckd_size=10016
|
||||
my $profile_diskpool_parm = $profile_conf . "_diskpool";
|
||||
my $profile_eckd_size_parm = $profile_conf . "_eckd_size";
|
||||
my $profile_fba_size_parm = $profile_conf . "_fba_size";
|
||||
my $profile_diskpool_parm = $profile . "_diskpool";
|
||||
my $profile_eckd_size_parm = $profile . "_eckd_size";
|
||||
my $profile_fba_size_parm = $profile . "_fba_size";
|
||||
my $default_disk_pool;
|
||||
my $default_eckd_size;
|
||||
my $default_fba_size;
|
||||
@ -199,7 +196,7 @@ sub provzlinux {
|
||||
|
||||
# Use default configuration if profile configuration does not exist
|
||||
if (!$disk_pool && (!$eckd_size || !$fba_size)) {
|
||||
println( $callback, "(Error) $profile_conf configuration for disk pool and size does not exist" );
|
||||
println( $callback, "(Error) $profile configuration for disk pool and size does not exist" );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -233,7 +230,7 @@ sub provzlinux {
|
||||
$out = `mkdef -t node -o $node userid=$userid hcp=$hcp mgt=zvm groups=$group`;
|
||||
} else {
|
||||
# Put node in all group
|
||||
$out = `mkdef -t node -o $node userid=$userid hcp=$hcp mgt=zvm groups=$group`;
|
||||
$out = `mkdef -t node -o $node userid=$userid hcp=$hcp mgt=zvm groups=$group,all`;
|
||||
}
|
||||
println( $callback, "$out" );
|
||||
|
||||
|
@ -108,26 +108,6 @@ $::base_repodir = $::build_dir."/kit_repodir";
|
||||
value_desc=>'Must be: OS Type String',
|
||||
mandatory=>1,
|
||||
cp_to_kitconfig=>1},
|
||||
osbasename => {
|
||||
description=>'The kit OS basename',
|
||||
value_desc=>'Must be: Generic Name String',
|
||||
mandatory=>0,
|
||||
cp_to_kitconfig=>0},
|
||||
osmajorversion => {
|
||||
description=>'The kit OS majorversion',
|
||||
value_desc=>'Must be: Generic Name String',
|
||||
mandatory=>0,
|
||||
cp_to_kitconfig=>0},
|
||||
osminorversion => {
|
||||
description=>'The kit OS minorversion',
|
||||
value_desc=>'Must be: Generic Name String',
|
||||
mandatory=>0,
|
||||
cp_to_kitconfig=>0},
|
||||
osarch => {
|
||||
description=>'The kit OS architecture',
|
||||
value_desc=>'Must be: Generic Name String',
|
||||
mandatory=>0,
|
||||
cp_to_kitconfig=>0},
|
||||
isinternal=> {
|
||||
description=>'Flag to say if this Kit is used for internal use only. It is only used for information purposes.',
|
||||
value_desc=>'Must be: empty string or boolean string',
|
||||
@ -951,8 +931,7 @@ sub kit_cleantar
|
||||
$kitfilename = $::bldkit_config->{kit}{entries}[0]->{kittarfilename};
|
||||
$kitfilename =~ s/tar\.bz2\s*$//;
|
||||
}
|
||||
my $findcmd = "find $::current_dir -name \"$kitfilename.\*tar.bz2\"";
|
||||
my $tarfile = `$findcmd`;
|
||||
my $tarfile = `find $::current_dir -name $kitfilename.*tar.bz2`;
|
||||
chomp ($tarfile);
|
||||
if ( -r $tarfile ) {
|
||||
if ( system("rm -f $tarfile ") ) {
|
||||
@ -997,9 +976,6 @@ sub kit_cleanall
|
||||
{
|
||||
|
||||
print "running buildkit cleanall... \n";
|
||||
|
||||
&kit_cleantar;
|
||||
|
||||
if ( -d $::build_dir ) {
|
||||
if ( system("rm -Rf $::build_dir/* ") ) {
|
||||
print "Error removing contents of $::build_dir \n";
|
||||
@ -1017,7 +993,6 @@ sub kit_cleanall
|
||||
system("rm -Rf $::workdir/debbuild");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -1249,28 +1224,7 @@ sub validate_bldkitconf
|
||||
if (defined($::bldkit_config->{kit}{entries}[0]->{release})) {
|
||||
$full_kitname .= '-'.$::bldkit_config->{kit}{entries}[0]->{release};
|
||||
}
|
||||
my $short_kitname = $full_kitname;
|
||||
if (defined($::bldkit_config->{kit}{entries}[0]->{osbasename})) {
|
||||
$full_kitname .= '-'.$::bldkit_config->{kit}{entries}[0]->{osbasename};
|
||||
}
|
||||
if (defined($::bldkit_config->{kit}{entries}[0]->{osmajorversion})) {
|
||||
if ( ! defined($::bldkit_config->{kit}{entries}[0]->{osbasename})) {
|
||||
print "Error: Kit osmajorversion attribute was specified but Kit osbasename was not set. \n";
|
||||
return 1;
|
||||
}
|
||||
$full_kitname .= '-'.$::bldkit_config->{kit}{entries}[0]->{osmajorversion};
|
||||
}
|
||||
if (defined($::bldkit_config->{kit}{entries}[0]->{osminorversion})) {
|
||||
if ( ( ! defined($::bldkit_config->{kit}{entries}[0]->{osbasename})) ||
|
||||
( ! defined($::bldkit_config->{kit}{entries}[0]->{osmajorversion}))) {
|
||||
print "Error: Kit osminorversion attribute was specified but either Kit osbasename or Kit osmajorversion were not set. \n";
|
||||
return 1;
|
||||
}
|
||||
$full_kitname .= '-'.$::bldkit_config->{kit}{entries}[0]->{osminorversion};
|
||||
}
|
||||
if (defined($::bldkit_config->{kit}{entries}[0]->{osarch})) {
|
||||
$full_kitname .= '-'.$::bldkit_config->{kit}{entries}[0]->{osarch};
|
||||
}
|
||||
$full_kitname .= '-'.$::bldkit_config->{kit}{entries}[0]->{ostype};
|
||||
$::bldkit_config->{kit}{entries}[0]->{kitname} = $full_kitname;
|
||||
$::deploy_dir .= "/".$full_kitname;
|
||||
|
||||
@ -1357,32 +1311,12 @@ sub validate_bldkitconf
|
||||
|
||||
# Kitrepo checks
|
||||
foreach my $kr (@{$::bldkit_config->{kitrepo}{entries}}) {
|
||||
my $reponame = $short_kitname;
|
||||
if ((defined($::bldkit_config->{kit}{entries}[0]->{osbasename})) &&
|
||||
($::bldkit_config->{kit}{entries}[0]->{osbasename} ne
|
||||
$kr->{osbasename} ) ) {
|
||||
print "Warning: Kit osbasename is set to \"$::bldkit_config->{kit}{entries}[0]->{osbasename}\", but this does not match kitrepo $kr->{kitrepoid} osbasename \"$kr->{osbasename}\". Processing will continue, but verify that you do not have an error in your buildkit configuration file. \n";
|
||||
}
|
||||
$reponame .= '-'.$kr->{osbasename};
|
||||
if ( (defined($::bldkit_config->{kit}{entries}[0]->{osmajorversion})) &&
|
||||
($::bldkit_config->{kit}{entries}[0]->{osmajorversion} ne
|
||||
$kr->{osmajorversion} ) ) {
|
||||
print "Warning: Kit osmajorversion is set to \"$::bldkit_config->{kit}{entries}[0]->{osmajorversion}\", but this does not match kitrepo $kr->{kitrepoid} osmajorversion \"$kr->{osmajorversion}\". Processing will continue, but verify that you do not have an error in your buildkit configuration file. \n";
|
||||
}
|
||||
my $reponame = $full_kitname;
|
||||
$reponame .= '_'.$kr->{osbasename};
|
||||
$reponame .= '-'.$kr->{osmajorversion};
|
||||
if (defined($kr->{osminorversion})){
|
||||
if ( (defined($::bldkit_config->{kit}{entries}[0]->{osminorversion})) &&
|
||||
($::bldkit_config->{kit}{entries}[0]->{osminorversion} ne
|
||||
$kr->{osminorversion} ) ) {
|
||||
print "Warning: Kit osminorversion is set to \"$::bldkit_config->{kit}{entries}[0]->{osminorversion}\", but this does not match kitrepo $kr->{kitrepoid} osminorversion \"$kr->{osminorversion}\". Processing will continue, but verify that you do not have an error in your buildkit configuration file. \n";
|
||||
}
|
||||
$reponame .= '.'.$kr->{osminorversion};
|
||||
}
|
||||
if ( (defined($::bldkit_config->{kit}{entries}[0]->{osarch})) &&
|
||||
($::bldkit_config->{kit}{entries}[0]->{osarch} ne
|
||||
$kr->{osarch} ) ) {
|
||||
print "Warning: Kit osarch is set to \"$::bldkit_config->{kit}{entries}[0]->{osarch}\", but this does not match kitrepo $kr->{kitrepoid} osarch \"$kr->{osarch}\". Processing will continue, but verify that you do not have an error in your buildkit configuration file. \n";
|
||||
}
|
||||
$reponame .= '-'.$kr->{osarch};
|
||||
$kr->{kitreponame} = $reponame;
|
||||
}
|
||||
@ -1963,7 +1897,7 @@ sub build_kitcomp
|
||||
print "Error running rpmbuild command for kit component $comp->{kitcompname} meta package\n";
|
||||
return 1;
|
||||
}
|
||||
my @built_rpms = `find $rpmbuild_dir/RPMS -name "*.rpm"`;
|
||||
my @built_rpms = `find $rpmbuild_dir/RPMS -name *.rpm`;
|
||||
foreach my $rpm (@built_rpms) {
|
||||
chomp($rpm);
|
||||
if ( system ("cp -fp $rpm $repodir") ) {
|
||||
@ -2011,7 +1945,7 @@ sub update_kitcomp_kitpkgdeps
|
||||
if ( $d_short eq $d ) {
|
||||
# no version-release comparisons specified for this kitpkgdep
|
||||
# do we have an rpm file in the repo?
|
||||
my $cmd = "rpm -q --qf \"%{NAME} >= %{VERSION}-%{RELEASE},\" -p $repodir/$d-\[0-9\]\*.rpm 2>/dev/null";
|
||||
my $cmd = "rpm -q --qf \"%{NAME} >= %{VERSION}-%{RELEASE},\" -p $repodir/$d-*.rpm 2>/dev/null";
|
||||
if ($::VERBOSE) {
|
||||
print "running rpm query to get version-release info: \n $cmd \n";
|
||||
}
|
||||
@ -2210,7 +2144,7 @@ sub build_kitcomp_debian{
|
||||
return 1;
|
||||
}
|
||||
my $repodir = $::base_repodir."/".$repo{kitreponame};
|
||||
my @builtdebs = `find $::workdir/debbuild -maxdepth 1 -name "*.deb"`;
|
||||
my @builtdebs = `find $::workdir/debbuild -maxdepth 1 -name *.deb`;
|
||||
foreach my $deb (@builtdebs) {
|
||||
chomp($deb);
|
||||
if ( system ("cp -fp $deb $repodir") ) {
|
||||
@ -2497,7 +2431,6 @@ sub create_kitconf
|
||||
my @lines;
|
||||
my $li=0;
|
||||
$lines[$li++] = "# Kit Configuration File for $kitname generated by buildkit\n";
|
||||
$lines[$li++] = "kitbuildinfo: \n";
|
||||
my $xCAT_buildkit_version = '';
|
||||
if ( $debianflag ){
|
||||
$xCAT_buildkit_version = `dpkg-query --show -f='\${Version}' xcat-buildkit`;
|
||||
@ -2505,10 +2438,8 @@ sub create_kitconf
|
||||
else{
|
||||
$xCAT_buildkit_version = `rpm -q --qf \"%{VERSION}-%{RELEASE}\" xCAT-buildkit`;
|
||||
}
|
||||
$lines[$li++] = " xCAT_version = $xCAT_buildkit_version \n";
|
||||
$lines[$li++] = " build_date = ".localtime()."\n";
|
||||
$lines[$li++] = " kitframework = 1 \n";
|
||||
$lines[$li++] = " compatible_kitframeworks = 0,1 \n";
|
||||
$lines[$li++] = "# kit_built_by_xCAT_version: $xCAT_buildkit_version \n";
|
||||
$lines[$li++] = "# kit_built_on: ".localtime()."\n";
|
||||
foreach my $s ('kit','kitrepo','kitcomponent','EXTERNALPKG', 'NONNATIVEPKGS') {
|
||||
foreach my $se (@{$::kit_config->{$s}{entries}}) {
|
||||
$lines[$li++] = "$s: \n";
|
||||
@ -2647,11 +2578,7 @@ sub create_builddir
|
||||
|
||||
foreach my $plugin (<$::workdir/plugins/*.pm>){
|
||||
my $plugin_base = basename($plugin);
|
||||
my $mod_kitname = $kitname;
|
||||
$mod_kitname =~ s/\-/\_/g;
|
||||
$mod_kitname =~ s/\./\_/g;
|
||||
my $to_plugin = $plugin_dir."/".$mod_kitname."_".$plugin_base;
|
||||
|
||||
my $to_plugin = $plugin_dir."/".$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";
|
||||
@ -2996,9 +2923,6 @@ sub kit_addpkgs
|
||||
return &NEW_kit_addpkgs($tmpdir_base,$tmpdir);
|
||||
}
|
||||
|
||||
### OLD KITS BUILT PRIOR TO xCAT 2.8.1
|
||||
### this code will eventually become obsolete and should be removed
|
||||
### do not update
|
||||
if (defined($::KITVERSION) || defined($::KITRELEASE)) {
|
||||
print "kitversion and kitrelease substitution is not supported for this incomplete kit. Run \"buildkit addpkgs\" without the \"-k|--kitversion\" and \"-r| --kitrelease\" options. \n";
|
||||
exit 1;
|
||||
@ -3160,7 +3084,7 @@ sub kit_addpkgs
|
||||
print "error running debian build cmd for kit component $non_native_basename meta package.\n";
|
||||
return 1;
|
||||
}
|
||||
my @debs = `find $tdir -maxdepth 1 -name "*.deb"`;
|
||||
my @debs = `find $tdir -maxdepth 1 -name *.deb`;
|
||||
foreach my $debname (@debs){
|
||||
chomp($debname);
|
||||
if ( system("mv -f $debname $repodir") ){
|
||||
@ -3210,7 +3134,7 @@ sub kit_addpkgs
|
||||
}
|
||||
|
||||
# Copy the built meta rpm to repo
|
||||
my @built_rpms = `find $rpmbuild_dir/RPMS -name "*.rpm"`;
|
||||
my @built_rpms = `find $rpmbuild_dir/RPMS -name *.rpm`;
|
||||
foreach my $rpm (@built_rpms) {
|
||||
chomp($rpm);
|
||||
if ( system ("cp -fp $rpm $repodir") ) {
|
||||
|
@ -28,7 +28,7 @@
|
||||
kit:
|
||||
basename=chef
|
||||
description=Kit for installing chef server, client and workstation
|
||||
version=11.4.0
|
||||
version=1.0
|
||||
release=1
|
||||
ostype=Linux
|
||||
kitlicense=EPL
|
||||
@ -126,34 +126,34 @@ kitrepo:
|
||||
kitcomponent:
|
||||
basename=chef_server_kit
|
||||
description=For installing chef server
|
||||
version=11.0.6
|
||||
version=1.0
|
||||
release=1
|
||||
serverroles=mgtnode
|
||||
kitrepoid=rhels6_x86_64
|
||||
kitpkgdeps=chef-server
|
||||
postinstall=server.rpm_post
|
||||
#postinstall=server.post
|
||||
postbootscripts=server.post
|
||||
|
||||
kitcomponent:
|
||||
basename=chef_client_kit
|
||||
description=For installing chef client
|
||||
version=11.4.0
|
||||
version=1.0
|
||||
release=1
|
||||
serverroles=compute
|
||||
kitrepoid=rhels6_x86_64
|
||||
kitpkgdeps=chef
|
||||
postinstall=client.rpm_post
|
||||
#postinstall=client.post
|
||||
postbootscripts=client.post
|
||||
|
||||
kitcomponent:
|
||||
basename=chef_workstation_kit
|
||||
description=For installing chef workstation
|
||||
version=11.4.0
|
||||
version=1.0
|
||||
release=1
|
||||
serverroles=compute
|
||||
kitrepoid=rhels6_x86_64
|
||||
kitpkgdeps=chef
|
||||
postinstall=workstation.rpm_post
|
||||
#postinstall=workstation.post
|
||||
postbootscripts=workstation.post
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
#-------------------------------------------------------------------------------
|
||||
#=head1 client.post
|
||||
#=head2 This command configures the chef client on a xCAT node. It is used
|
||||
# as a postbootscript for chef_client kit
|
||||
# as a post installation script for chef_client_kit.rpm.
|
||||
#=cut
|
||||
#-------------------------------------------------------------------------------
|
||||
if [ "$NODESETSTATE" = "install" ]; then
|
||||
|
@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#=head1 client.post
|
||||
#=head2 This command configures the chef client on a xCAT node. It is used
|
||||
# as a post installation script for chef_client_kit.rpm
|
||||
#=cut
|
||||
#-------------------------------------------------------------------------------
|
||||
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
|
||||
#configure the chef client configuration files
|
||||
/xcatpost/config_chef_client "$@"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
#-------------------------------------------------------------------------------
|
||||
#=head1 server.post
|
||||
#=head2 This command configures the chef server on a xCAT server or node.
|
||||
# It is used as a postbootscript for chef_server kit
|
||||
# It is used as a post install script for chef_server_kit.rpm
|
||||
#=cut
|
||||
#-------------------------------------------------------------------------------
|
||||
if [ "$NODESETSTATE" = "install" ]; then
|
||||
|
@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#=head1 server.post
|
||||
#=head2 This command configures the chef server on a xCAT server or node.
|
||||
# It is used as a post install script for chef_server_kit.rpm
|
||||
#=cut
|
||||
#-------------------------------------------------------------------------------
|
||||
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
|
||||
#Now configure the chef server
|
||||
/xcatpost/config_chef_server
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -5,7 +5,7 @@
|
||||
#-------------------------------------------------------------------------------
|
||||
#=head1 workstation.post
|
||||
#=head2 This command configures the chef workstation on a xCAT node. It is used
|
||||
# as a postbootscript for chef_workstation kit
|
||||
# as a post installation script for chef_workstation_kit.rpm.
|
||||
#=cut
|
||||
#-------------------------------------------------------------------------------
|
||||
if [ "$NODESETSTATE" = "install" ]; then
|
||||
|
@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#=head1 workstation.post
|
||||
#=head2 This command configures the chef workstation on a xCAT node. It is used
|
||||
# as a post installation script for chef_workstation_kit.rpm
|
||||
#=cut
|
||||
#-------------------------------------------------------------------------------
|
||||
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
|
||||
#configure the chef workstation configuration files
|
||||
/xcatpost/config_chef_workstation "$@"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,306 @@
|
||||
# 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=ILAN
|
||||
# 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
|
||||
|
@ -0,0 +1,14 @@
|
||||
./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*
|
@ -0,0 +1,175 @@
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,251 @@
|
||||
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
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
|
||||
#!/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
|
||||
~
|
@ -0,0 +1,15 @@
|
||||
|
||||
#!/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
|
||||
~
|
@ -0,0 +1,15 @@
|
||||
|
||||
#!/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
|
||||
~
|
@ -0,0 +1,15 @@
|
||||
|
||||
#!/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
|
||||
~
|
@ -0,0 +1,15 @@
|
||||
|
||||
#!/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
|
||||
~
|
@ -0,0 +1,15 @@
|
||||
|
||||
#!/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
|
||||
~
|
@ -0,0 +1,26 @@
|
||||
#!/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
|
||||
|
||||
|
@ -0,0 +1,327 @@
|
||||
# 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=ILAN
|
||||
# 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
|
||||
|
@ -0,0 +1,14 @@
|
||||
./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
|
||||
|
@ -0,0 +1,175 @@
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,251 @@
|
||||
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
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
|
||||
#!/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
|
@ -0,0 +1,14 @@
|
||||
|
||||
#!/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
|
@ -0,0 +1,14 @@
|
||||
|
||||
#!/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
|
@ -0,0 +1,14 @@
|
||||
|
||||
#!/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
|
@ -0,0 +1,14 @@
|
||||
|
||||
#!/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
|
@ -0,0 +1,14 @@
|
||||
|
||||
#!/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
|
@ -0,0 +1,26 @@
|
||||
#!/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
|
||||
|
||||
|
@ -0,0 +1,340 @@
|
||||
# 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=ILAN
|
||||
# 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=
|
||||
|
@ -0,0 +1,14 @@
|
||||
./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
|
||||
|
@ -0,0 +1,175 @@
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,251 @@
|
||||
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
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
|
||||
#!/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
|
@ -0,0 +1,14 @@
|
||||
|
||||
#!/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
|
@ -0,0 +1,14 @@
|
||||
|
||||
#!/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
|
@ -0,0 +1,14 @@
|
||||
|
||||
#!/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
|
@ -0,0 +1,14 @@
|
||||
|
||||
#!/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
|
@ -0,0 +1,14 @@
|
||||
|
||||
#!/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
|
@ -0,0 +1,26 @@
|
||||
#!/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
|
||||
|
||||
|
294
xCAT-buildkit/share/xcat/kits/kit_build/essl/essl/buildkit.conf
Normal file
294
xCAT-buildkit/share/xcat/kits/kit_build/essl/essl/buildkit.conf
Normal file
@ -0,0 +1,294 @@
|
||||
# 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=ILAN
|
||||
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=
|
@ -0,0 +1 @@
|
||||
#ENV:IBM_ESSL_LICENSE_ACCEPT=yes#
|
@ -0,0 +1,6 @@
|
||||
./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_*
|
||||
|
@ -0,0 +1,175 @@
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,251 @@
|
||||
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
|
||||
}
|
||||
|
@ -0,0 +1,294 @@
|
||||
# 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=ILAN
|
||||
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
|
||||
|
@ -0,0 +1 @@
|
||||
#ENV:IBM_ESSL_LICENSE_ACCEPT=yes#
|
@ -0,0 +1,11 @@
|
||||
./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
|
||||
|
||||
|
@ -0,0 +1,175 @@
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,251 @@
|
||||
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
|
||||
}
|
||||
|
@ -0,0 +1,330 @@
|
||||
# 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
|
@ -0,0 +1,3 @@
|
||||
./usr/lpp/mmfs/include*
|
||||
./usr/lpp/mmfs/samples*
|
||||
|
@ -0,0 +1,65 @@
|
||||
#!/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
|
||||
|
||||
|
||||
|
@ -0,0 +1,65 @@
|
||||
#!/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
|
||||
|
||||
|
||||
|
@ -0,0 +1,38 @@
|
||||
#!/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
|
@ -0,0 +1,11 @@
|
||||
#!/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
|
||||
|
@ -0,0 +1,13 @@
|
||||
#!/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
|
@ -0,0 +1,5 @@
|
||||
# Exclude list for building a minimal diskless image
|
||||
|
||||
./usr/lpp/mmfs/include*
|
||||
./usr/lpp/mmfs/samples*
|
||||
./usr/lpp/mmfs/src*
|
@ -0,0 +1,175 @@
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,251 @@
|
||||
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
|
||||
}
|
||||
|
@ -0,0 +1,38 @@
|
||||
#!/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
|
@ -0,0 +1,11 @@
|
||||
#!/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
|
||||
|
@ -0,0 +1,84 @@
|
||||
#!/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
|
||||
|
||||
|
||||
|
@ -0,0 +1,84 @@
|
||||
#!/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
|
||||
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
|
||||
echo "running sample-comp1 post script"
|
||||
|
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
echo "running sample-comp1 postboot script"
|
||||
|
@ -0,0 +1,3 @@
|
||||
|
||||
echo "running sample-comp1 postun script"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user