From: Frank Brehm Date: Tue, 19 May 2020 14:22:21 +0000 (+0200) Subject: Modifications to kickstart/pp_standard_centos8_vmware.ks X-Git-Tag: 2.1.2^2~9^2~35 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=ef2e10ee65751463e493a4287b1c2ae3028809ed;p=pixelpark%2Fcreate-vmware-tpl.git Modifications to kickstart/pp_standard_centos8_vmware.ks --- diff --git a/kickstart/pp_standard_centos8_vmware.ks b/kickstart/pp_standard_centos8_vmware.ks index 2c6ba1a..6ea1d87 100644 --- a/kickstart/pp_standard_centos8_vmware.ks +++ b/kickstart/pp_standard_centos8_vmware.ks @@ -1,15 +1,18 @@ ###################################################################################### -# Centos7.0 for Privisioning-Installation +# Centos8 for Privisioning-Installation ###################################################################################### -### standard pixelpark linux installation +# +# Standard Pixelpark Installation of CentOS 8 templates +# + # Firewall configuration firewall --disabled # Install OS instead of upgrade install # Use network installation -url --url="http://192.168.88.8/cobbler/ks_mirror/CentOS-7-x86_64/" +url --url="http://192.168.88.8/cobbler/ks_mirror/CentOS-8.1-x86_64/" # Root install-password -rootpw --iscrypted $1$ud/WLzVZ$GfIY5mqH1R9CbG3c5XKtS. +rootpw --iscrypted $6$hrjmntwc$Vt1K1JQghssQ0El1D.uzbEEGNizDT4aQEW/G..HErsvsGL3OEgU1Xyrg3uQ/nE/3ABFuyOM1eQc1RjHMV5oDv1 # System authorization information auth --useshadow --passalgo=sha512 # Use text mode install @@ -19,7 +22,7 @@ keyboard de # System language lang en_US # SELinux configuration -selinux --disabled +selinux --permissiv # Do not configure the X Window System skipx # Installation logging level @@ -28,44 +31,41 @@ logging --level=debug reboot # System timezone timezone Europe/Berlin + +########################################### +# Partitioning and Disk + # System bootloader configuration bootloader --location=mbr --append="net.ifnames=0 biosdevname=0" + # Partition clearing information clearpart --all --drive=sda -#clearpart --all + # Disk partitioning information part /boot --fstype ext4 --size=512 --ondisk=sda -part swap --size=8192 --ondisk=sda +part swap --size=512 --ondisk=sda part pv.01 --size=1 --grow --ondisk=sda volgroup vgroot pv.01 -logvol / --vgname=vgroot --name=root --size=1 --grow +logvol /home --vgname=vgroot --name=home --size=4096 +logvol / --vgname=vgroot --name=root --size=10240 +logvol /var --vgname=vgroot --name=var --size=1 --grow + +########################################## +# Repositories -# Disk Partitionierung /var mit eigener Festplatte -#part /boot --fstype ext4 --size=512 --ondisk=sda -#part swap --size=8192 --ondisk=sda -#part pv.01 --size=1 --grow --ondisk=sda -#part pv.02 --size=1 --grow --ondisk=sdb -#volgroup vgroot pv.01 -#logvol / --vgname=vgroot --name=root --size=1 --grow -#volgroup vgvar pv.02 -#logvol /var --vgname=vgvar --name=var --size=1 --grow +repo --name=pp-repo-os --baseurl=https://repo01.pixelpark.com/Linux/yum/centos/8/os/x86_64/ +repo --name=pp-repo-extras --baseurl=https://repo01.pixelpark.com/Linux/yum/centos/8/extras/x86_64/ +repo --name=pp-repo-updates --baseurl=https://repo01.pixelpark.com/Linux/yum/centos/8/updates/x86_64/ %packages @base -@hardware-monitoring -@java-platform -@large-systems -@network-file-system-client -@network-tools -@performance -@perl-runtime -@security-tools - - +wget +bind-utils +-*firmware %end -%post --log=/root/post-install.log +%post --interpreter=/usr/bin/bash ###################################################################################### @@ -74,167 +74,45 @@ logvol / --vgname=vgroot --name=root --size=1 --grow ### output to console -exec < /dev/console > /dev/console clear +POST_LOG="/var/log/post-install.log" +exec < /dev/console &> >(tee -a "$POST_LOG") ### debug +set -x echo "cobbler profile = $profile_name" -ifconfig -netstat -rn -ip a -ip r s + +echo +echo "IP interfaces" +ip link show + +echo +echo "IP addresses" +ip address show + +echo +echo "IPv4 routes" +ip route list + +echo +echo "IPv6 routes" +ip -6 route list + ### remove unnecessary directory rm -rf /var/var -export DOMAIN="`nslookup $hostname | grep $hostname | cut -d. -f2,3`" -export IP="`nslookup $hostname | grep "Address" | grep -v "#" | cut -d: -f2`" - -### make /etc/hosts entry -echo "# generated by pixelpark install server" > /etc/hosts -echo "127.0.0.1 localhost" >> /etc/hosts -echo "$ip_address_ether0 $system_name $hostname" >> /etc/hosts - -### set hostname entry -/usr/bin/hostnamectl set-hostname --static $hostname -/usr/bin/hostname > /etc/hostname - -### softdist access -mkdir /root/.ssh/ -echo "ssh-dss AAAAB3NzaC1kc3MAAACBAKDLJjA6G2vfqM55xaDspJetd/IUqWWExh3wyrroHY1+wUCF39Qj3kibUP5IfynjPWjVwrxB5JDEPnGdr1kiMO9mfXMiOVZMRcB26RLXfWjpuoXSR+aUKtzEiJv9s+0R3A4Xxj9Vzn5xcGVqU/X9o25Wjltvgp2QgR8OOPjj0PLfAAAAFQDtdQMaYrc70T6Tl+E9d2pAXjJfcwAAAIBVPIqPUg6jTRU6XJgudNtWlmWOD/GdU1nlaHsTm3rKDzQY9hAx+JMKg9ihimGCGdHxXNYQwEk8UnHe04GuKwEw7Lz3+w8x/o0VUBRAkjPAYt34nIO2r2RXEH8NZUBOHPjMng5aygavLlXYovtvlcA4TZsW0T5eqf/5zS3iWhwilAAAAIBrbamvXpY/cbsVDbkw6JmqFoVeOR0jro4a3+/+fDssUygSw+9fSSRAmoXxF1eXTtq28Wx5I5jBSEVYfwSh++3YT+y9cFsnClJ3OwA9JxIWy8JhmXbNdktn8msrIusjUbGjWhIIw7DLm1LMxLcWByR7f97z1MVdetAsGQB9sfxZzQ==" > /root/.ssh/authorized_keys - -### epel repo -yum install -y http://cobbler.pixelpark.com/custom/epel/7/x86_64/epel-release-7-5.noarch.rpm - -### installing perl-Config-IniFiles.noarch -yum install -y perl-Config-IniFiles.noarch - -### pull pixelpark TCSH config -cd /etc/ -wget http://192.168.88.8/custom/shell/linux_tcsh.tar -sleep 3 -tar -xvf /etc/linux_tcsh.tar -sleep 1 -mv /etc/.cshrc /etc/csh.cshrc -rm /etc/linux_tcsh.tar - -### make directories -mkdir -p /opt/PPlocal/bin -mkdir -p /opt/PPlocal/man -mkdir -p /opt/PPlocal/etc - -### disable ipv6 -echo "#disable ipv6" | tee -a /etc/sysctl.conf -echo "net.ipv6.conf.all.disable_ipv6 = 1" | tee -a /etc/sysctl.conf -echo "net.ipv6.conf.default.disable_ipv6 = 1" | tee -a /etc/sysctl.conf -echo "net.ipv6.conf.lo.disable_ipv6 = 1" | tee -a /etc/sysctl.conf - -### parallel lookups -echo "options single-request" | tee -a /etc/resolv.conf - -### use network instead of NetworkManager - -yum install -y NetworkManager NetworkManager-config-server -systemctl stop network -systemctl start NetworkManager -systemctl disable network -systemctl enable NetworkManager - -### remove iptables, disable firewalld - -yum remove -y install iptables iptables-services -systemctl stop firewalld -systemctl disable firewalld - -### VLAN -yum install -y vconfig - -### install additional software -yum install -y ksh tmux vim telnet curl - -### copy StorMan to /var/tmp/ -wget -O - http://192.168.88.8/custom/StorMan/StorMan.tar | tar -C /var/tmp -xvf - - -### generate initial /etc/motd -wget -qO- http://192.168.88.8/custom/pp-scripts/mk_create_motd.ksh | ksh > /etc/motd - -### puppet -wget -P /var/tmp http://192.168.88.8/custom/puppet/puppet-rollout.sh -chmod u+x /var/tmp/puppet-rollout.sh -/var/tmp/puppet-rollout.sh -systemctl enable puppet - -### vmware tools -yum install -y open-vm-tools -cd /var/tmp/ -wget http://192.168.88.8/custom/VMware/tools/VMwareTools.tar.gz -tar -xvf VMwareTools.tar.gz -cd vmware-tools-distrib -./vmware-install.pl -d - -yum remove -y open-vm-tools -sleep 5 -./vmware-install.pl -d - -systemctl status vmware-tools.service -systemctl start vmware-tools.service -systemctl enable vmware-tools - -### install Legato Networker -yum install -y http://192.168.88.8/custom/legato/lgtoclnt-8.2.0.1-1.x86_64.rpm -yum install -y http://192.168.88.8/custom/legato/lgtoman-8.2.0.1-1.x86_64.rpm -mkdir -p /nsr/res -echo "legato01.pixelpark.com" > /nsr/res/servers -systemctl start networker -systemctl stop networker -systemctl enable networker - -### NTP -systemctl stop chronyd -yum remove -y chrony -yum install -y ntp -mkdir -p /etc/ntp -cat << EOF > /etc/ntp.conf -tinker panic 0 -driftfile /var/lib/ntp/drift -# Permit time synchronization with our time source, but do not -# permit the source to query or modify the service on this system. -restrict default kod nomodify notrap nopeer noquery -restrict -6 default kod nomodify notrap nopeer noquery -restrict 127.0.0.1 -restrict -6 ::1 -server time01.pixelpark.com iburst -server time02.pixelpark.com iburst -server time03.pixelpark.com iburst -EOF -cat << EOF > /etc/ntp/step-tickers -time01.pixelpark.com -time02.pixelpark.com -time03.pixelpark.com -EOF -systemctl enable ntpd -systemctl restart ntpd - -### exclude MySQL server -### we need this to be able to install MariaDB, which would otherwise -### always be superseded by the higher MySQL version - -echo "exclude=mysql-community*" >> /etc/yum.conf - -### remove unnecessary packages -yum remove -y deltarpm nfs* rpcbind postfix - -### set search domains in /etc/resolv.conf -echo "search pixelpark.com pixelpark.net" >> /etc/resolv.conf - -### run check script to verify our provisioning - -wget -qO- 192.168.88.8/custom/pp-scripts/cobbler-test.sh | bash - -### network configuration - -$SNIPPET('pre_install_network_config') -$SNIPPET('post_install_network_config') +export hostname="$hostname" +export system_name="$system_name" +export gateway="$gateway" +export ip_address_eth0="$ip_address_eth0" +export mac_address_eth0="$mac_address_eth0" + +echo "hostname: '$hostname'" +echo "system_name: '$system_name'" +echo "gateway: '$gateway'" +echo "ip_address_eth0: '$ip_address_eth0'" +echo "mac_address_eth0: '$mac_address_eth0'" %end