#platform=x86, AMD64, or Intel EM64T # System authorization information authconfig --enableshadow --passalgo=sha512 --enablekrb5 --krb5realm ATLAS.UMICH.EDU --krb5kdc linat02.grid.umich.edu,linat03.grid.umich.edu,linat04.grid.umich.edu --krb5adminserver linat03.grid.umich.edu # Firewall configuration firewall --enabled --port=22:tcp --port=7001:udp # Run the Setup Agent on first boot firstboot --disable # System keyboard keyboard us # System language lang en_US.UTF-8 # Use network installation url --url=http://10.10.1.153/cblr/links/CentOS8-x86_64 # If any cobbler repo definitions were referenced in the kickstart profile, include them here. repo --name=CentOS8-highavailability --baseurl=http://10.10.1.153/cobbler/repo_mirror/CentOS8-highavailability repo --name=CentOS8-appstream --baseurl=http://10.10.1.153/cobbler/repo_mirror/CentOS8-appstream repo --name=umatlas-sl8-x86_64 --baseurl=http://10.10.1.153/pub/umatlas/el8/x86_64 repo --name=epel-8-x86_64 --baseurl=http://10.10.1.153/cobbler/repo_mirror/epel-8-x86_64 repo --name=ZFS-RL8 --baseurl=http://10.10.1.153/cobbler/repo_mirror/ZFS-RL8 repo --name=CentOS8-powertools --baseurl=http://10.10.1.153/cobbler/repo_mirror/CentOS8-powertools repo --name=CentOS8-extras --baseurl=http://10.10.1.153/cobbler/repo_mirror/CentOS8-extras repo --name=CentOS8 --baseurl=http://10.10.1.153/cobbler/repo_mirror/CentOS8 repo --name=source-1 --baseurl=http://10.10.1.153/cobbler/ks_mirror/CentOS8-x86_64/AppStream repo --name=source-2 --baseurl=http://10.10.1.153/cobbler/ks_mirror/CentOS8-x86_64/BaseOS # Network information # Reboot after installation reboot #Root password rootpw --iscrypted $6$2WByL8AR$PmcJ8q194AqlNJFai.GHeuwceNDDjGIVxyOtQGisxO/5bJ.Yz1kOV5qGIGLVmOxel8QKzS88Yy3CWURBRjUOT. # SELinux configuration selinux --permissive # Use text mode install text # Do not configure the X Window System skipx # System timezone timezone America/New_York # Install OS instead of upgrade install # intel desktop raid is not easily handled in kickstart. # Repeating the lines from the anaconda generated ks after manual install don't do it. %include /tmp/partinfo # Use /tmp/partinfo for partitions %pre sizes=`fdisk -l | grep "Disk\ \/dev\/sd\|vd" | awk '{ print $2 $5 }'` # if there is not a disk smaller than 5TB then we're not doing anything # Also, any used disk must be at least 32GB smallest=5000000000000 minsize=15 usedisk="fail_install" for size in $sizes; do diskdev=`echo $size | awk -F: '{ print $1 }'` size=`echo $size | awk -F: '{ print $2 }' | sed "s/\..*//" ` if [ "$size" -lt "$smallest" ]; then if [ "$size" -gt "$minsize" ]; then smallest=$size diskdev=${diskdev#/dev/} usedisk=$diskdev fi fi done echo "Using disk: $usedisk" echo "Size is: $smallest" if [ "$usedisk" == "fail_install" ]; then echo "\"No disk smaller than $smallest GB, assuming it is not safe to continue\"" > /tmp/partinfo else cat << EOF > /tmp/partinfo zerombr bootloader --location=mbr --driveorder=$usedisk --append="rhgb quiet selinux=0" EOF cat << EOF >> /tmp/partinfo ignoredisk --only-use=$usedisk part /boot --fstype=ext4 --size=1024 --ondisk=$usedisk clearpart --all --drives=$usedisk part /boot/efi --fstype=efi --grow --maxsize=1024 --size=100 --ondisk=$usedisk part pv.2 --size=1 --grow --ondisk=$usedisk volgroup vg0 --pesize=4096 pv.2 logvol / --fstype=ext4 --name=lv_root --vgname=vg0 --size=1024 --grow logvol /var --fstype=ext4 --name=lv_var --vgname=vg0 --size=46080 logvol /tmp --fstype=ext4 --name=lv_tmp --vgname=vg0 --size=10240 logvol /var/cache/openafs --fstype=ext4 --name=lv_afscache --vgname=vg0 --size=4096 --fsoptions=noatime,data=writeback,barrier=0,nobh,errors=remount-ro logvol swap --fstype=swap --name=lv_swap --vgname=vg0 --size=1000 --grow --maxsize=1024 EOF fi %end %pre set -x -v exec 1>/tmp/ks-pre.log 2>&1 # Once root's homedir is there, copy over the log. while : ; do sleep 10 if [ -d /mnt/sysimage/root ]; then cp /tmp/ks-pre.log /mnt/sysimage/root/ logger "Copied %pre section log to system" break fi done & curl "http://10.10.1.153/cblr/svc/op/trig/mode/pre/system/umfs09" -o /dev/null # Enable installation monitoring curl -o /tmp/anamon "http://10.10.1.153:80/cobbler/misc/anamon" python /tmp/anamon --name "umfs09" --server "10.10.1.153" --port "80" %end %post set -x -v exec 1>/root/ks-post.log 2>&1 # Start yum configuration # End yum configuration # Start post_install_network_config generated code # create a working directory for interface scripts mkdir /etc/sysconfig/network-scripts/cobbler cp /etc/sysconfig/network-scripts/ifcfg-lo /etc/sysconfig/network-scripts/cobbler/ # set the gateway in the network configuration file grep -v GATEWAY /etc/sysconfig/network > /etc/sysconfig/network.cobbler echo "GATEWAY=192.41.230.1" >> /etc/sysconfig/network.cobbler rm -f /etc/sysconfig/network mv /etc/sysconfig/network.cobbler /etc/sysconfig/network # set the hostname in the network configuration file grep -v HOSTNAME /etc/sysconfig/network > /etc/sysconfig/network.cobbler echo "HOSTNAME=umfs09.aglt2.org" >> /etc/sysconfig/network.cobbler rm -f /etc/sysconfig/network mv /etc/sysconfig/network.cobbler /etc/sysconfig/network # Also set the hostname now, some applications require it # (e.g.: if we're connecting to Puppet before a reboot). /bin/hostname umfs09.aglt2.org # Start configuration for bond0.4010 echo "DEVICE=bond0.4010" > /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0.4010 echo "alias bond0.4010 bonding" >> /etc/modprobe.conf.cobbler echo "TYPE=Ethernet" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0.4010 echo "ONBOOT=yes" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0.4010 echo "BOOTPROTO=static" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0.4010 echo "IPADDR=10.10.1.29" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0.4010 echo "NETMASK=255.255.252.0" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0.4010 echo "VLAN=yes" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0.4010 echo "ONPARENT=yes" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0.4010 echo "DNS1=10.10.1.195" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0.4010 echo "DNS2=192.41.230.195" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0.4010 echo "DNS3=10.10.2.85" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0.4010 # End configuration for bond0.4010 # Start configuration for p5p1 echo "DEVICE=p5p1" > /etc/sysconfig/network-scripts/cobbler/ifcfg-p5p1 echo "HWADDR=7C:FE:90:64:D5:78" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-p5p1 IFNAME=$(ip -o link | grep -i '7C:FE:90:64:D5:78' | sed -e 's/^[0-9]*: //' -e 's/:.*//') if [ -f "/etc/modprobe.conf" ] && [ $IFNAME ]; then grep $IFNAME /etc/modprobe.conf | sed "s/$IFNAME/p5p1/" >> /etc/modprobe.conf.cobbler grep -v $IFNAME /etc/modprobe.conf >> /etc/modprobe.conf.new rm -f /etc/modprobe.conf mv /etc/modprobe.conf.new /etc/modprobe.conf fi echo "SLAVE=yes" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-p5p1 echo "MASTER=bond0" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-p5p1 echo "HOTPLUG=no" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-p5p1 echo "TYPE=Ethernet" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-p5p1 echo "ONBOOT=yes" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-p5p1 echo "BOOTPROTO=static" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-p5p1 # End configuration for p5p1 # Start configuration for p5p2 echo "DEVICE=p5p2" > /etc/sysconfig/network-scripts/cobbler/ifcfg-p5p2 echo "HWADDR=7C:FE:90:64:D5:79" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-p5p2 IFNAME=$(ip -o link | grep -i '7C:FE:90:64:D5:79' | sed -e 's/^[0-9]*: //' -e 's/:.*//') if [ -f "/etc/modprobe.conf" ] && [ $IFNAME ]; then grep $IFNAME /etc/modprobe.conf | sed "s/$IFNAME/p5p2/" >> /etc/modprobe.conf.cobbler grep -v $IFNAME /etc/modprobe.conf >> /etc/modprobe.conf.new rm -f /etc/modprobe.conf mv /etc/modprobe.conf.new /etc/modprobe.conf fi echo "SLAVE=yes" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-p5p2 echo "MASTER=bond0" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-p5p2 echo "HOTPLUG=no" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-p5p2 echo "TYPE=Ethernet" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-p5p2 echo "ONBOOT=yes" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-p5p2 echo "BOOTPROTO=static" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-p5p2 # End configuration for p5p2 # Start configuration for em1 echo "DEVICE=em1" > /etc/sysconfig/network-scripts/cobbler/ifcfg-em1 echo "HWADDR=90:B1:1C:10:EB:25" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-em1 IFNAME=$(ip -o link | grep -i '90:B1:1C:10:EB:25' | sed -e 's/^[0-9]*: //' -e 's/:.*//') if [ -f "/etc/modprobe.conf" ] && [ $IFNAME ]; then grep $IFNAME /etc/modprobe.conf | sed "s/$IFNAME/em1/" >> /etc/modprobe.conf.cobbler grep -v $IFNAME /etc/modprobe.conf >> /etc/modprobe.conf.new rm -f /etc/modprobe.conf mv /etc/modprobe.conf.new /etc/modprobe.conf fi echo "TYPE=Ethernet" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-em1 echo "ONBOOT=yes" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-em1 echo "BOOTPROTO=static" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-em1 echo "DNS1=10.10.1.195" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-em1 echo "DNS2=192.41.230.195" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-em1 echo "DNS3=10.10.2.85" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-em1 echo "10.10.128.0/20 via 10.10.1.2" >> /etc/sysconfig/network-scripts/cobbler/route-em1 # End configuration for em1 # Start configuration for enp65s0f0 echo "DEVICE=enp65s0f0" > /etc/sysconfig/network-scripts/cobbler/ifcfg-enp65s0f0 echo "HWADDR=7C:FE:90:65:E7:C4" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-enp65s0f0 IFNAME=$(ip -o link | grep -i '7C:FE:90:65:E7:C4' | sed -e 's/^[0-9]*: //' -e 's/:.*//') if [ -f "/etc/modprobe.conf" ] && [ $IFNAME ]; then grep $IFNAME /etc/modprobe.conf | sed "s/$IFNAME/enp65s0f0/" >> /etc/modprobe.conf.cobbler grep -v $IFNAME /etc/modprobe.conf >> /etc/modprobe.conf.new rm -f /etc/modprobe.conf mv /etc/modprobe.conf.new /etc/modprobe.conf fi echo "SLAVE=yes" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-enp65s0f0 echo "MASTER=bond0" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-enp65s0f0 echo "HOTPLUG=no" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-enp65s0f0 echo "TYPE=Ethernet" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-enp65s0f0 echo "ONBOOT=yes" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-enp65s0f0 echo "BOOTPROTO=static" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-enp65s0f0 # End configuration for enp65s0f0 # Start configuration for enp65s0f1 echo "DEVICE=enp65s0f1" > /etc/sysconfig/network-scripts/cobbler/ifcfg-enp65s0f1 echo "HWADDR=7C:FE:90:65:E7:C5" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-enp65s0f1 IFNAME=$(ip -o link | grep -i '7C:FE:90:65:E7:C5' | sed -e 's/^[0-9]*: //' -e 's/:.*//') if [ -f "/etc/modprobe.conf" ] && [ $IFNAME ]; then grep $IFNAME /etc/modprobe.conf | sed "s/$IFNAME/enp65s0f1/" >> /etc/modprobe.conf.cobbler grep -v $IFNAME /etc/modprobe.conf >> /etc/modprobe.conf.new rm -f /etc/modprobe.conf mv /etc/modprobe.conf.new /etc/modprobe.conf fi echo "SLAVE=yes" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-enp65s0f1 echo "MASTER=bond0" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-enp65s0f1 echo "HOTPLUG=no" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-enp65s0f1 echo "TYPE=Ethernet" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-enp65s0f1 echo "ONBOOT=yes" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-enp65s0f1 echo "BOOTPROTO=static" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-enp65s0f1 # End configuration for enp65s0f1 # Start configuration for em2 echo "DEVICE=em2" > /etc/sysconfig/network-scripts/cobbler/ifcfg-em2 echo "HWADDR=90:B1:1C:10:EB:26" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-em2 IFNAME=$(ip -o link | grep -i '90:B1:1C:10:EB:26' | sed -e 's/^[0-9]*: //' -e 's/:.*//') if [ -f "/etc/modprobe.conf" ] && [ $IFNAME ]; then grep $IFNAME /etc/modprobe.conf | sed "s/$IFNAME/em2/" >> /etc/modprobe.conf.cobbler grep -v $IFNAME /etc/modprobe.conf >> /etc/modprobe.conf.new rm -f /etc/modprobe.conf mv /etc/modprobe.conf.new /etc/modprobe.conf fi echo "TYPE=Ethernet" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-em2 echo "ONBOOT=yes" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-em2 echo "BOOTPROTO=static" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-em2 echo "DNS1=10.10.1.195" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-em2 echo "DNS2=192.41.230.195" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-em2 echo "DNS3=10.10.2.85" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-em2 # End configuration for em2 # Start configuration for bond0 echo "DEVICE=bond0" > /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0 echo "alias bond0 bonding" >> /etc/modprobe.conf.cobbler cat >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0 << EOF BONDING_OPTS="mode=4 xmit_hash_policy=1" EOF echo "TYPE=Ethernet" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0 echo "ONBOOT=yes" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0 echo "BOOTPROTO=static" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0 echo "IPADDR=192.41.230.29" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0 echo "NETMASK=255.255.254.0" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0 echo "DNS1=10.10.1.195" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0 echo "DNS2=192.41.230.195" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0 echo "DNS3=10.10.2.85" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0 # End configuration for bond0 sed -i -e "/^nameserver /d" /etc/resolv.conf echo "nameserver 10.10.1.195" >>/etc/resolv.conf echo "nameserver 192.41.230.195" >>/etc/resolv.conf echo "nameserver 10.10.2.85" >>/etc/resolv.conf sed -i 's/ONBOOT=yes/ONBOOT=no/g' /etc/sysconfig/network-scripts/ifcfg-eth* rm -f /etc/sysconfig/network-scripts/ifcfg-bond0.4010 rm -f /etc/sysconfig/network-scripts/ifcfg-p5p1 rm -f /etc/sysconfig/network-scripts/ifcfg-p5p2 rm -f /etc/sysconfig/network-scripts/ifcfg-em1 rm -f /etc/sysconfig/network-scripts/ifcfg-enp65s0f0 rm -f /etc/sysconfig/network-scripts/ifcfg-enp65s0f1 rm -f /etc/sysconfig/network-scripts/ifcfg-em2 rm -f /etc/sysconfig/network-scripts/ifcfg-bond0 mv /etc/sysconfig/network-scripts/cobbler/* /etc/sysconfig/network-scripts/ rm -r /etc/sysconfig/network-scripts/cobbler rm -f /etc/modprobe.conf.cobbler rm -f /etc/sysconfig/network-scripts/ifcfg-eno* echo umfs09.aglt2.org > /etc/hostname systemctl stop network systemctl start network systemctl enable network systemctl stop firewalld systemctl disable firewalld # End post_install_network_config generated code # Start func registration section /sbin/chkconfig --level 345 funcd on cat < /etc/func/minion.conf [main] log_level = INFO acl_dir = /etc/func/minion-acl.d listen_addr = listen_port = 51234 EOFM cat < /etc/certmaster/minion.conf [main] certmaster = 10.10.2.85 certmaster_port = 51235 log_level = DEBUG cert_dir = /etc/pki/certmaster EOCM # End func registration section # Start download cobbler managed config files (if applicable) # End download cobbler managed config files (if applicable) # Start koan environment setup echo "export COBBLER_SERVER=10.10.1.153" > /etc/profile.d/cobbler.sh echo "setenv COBBLER_SERVER 10.10.1.153" > /etc/profile.d/cobbler.csh # End koan environment setup # Begin cobbler registration # skipping for system-based installation # End cobbler registration # Enable post-install boot notification curl -o /usr/local/sbin/anamon "http://10.10.1.153:80/cobbler/misc/anamon" curl -o /etc/rc.d/init.d/anamon "http://10.10.1.153:80/cobbler/misc/anamon.init" chmod 755 /etc/rc.d/init.d/anamon /usr/local/sbin/anamon test -d /selinux && restorecon /etc/rc.d/init.d/anamon /usr/local/sbin/anamon chkconfig --add anamon cat << __EOT__ > /etc/sysconfig/anamon COBBLER_SERVER="10.10.1.153" COBBLER_PORT="80" COBBLER_NAME="umfs09" LOGFILES="/var/log/boot.log /var/log/messages /var/log/dmesg /root/ks-post.log" __EOT__ # Start final steps cat << 'EOF' > /usr/sbin/initial_cf3_run.sh #!/bin/bash sleep 30 echo "" echo -e "=== Setting date (it is ok if one attempt times out) === \n" ntpdate 10.10.1.14 ntpdate 10.10.1.15 # Pre-make a mount point, /dcache, for the dCache pool servers echo `hostname -s`|grep -q -e ^umfs -e ^msufs if [ $? -eq 0 ] ; then mkdir -p /dcache fi echo "" echo "=== Running cfengine configuration agent ===" echo -e "=== This will take 10-15 minutes, please do not shut off machine === \n" /var/cfengine/bin/cf-agent -f failsafe.cf | tee /root/cf-agent.0.log ; /var/cfengine/bin/cf-agent | tee /root/cf-agent.1.log echo "" echo "========= Start second cf-agent run =========" /var/cfengine/bin/cf-agent -K | tee /root/cf-agent.2.log echo "" echo -e "=== Configuration is finished === \n" echo -e "=== Disabling this boot service === \n" /bin/systemctl disable initialcfe.service EOF cat <<'EOF' > /etc/systemd/system/initialcfe.service [Unit] Description=Initial cf3 configuration of this node After=syslog.target network.target [Service] ExecStart=/usr/sbin/initial_cf3_run.sh Type=idle [Install] WantedBy=multi-user.target EOF chmod +x /usr/sbin/initial_cf3_run.sh /bin/systemctl enable initialcfe.service mkdir -p /root/bogusNIC mv /etc/sysconfig/network-scripts/ifcfg-ens* /root/bogusNIC curl "http://10.10.1.153/cblr/svc/op/ks/system/umfs09" -o /root/cobbler.ks curl "http://10.10.1.153/cblr/svc/op/trig/mode/post/system/umfs09" -o /dev/null curl "http://10.10.1.153/cblr/svc/op/nopxe/system/umfs09" -o /dev/null %end %packages --excludedocs --ignoremissing autofs libxml2 lldpd yum-utils singularity python3 lsof cmake tcsh libXpm-devel yum-cron tmpwatch bc rsync telnet net-tools bind-utils pciutils mlocate yum java wget ntp ntpdate nano time screen pam_krb5 xfsprogs cfengine-community cfengine3-aglt2 # koan kernel-devel kernel-headers # These are really just for the Dell hardware tools but harmless to have globally # glibc.i686 # libgcc.i686 # nss-softokn-freebl.i686 -NetworkManager* #NetworkManager-config-server #NetworkManager-libnm #NetworkManager-wwan #NetworkManager-libreswan #NetworkManager-adsl #NetworkManager-team #NetworkManager-tui network-scripts epel-release -selinux-policy-targeted -open-vm-tools-deploypkg -open-vm* -dell-dset* %end # End final steps