From: Frank Brehm Date: Tue, 19 May 2020 13:53:35 +0000 (+0200) Subject: Adding kickstart/pp_standard_centos8_vmware.ks X-Git-Tag: 2.1.2^2~9^2~36 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=054c92f920b5916e73f75d7634ac5baaaa240092;p=pixelpark%2Fcreate-vmware-tpl.git Adding kickstart/pp_standard_centos8_vmware.ks --- diff --git a/kickstart/pp_standard_centos8_vmware.ks b/kickstart/pp_standard_centos8_vmware.ks new file mode 100644 index 0000000..2c6ba1a --- /dev/null +++ b/kickstart/pp_standard_centos8_vmware.ks @@ -0,0 +1,240 @@ +###################################################################################### +# Centos7.0 for Privisioning-Installation +###################################################################################### +### standard pixelpark linux installation +# 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/" +# Root install-password +rootpw --iscrypted $1$ud/WLzVZ$GfIY5mqH1R9CbG3c5XKtS. +# System authorization information +auth --useshadow --passalgo=sha512 +# Use text mode install +text +# System keyboard +keyboard de +# System language +lang en_US +# SELinux configuration +selinux --disabled +# Do not configure the X Window System +skipx +# Installation logging level +logging --level=debug +# Reboot after installation +reboot +# System timezone +timezone Europe/Berlin +# 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 pv.01 --size=1 --grow --ondisk=sda +volgroup vgroot pv.01 +logvol / --vgname=vgroot --name=root --size=1 --grow + +# 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 + + +%packages +@base +@hardware-monitoring +@java-platform +@large-systems +@network-file-system-client +@network-tools +@performance +@perl-runtime +@security-tools + + +%end + +%post --log=/root/post-install.log + + +###################################################################################### +# Installation of pixelpark standard applications +###################################################################################### + + +### output to console +exec < /dev/console > /dev/console +clear + +### debug + +echo "cobbler profile = $profile_name" +ifconfig +netstat -rn +ip a +ip r s + +### 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') + +%end