-Add rinstall and winstall client commands, no server side changes

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1447 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-05-19 19:05:54 +00:00
parent cd6baf65a9
commit ca60c1c8a2
4 changed files with 158 additions and 0 deletions

50
xCAT-client-2.0/bin/rinstall Executable file
View File

@ -0,0 +1,50 @@
#!/usr/bin/env perl
use strict;
use Getopt::Long;
use File::Basename;
sub usage {
print basename($0)." usage:\n";
print " ".basename($0)." [-o|--osver [-p|--profile] [-a|--arch] [-c|--console] <noderange>\n"
}
my $OSVER;
my $PROFILE;
my $ARCH;
my $CONSOLE;
unless (GetOptions(
'o|osver=s' => \$OSVER,
'p|profile=s' => \$PROFILE,
'a|arch=s' => \$ARCH,
'c|console' => \$CONSOLE
)) {
usage;
exit 1;
}
my $noderange=join(',',@ARGV);
my $nodechline = "";
if ($OSVER) {
$nodechline = "nodetype.os=$OSVER";
}
if ($PROFILE) {
$nodechline .= " nodetype.profile=$PROFILE";
}
if ($ARCH) {
$nodechline .= " nodetype.arch=$ARCH";
}
my $rc;
if ($nodechline) {
$rc=system("nodech $noderange $nodechline");
}
if ($rc) { die "nodech failure" };
$rc=system("nodeset $noderange install");
if ($rc) { die "nodeset failure" };
$rc=system("rpower $noderange boot");
if ($rc) { die "rpower failure" };
if (basename($0) =~ /rinstall/) {
if ($CONSOLE) {
exec("rcons $noderange");
}
} elsif (basename($0) =~ /winstall/) {
exec("wcons $noderange");
}

View File

@ -0,0 +1 @@
rinstall

View File

@ -0,0 +1,59 @@
=head1 Name
B<rinstall> - Begin installation on a noderange
=head1 B<Synopsis>
B<rinstall> [I<-o>|I<--osver>] [I<-p>|I<--profile>] [I<-a>|I<--arch>] [I<-c>|I<--console>] [I<noderange>]
=head1 B<Description>
B<rinstall> is a convience command that will change tables as requested for operating system version, profile, and architecture, call nodeset to modify the network boot configuration, and rpower to begin a boot cycle. If -c is specified, it will then become the
text console of the node. If wanting consoles on multiple nodes with a similar command, see L<winstall(8)|winstall.8>.
=head1 B<Options>
=over 7
=item B<-o>|B<--osver>
Specifies which os version to install. If unspecified, the current table values are used.
=item B<-p>|B<--profile>
Specifies what profile should be used of the operating system. If not specified the tables are used as is.
=item B<-a>|B<--arch>
Specifies what architecture of the OS to install. Typically this is unneeded, but if provisioning betweer x86_64 and x86 frequently, this may be a useful flag.
=item B<-c>|B<--console>
Requests that rinstall become rcons once the install commences. This will only work if there is only one node in the noderange. See L<winstall(8)|winstall.8> for consoles on multiple systems.
=back
=head1 B<Examples>
B<rinstall> I<node1-node20>
Install nodes 1 through 20, using configuration as is from tables.
B<rinstall> -o rhels5.1 -p compute I<node1-node20>
Install nodes 1 through 20, forcing rhels5.1 and compute profile.
B<rinstall> -c I<node1>
Install node1 and start a console to monitor the process
=head1 B<Author>
Jarrod B Johnson <jbjohnso@us.ibm.com>
=head1 B<See> B<Also>
L<noderange(3)|noderange.3>, L<winstall(8)|winstall.8>, L<rcons(1)|rcons.1>

View File

@ -0,0 +1,48 @@
=head1 Name
B<rinstall> - Begin installation on a noderange
=head1 B<Synopsis>
B<winstall> [I<-o>|I<--osver>] [I<-p>|I<--profile>] [I<-a>|I<--arch>] [I<noderange>]
=head1 B<Description>
B<winstall> is a convience command that will change tables as requested for operating system version, profile, and architecture, call nodeset to modify the network boot configuration, and rpower to begin a boot cycle. It will then commence a wcons command to the
noderange for monitoring.
=head1 B<Options>
=over 7
=item B<-o>|B<--osver>
Specifies which os version to install. If unspecified, the current table values are used.
=item B<-p>|B<--profile>
Specifies what profile should be used of the operating system. If not specified the tables are used as is.
=item B<-a>|B<--arch>
Specifies what architecture of the OS to install. Typically this is unneeded, but if provisioning betweer x86_64 and x86 frequently, this may be a useful flag.
=head1 B<Examples>
B<winstall> I<node1-node20>
Install nodes 1 through 20, using configuration as is from tables.
B<winstall> -o rhels5.1 -p compute I<node1-node20>
Install nodes 1 through 20, forcing rhels5.1 and compute profile.
=head1 B<Author>
Jarrod B Johnson <jbjohnso@us.ibm.com>
=head1 B<See> B<Also>
L<noderange(3)|noderange.3>, L<rinstall(8)|rinstall.8>, L<wcons(1)|wcons.1>