mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-08-20 02:00:24 +00:00
Kickstart improvements for Centos templates (#3462)
* `pre.rh*` scripts: Whitespace cleanup * Whitespace cleanup * util-linux-ng back to util-linux in 2014 * Add Centos7 KVM template(based on rhels7) * Minor improvements to Centos7 compute template
This commit is contained in:
@@ -36,9 +36,8 @@ clearpart --all --initlabel
|
||||
#/boot really significant for this sort of setup nowadays?
|
||||
#part /boot --size 50 --fstype ext3
|
||||
%include /tmp/partitionfile
|
||||
#part swap --size 1024
|
||||
#part swap --size 1024
|
||||
#part / --size 1 --grow --fstype ext4
|
||||
#XCAT_PARTITION_END#
|
||||
|
||||
#RAID 0 /scr for performance
|
||||
#part / --size 1024 --ondisk sda
|
||||
@@ -69,6 +68,7 @@ clearpart --all --initlabel
|
||||
#part raid.41 --size 1 --grow --ondisk sda
|
||||
#part raid.42 --size 1 --grow --ondisk sdb
|
||||
#raid /scr --level 1 --device md4 raid.41 raid.42
|
||||
#XCAT_PARTITION_END#
|
||||
|
||||
#
|
||||
# bootloader config
|
||||
@@ -120,7 +120,7 @@ skipx
|
||||
#
|
||||
# perl -e 'print crypt("blah","Xa") . "\n";'p
|
||||
# openssl passwd -apr1 -salt xxxxxxxx password
|
||||
#
|
||||
#
|
||||
# where "blah" is your root password.
|
||||
#
|
||||
#rootpw --iscrypted XaLGAVe1C41x2
|
||||
@@ -128,7 +128,7 @@ skipx
|
||||
rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password#
|
||||
|
||||
#
|
||||
# NIS setup: auth --enablenis --nisdomain sensenet
|
||||
# NIS setup: auth --enablenis --nisdomain sensenet
|
||||
# --nisserver neptune --useshadow --enablemd5
|
||||
#
|
||||
# OR
|
||||
@@ -155,7 +155,7 @@ reboot
|
||||
{
|
||||
echo "Running Kickstart Pre-Installation script..."
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/pre.rh.rhels7#
|
||||
} >>/tmp/pre-install.log 2>&1
|
||||
} &>>/tmp/pre-install.log
|
||||
%end
|
||||
%post
|
||||
mkdir -p /var/log/xcat/
|
||||
@@ -166,5 +166,5 @@ EOF
|
||||
echo "Running Kickstart Post-Installation script..."
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.xcat#
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.rhels7#
|
||||
} >>/var/log/xcat/xcat.log 2>&1
|
||||
} &>>/var/log/xcat/xcat.log
|
||||
%end
|
||||
|
13
xCAT-server/share/xcat/install/centos/kvm.centos7.pkglist
Normal file
13
xCAT-server/share/xcat/install/centos/kvm.centos7.pkglist
Normal file
@@ -0,0 +1,13 @@
|
||||
#Please make sure there is a space between @ and group name
|
||||
libvirt
|
||||
net-snmp
|
||||
net-tools
|
||||
nfs-utils
|
||||
ntp
|
||||
openssh-server
|
||||
qemu-kvm
|
||||
rsync
|
||||
screen
|
||||
util-linux
|
||||
wget
|
||||
yp-tools
|
172
xCAT-server/share/xcat/install/centos/kvm.centos7.tmpl
Normal file
172
xCAT-server/share/xcat/install/centos/kvm.centos7.tmpl
Normal file
@@ -0,0 +1,172 @@
|
||||
#
|
||||
#cmdline
|
||||
|
||||
lang en_US
|
||||
#KICKSTARTNET#
|
||||
|
||||
#
|
||||
# Where's the source?
|
||||
# nfs --server hostname.of.server or IP --dir /path/to/RH/CD/image
|
||||
#
|
||||
#nfs --server #XCATVAR:INSTALL_NFS# --dir #XCATVAR:INSTALL_SRC_DIR#
|
||||
|
||||
%include /tmp/repos
|
||||
|
||||
#INSTALL_SOURCES#
|
||||
|
||||
#device ethernet e100
|
||||
keyboard "us"
|
||||
|
||||
#
|
||||
# Clear the MBR
|
||||
#
|
||||
zerombr
|
||||
|
||||
#
|
||||
# Wipe out the disk
|
||||
#
|
||||
# Clear partitioning via partitition file
|
||||
#clearpart --all --initlabel
|
||||
#clearpart --linux
|
||||
|
||||
#
|
||||
# Customize to fit your needs
|
||||
#
|
||||
|
||||
#XCAT_PARTITION_START#
|
||||
#Use script based partition table creation
|
||||
%include /tmp/partitionfile
|
||||
|
||||
#No RAID
|
||||
#/boot really significant for this sort of setup nowadays?
|
||||
#part /boot --size 50 --fstype ext3
|
||||
#part swap --size 1024
|
||||
#part / --size 1 --grow --fstype ext4
|
||||
|
||||
#RAID 0 /scr for performance
|
||||
#part / --size 1024 --ondisk sda
|
||||
#part swap --size 512 --ondisk sda
|
||||
#part /var --size 1024 --ondisk sdb
|
||||
#part swap --size 512 --ondisk sdb
|
||||
#part raid.01 --size 1 --grow --ondisk sda
|
||||
#part raid.02 --size 1 --grow --ondisk sdb
|
||||
#raid /scr --level 0 --device md0 raid.01 raid.02
|
||||
|
||||
#Full RAID 1 Sample
|
||||
#part raid.01 --size 50 --ondisk sda
|
||||
#part raid.02 --size 50 --ondisk sdb
|
||||
#raid /boot --level 1 --device md0 raid.01 raid.02
|
||||
#
|
||||
#part raid.11 --size 1024 --ondisk sda
|
||||
#part raid.12 --size 1024 --ondisk sdb
|
||||
#raid / --level 1 --device md1 raid.11 raid.12
|
||||
#
|
||||
#part raid.21 --size 1024 --ondisk sda
|
||||
#part raid.22 --size 1024 --ondisk sdb
|
||||
#raid /var --level 1 --device md2 raid.21 raid.22
|
||||
#
|
||||
#part raid.31 --size 1024 --ondisk sda
|
||||
#part raid.32 --size 1024 --ondisk sdb
|
||||
#raid swap --level 1 --device md3 raid.31 raid.32
|
||||
#
|
||||
#part raid.41 --size 1 --grow --ondisk sda
|
||||
#part raid.42 --size 1 --grow --ondisk sdb
|
||||
#raid /scr --level 1 --device md4 raid.41 raid.42
|
||||
#XCAT_PARTITION_END#
|
||||
|
||||
#
|
||||
# bootloader config
|
||||
# --append <args>
|
||||
# --useLilo
|
||||
# --md5pass <crypted MD5 password for GRUB>
|
||||
#
|
||||
#The bootloader config here is commented out
|
||||
#For user customized partition file or partition script,
|
||||
#the bootloader configuration should be specified in the user customized partition file/script
|
||||
#For the xCAT default partition scheme, the bootloader configuration is in /tmp/partitionfile
|
||||
#which is generated in %pre section
|
||||
##KICKSTARTBOOTLOADER#
|
||||
|
||||
#
|
||||
# install or upgrade
|
||||
#
|
||||
install
|
||||
|
||||
#
|
||||
# text mode install (default is graphical)
|
||||
#
|
||||
text
|
||||
|
||||
#
|
||||
# firewall
|
||||
#
|
||||
firewall --disabled
|
||||
|
||||
#
|
||||
# Select a zone
|
||||
# Add the --utc switch if your hardware clock is set to GMT
|
||||
#
|
||||
#timezone US/Hawaii
|
||||
#timezone US/Pacific
|
||||
#timezone US/Mountain
|
||||
#timezone US/Central
|
||||
#timezone US/Eastern
|
||||
timezone --utc "#TABLE:site:key=timezone:value#"
|
||||
|
||||
#
|
||||
# Don't do X
|
||||
#
|
||||
skipx
|
||||
|
||||
|
||||
#
|
||||
# To generate an encrypted root password use:
|
||||
#
|
||||
# perl -e 'print crypt("blah","Xa") . "\n";'p
|
||||
# openssl passwd -apr1 -salt xxxxxxxx password
|
||||
#
|
||||
# where "blah" is your root password.
|
||||
#
|
||||
#rootpw --iscrypted XaLGAVe1C41x2
|
||||
#rootpw XaLGAVe1C41x2 --iscrypted
|
||||
rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password#
|
||||
|
||||
#
|
||||
# NIS setup: auth --enablenis --nisdomain sensenet
|
||||
# --nisserver neptune --useshadow --enablemd5
|
||||
#
|
||||
# OR
|
||||
auth --useshadow --enablemd5
|
||||
|
||||
#
|
||||
# SE Linux
|
||||
#
|
||||
selinux --disabled
|
||||
|
||||
#
|
||||
# Reboot after installation
|
||||
#
|
||||
reboot
|
||||
|
||||
#
|
||||
#end of section
|
||||
#
|
||||
%packages
|
||||
#INCLUDE_DEFAULT_PKGLIST#
|
||||
%end
|
||||
%pre
|
||||
{
|
||||
echo "Running Kickstart Pre-Installation script..."
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/pre.rh.rhels7#
|
||||
} &>>/tmp/pre-install.log
|
||||
%end
|
||||
%post
|
||||
mkdir -p /var/log/xcat/
|
||||
{
|
||||
cat >> /var/log/xcat/xcat.log << "EOF"
|
||||
%include /tmp/pre-install.log
|
||||
EOF
|
||||
echo "Running Kickstart Post-Installation script..."
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.xcat#
|
||||
} &>>/var/log/xcat/xcat.log
|
||||
%end
|
@@ -76,13 +76,12 @@ clearpart --all --initlabel
|
||||
# --md5pass <crypted MD5 password for GRUB>
|
||||
#
|
||||
#The bootloader config here is commented out
|
||||
#For user customized partition file or partition script,
|
||||
#For user customized partition file or partition script,
|
||||
#the bootloader configuration should be specified in the user customized partition file/script
|
||||
#For the xCAT default partition scheme, the bootloader configuration is in /tmp/partitionfile
|
||||
#which is generated in %pre section
|
||||
##KICKSTARTBOOTLOADER#
|
||||
|
||||
|
||||
#
|
||||
# install or upgrade
|
||||
#
|
||||
|
@@ -6,7 +6,7 @@ net-snmp
|
||||
rsync
|
||||
yp-tools
|
||||
openssh-server
|
||||
util-linux-ng
|
||||
util-linux
|
||||
net-tools
|
||||
libvirt
|
||||
screen
|
||||
|
@@ -25,5 +25,5 @@ perl-DBD-MySQL
|
||||
mysql-connector-odbc
|
||||
perl-DBD-Pg
|
||||
wget
|
||||
util-linux-ng
|
||||
util-linux
|
||||
net-tools
|
||||
|
@@ -193,7 +193,6 @@ if [ -e "/tmp/xcat.install_disk" ]; then
|
||||
instdisk=`cat /tmp/xcat.install_disk`
|
||||
fi
|
||||
|
||||
|
||||
modprobe ext4 >& /dev/null
|
||||
modprobe ext4dev >& /dev/null
|
||||
if grep ext4dev /proc/filesystems > /dev/null; then
|
||||
@@ -211,7 +210,7 @@ if [ `uname -m` = "ppc64" ]; then
|
||||
fi
|
||||
if [ -d /sys/firmware/efi ]; then
|
||||
echo 'bootloader --driveorder='$instdisk >> /tmp/partitionfile
|
||||
echo 'part /boot/efi --size 50 --ondisk '$instdisk' --fstype '$EFIFSTYPE >> /tmp/partitionfile
|
||||
echo 'part /boot/efi --size 50 --ondisk '$instdisk' --fstype '$EFIFSTYPE >> /tmp/partitionfile
|
||||
else
|
||||
echo 'bootloader' >> /tmp/partitionfile
|
||||
fi
|
||||
|
@@ -149,7 +149,7 @@ fi
|
||||
shopt -s nullglob
|
||||
|
||||
#
|
||||
# The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu.
|
||||
# The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu.
|
||||
# It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk
|
||||
#
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/getinstdisk#
|
||||
@@ -180,7 +180,7 @@ if [ `uname -m` = "ppc64" -o `uname -m` = "ppc64le" ]; then
|
||||
echo 'part None --fstype "PPC PReP Boot" --ondisk '$instdisk' --size 8' >> /tmp/partitionfile
|
||||
fi
|
||||
if [ -d /sys/firmware/efi ]; then
|
||||
echo 'part /boot/efi --size 50 --ondisk '$instdisk' --fstype '$EFIFSTYPE >> /tmp/partitionfile
|
||||
echo 'part /boot/efi --size 50 --ondisk '$instdisk' --fstype '$EFIFSTYPE >> /tmp/partitionfile
|
||||
fi
|
||||
|
||||
#TODO: ondisk detection, /dev/disk/by-id/edd-int13_dev80 for legacy maybe, and no idea about efi. at least maybe blacklist SAN if mptsas/mpt2sas/megaraid_sas seen...
|
||||
|
Reference in New Issue
Block a user