mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-13 09:50:19 +00:00
enhancements for sle15 diskful CN deployment (#5605)
* add sle dir for copycds * remove HPC packages from sle15 template * copycds support ppc64le sle15 * support packages products for sle15 * create repos for all products in sle15 Package ISO * fix deployment status postbooting in sle15 * support sle15 * add copycds example for sle15 * generate add_on product * polished * adjust product_dir
This commit is contained in:
@ -8,6 +8,10 @@ XCAT use 'copycds' command to create an image which will be available to install
|
||||
If using an ISO, copy it to (or NFS mount it on) the management node, and then run: ::
|
||||
|
||||
copycds <path>/<specific-distro>.iso
|
||||
|
||||
**Note**: while sle15 contains installer medium and packages medium, need ``copycds`` copy all contents of DVD1 of the installer medium and DVD1 of the packages medium, for example: ::
|
||||
|
||||
copycds SLE-15-Installer-DVD-ppc64le-GM-DVD1.iso SLE-15-Packages-ppc64le-GM-DVD1.iso
|
||||
|
||||
If using a DVD, put it in the DVD drive of the management node and run: ::
|
||||
|
||||
|
@ -324,10 +324,28 @@ sub subvars {
|
||||
<name>SuSE-Linux-pkg$c</name> <!-- available since openSUSE 11.1/SLES11 (bnc#433981) -->
|
||||
</listentry>";
|
||||
$source_in_pre .= "<listentry><media_url>http://'\$nextserver'$pkgdir</media_url><product>SuSE-Linux-pkg$c</product><product_dir>/</product_dir><ask_on_error config:type=\"boolean\">false</ask_on_error><name>SuSE-Linux-pkg$c</name></listentry>";
|
||||
} elsif ($platform =~ /^sle15*/) {
|
||||
if ( -d "$pkgdir") {
|
||||
opendir(DIR,$pkgdir);
|
||||
my @subpkgdir=grep(!/\.\.?$|^media.1$/, readdir DIR);
|
||||
foreach my $subdir (@subpkgdir){
|
||||
my $product_name;
|
||||
my $product_dir;
|
||||
$product_dir=$subdir;
|
||||
if($subdir =~ /^Module-/){
|
||||
$product_name="sle-".lc($subdir);
|
||||
}elsif($subdir =~ /^Product-/){
|
||||
$subdir=~s/Product-//;
|
||||
$product_name=$subdir;
|
||||
}
|
||||
if (defined($product_name) && defined($product_dir)){
|
||||
$source .="<listentry><media_url>http://XCATNEXTSERVERHOOK$pkgdir</media_url><product>$product_name</product><product_dir>/$product_dir</product_dir></listentry>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$c++;
|
||||
}
|
||||
|
||||
$inc =~ s/#INSTALL_SOURCES#/$source/g;
|
||||
$inc =~ s/#INSTALL_SOURCES_IN_PRE#/$source_in_pre/g;
|
||||
if (("ubuntu" eq $platform) || ("debian" eq $platform)) {
|
||||
|
@ -937,7 +937,11 @@ sub mkinstall
|
||||
# trim the "/" in /install/sles11.3/x86_64/
|
||||
$pkgdir =~ s/\/$//;
|
||||
if ($pkgdir =~ /^($installroot\/$os\/$arch)$/) {
|
||||
$srcdirs[0] = "$pkgdir/1";
|
||||
if ( -d "$pkgdir/2") {
|
||||
$srcdirs[0] = "$pkgdir/1,$pkgdir/2";
|
||||
}else{
|
||||
$srcdirs[0] = "$pkgdir/1";
|
||||
}
|
||||
$tmppkgdir = join(",", @srcdirs);
|
||||
}
|
||||
|
||||
@ -1744,7 +1748,9 @@ sub copycd
|
||||
open($dinfo, $mntpath . "/media.1/media");
|
||||
my $dsc = <$dinfo>;
|
||||
if ($dsc =~ /x86_64/) {
|
||||
$darch = "x86_64";
|
||||
$darch = "x86_64";
|
||||
} elsif ($dsc =~ /ppc64le/) {
|
||||
$darch = "ppc64le" ;
|
||||
}
|
||||
if ($dsc =~ /Installer/ and $dsc =~ /SLE-15/) {
|
||||
$discnumber = 1;
|
||||
|
@ -1,2 +1,4 @@
|
||||
iputils
|
||||
vim
|
||||
openssl
|
||||
rsync
|
||||
|
@ -45,16 +45,12 @@
|
||||
</partitioning>
|
||||
<add-on>
|
||||
<add_on_products config:type="list">
|
||||
<listentry><media_url>http://XCATNEXTSERVERHOOK/install/sles15/x86_64/2</media_url><product>sle-module-basesystem</product><product_dir>/Module-Basesystem</product_dir></listentry>
|
||||
<listentry><media_url>http://XCATNEXTSERVERHOOK/install/sles15/x86_64/2</media_url><product>sle-module-hpc</product><product_dir>/Module-HPC</product_dir></listentry>
|
||||
<listentry><media_url>http://XCATNEXTSERVERHOOK/install/sles15/x86_64/2</media_url><product>sle-module-server-applications</product><product_dir>/Module-Server-Applications</product_dir></listentry>
|
||||
<listentry><media_url>http://XCATNEXTSERVERHOOK/install/sles15/x86_64/2</media_url><product>sle-module-server-applications</product><product_dir>/Module-Server-Applications</product_dir></listentry>
|
||||
<listentry><media_url>http://XCATNEXTSERVERHOOK/install/sles15/x86_64/2</media_url><product>SLE_HPC</product><product_dir>/Product-HPC</product_dir></listentry>
|
||||
#INSTALL_SOURCES#
|
||||
</add_on_products>
|
||||
</add-on>
|
||||
<software>
|
||||
<products config:type="list">
|
||||
<product>SLE_HPC</product>
|
||||
<product>SLES</product>
|
||||
</products>
|
||||
<patterns config:type="list">
|
||||
#INCLUDE_DEFAULT_PTRNLIST_S#
|
||||
|
@ -441,7 +441,8 @@ fi
|
||||
%post
|
||||
%ifos linux
|
||||
ln -sf $RPM_INSTALL_PREFIX0/sbin/xcatd /usr/sbin/xcatd
|
||||
|
||||
ln -sf $RPM_INSTALL_PREFIX0/share/xcat/install/sles $RPM_INSTALL_PREFIX0/share/xcat/install/sle
|
||||
ln -sf $RPM_INSTALL_PREFIX0/share/xcat/netboot/sles $RPM_INSTALL_PREFIX0/share/xcat/netboot/sle
|
||||
if [ "$1" = "1" ]; then #Only if installing for the first time..
|
||||
if [ -x /usr/lib/systemd/systemd ]; then
|
||||
/usr/bin/systemctl daemon-reload
|
||||
|
@ -256,7 +256,7 @@ do
|
||||
# (4) for other os, we just keep it here.
|
||||
# For other pkg paths, we just keep it here.
|
||||
if [ $dir == $default_pkgdir ] || [ $dir == "$default_pkgdir/" ]; then
|
||||
if ( pmatch "$OSVER" "sles*" ); then
|
||||
if ( pmatch "$OSVER" "sle*" ); then
|
||||
OSPKGDIR="$OSPKGDIR/1"
|
||||
ospkgdir="$ospkgdir/1"
|
||||
elif ( pmatch "$OSVER" "SL5*" ); then
|
||||
@ -265,7 +265,32 @@ do
|
||||
fi
|
||||
fi
|
||||
array_set_element os_path $index $ospkgdir
|
||||
|
||||
if [ $dir == $default_pkgdir ] || [ $dir == "$default_pkgdir/" ]; then
|
||||
ospkgdir=$(echo $ospkgdir|sed 's/\/1$/\/2/')
|
||||
if ( pmatch "$OSVER" "sle15*" ); then
|
||||
if [ $ARCH == "x86_64" ]; then
|
||||
for arg in "Product-SLES" "Module-Desktop-Applications" "Module-Live-Patching" \
|
||||
"Module-Web-Scripting" "Module-Basesystem" "Module-Development-Tools" "Module-Public-Cloud" \
|
||||
"Product-HA" "Product-SLES_SAP" "Module-CAP-Tools" "Module-HPC" "Module-SAP-Applications" \
|
||||
"Product-HPC" "Product-WE" "Module-Containers" "Module-Legacy" "Module-Server-Applications" "Product-SLED"
|
||||
do
|
||||
ospkgdir_ok="$ospkgdir/$arg"
|
||||
index=$(expr $index + 1)
|
||||
array_set_element os_path $index $ospkgdir_ok
|
||||
done
|
||||
elif [ $ARCH == "ppc64le" ]; then
|
||||
for arg in "Product-SLES" "Module-Desktop-Applications" "Module-Live-Patching" \
|
||||
"Module-Web-Scripting" "Module-Basesystem" "Module-Development-Tools" "Module-Public-Cloud" \
|
||||
"Product-HA" "Product-SLES_SAP" "Module-SAP-Applications" \
|
||||
"Module-Containers" "Module-Legacy" "Module-Server-Applications"
|
||||
do
|
||||
ospkgdir_ok="$ospkgdir/$arg"
|
||||
index=$(expr $index + 1)
|
||||
array_set_element os_path $index $ospkgdir_ok
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if ( pmatch "$OSVER" "rhel*" ); then
|
||||
#default_pkgdir="$INSTALLDIR/$OSVER/$ARCH"
|
||||
if [ $dir == $default_pkgdir ] || [ $dir == "$default_pkgdir/" ]; then
|
||||
@ -531,7 +556,7 @@ if ( pmatch "$OSVER" "sles10*" ); then
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
elif ( pmatch "$OSVER" "sles*" ); then
|
||||
elif ( pmatch "$OSVER" "sle*" ); then
|
||||
#check if zypper is installed
|
||||
result=`rpm -q zypper`
|
||||
if [ $? -ne 0 ]; then
|
||||
|
Reference in New Issue
Block a user