From 238b0d32b6cd1893f7803620d947c1d247281803 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 25 Jun 2020 10:12:20 +0200 Subject: [PATCH] Adding kickstart/.gitignore and kickstart/template-centos7.ks --- kickstart/.gitignore | 1 + kickstart/template-centos7.ks | 204 ++++++++++++++++++++++++++++++++++ 2 files changed, 205 insertions(+) create mode 100644 kickstart/.gitignore create mode 100644 kickstart/template-centos7.ks diff --git a/kickstart/.gitignore b/kickstart/.gitignore new file mode 100644 index 0000000..03e3679 --- /dev/null +++ b/kickstart/.gitignore @@ -0,0 +1 @@ +pp_standard_* diff --git a/kickstart/template-centos7.ks b/kickstart/template-centos7.ks new file mode 100644 index 0000000..19e6b6a --- /dev/null +++ b/kickstart/template-centos7.ks @@ -0,0 +1,204 @@ +###################################################################################### +# Centos7 for Privisioning-Installation +###################################################################################### +# +# Standard Pixelpark Installation of CentOS 7 templates +# + +# Firewall configuration +firewall --disabled + +# Install OS instead of upgrade +install + +# Use network installation +url --url="https://repo01.pixelpark.com/Linux/yum/centos/7/os/x86_64" --noverifyssl + +# Root install-password +rootpw --iscrypted ${ROOT_PWD_HASH} +# System authorization information +auth --useshadow --passalgo=sha512 + +# Use text mode install +text + +# System keyboard +keyboard de + +# System language +lang en_US + +# SELinux configuration +selinux --permissiv + +# Do not configure the X Window System +skipx + +# Installation logging level +logging --level=debug + +# Reboot after installation +reboot + +# System timezone +timezone Europe/Berlin + +########################################### +# Partitioning and Disk + +# System bootloader configuration +bootloader --append="net.ifnames=0 biosdevname=0" --location=mbr + +# Disk partitioning information +part /boot --fstype ext4 --size=512 --ondisk=sda +part swap --size=${SWAP_SIZE_MB} --ondisk=sda +part pv.01 --size=1 --grow --ondisk=sda +volgroup vgroot pv.01 +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 + +repo --name=pp-repo-os --baseurl=https://repo01.pixelpark.com/Linux/yum/centos/7/os/x86_64/ +repo --name=pp-repo-extras --baseurl=https://repo01.pixelpark.com/Linux/yum/centos/7/extras/x86_64/ +repo --name=pp-repo-updates --baseurl=https://repo01.pixelpark.com/Linux/yum/centos/7/updates/x86_64/ + +########################################## +# Packages + +%packages +@base +bc +bind-utils +curl +dosfstools +git +iotop +ksh +mailx +man +mlocate +psmisc +rsync +strace +sysstat +tcpdump +telnet +tmux +vim +wget +yum-utils +-mysql-community* +%end + +####################### +# Packages later: +# colordiff +# p7zip +# screen + +########################################## +# Post installation tasks in chroot env + +%post --interpreter=/usr/bin/bash + +### output to console +mkdir -p "/var/log/anaconda" +clear +POST_LOG="/var/log/anaconda/post-install.log" +exec < /dev/console &> >(tee -a "$POST_LOG") + +###################################################################################### +# Installation of pixelpark standard applications +###################################################################################### + + +### debug +set -x + +echo "cobbler profile = $profile_name" + +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 + +echo +echo "/etc/resolv.conf" +cat /etc/resolv.conf + + +### remove unnecessary directory +rm -rf /var/var + +export hostname="$hostname" +export system_name="$system_name" +export gateway="$gateway" +export mgmt_interface="eth0" +export ip_address_eth0="$ip_address_eth0" +export mac_address_eth0="$mac_address_eth0" +export system_status="${SYSTEM_STATUS}" +export ws_rel_filesdir="${WS_REL_FILESDIR}" + +echo +echo "hostname: '$hostname'" +echo "system_name: '$system_name'" +echo "gateway: '$gateway'" +echo "Management interface: '${mgmt_interface}'" +echo "ip_address_eth0: '$ip_address_eth0'" +echo "mac_address_eth0: '$mac_address_eth0'" +echo "System status: '${system_status}'" + +#set $basic_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.001.basics.sh" +echo +echo "Using snippet $basic_snippet" +$SNIPPET($basic_snippet) + +#set $authkeys_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.010.authkeys.sh" +echo +echo "Using snippet $authkeys_snippet" +$SNIPPET($authkeys_snippet) + +#set $network_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.040.network.sh" +echo +echo "Using snippet $network_snippet" +$SNIPPET($network_snippet) + +#set $tweak_systemd_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.060.tweak_systemd.sh" +echo +echo "Using snippet $tweak_systemd_snippet" +$SNIPPET($tweak_systemd_snippet) + +#set $tweak_grub_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.070.tweak_grub.sh" +echo +echo "Using snippet $tweak_grub_snippet" +$SNIPPET($tweak_grub_snippet) + +#set $clear_repos_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.100.clear_repos.sh" +echo +echo "Using snippet $clear_repos_snippet" +$SNIPPET($clear_repos_snippet) + + +## ########################### +## Sees to be finished + +#set $finish_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.999.finish.sh" +echo +echo "Using snippet $finish_snippet" +$SNIPPET($finish_snippet) + +%end -- 2.39.5