# Generated by Anaconda 34.25.3.8 # Generated by pykickstart v3.32 #version=RHEL9 # Use text mode install text repo --name="AppStream" --baseurl=http://repo1.uppmax.uu.se/repos/mirror/snapshots/freeze.20240508/rocky/9.3/AppStream/x86_64/os %addon com_redhat_kdump --disable %end # Keyboard layouts keyboard --vckeymap=sv-latin1 --xlayouts='se','us' # System language lang en_US.UTF-8 # Use network installation url --url="http://repo1.uppmax.uu.se/repos/mirror/snapshots/freeze.20240508/rocky/9.3/BaseOS/x86_64/os" # Remote logging logging --host=syslog.uppmax.uu.se eula --agreed reboot %packages @^server-product-environment @console-internet @headless-management @legacy-unix @remote-system-management @security-tools @smart-card @system-tools emacs-nox nmap ipmitool nfs-utils mariadb-server iperf3 telnet lldpd freeipmi %end # Run the Setup Agent on first boot firstboot --disable # Do not configure the X Window System skipx # Generated using Blivet version 3.6.0 ignoredisk --only-use=sda # System bootloader configuration bootloader --append="crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M" --location=mbr --boot-drive=sda # Partition clearing information clearpart --none --initlabel # Disk partitioning information part pv.764 --fstype="lvmpv" --ondisk=sda --size=118488 part /boot --fstype="ext4" --ondisk=sda --size=1024 volgroup rl_dell --pesize=4096 pv.764 logvol swap --fstype="swap" --size=16080 --name=swap --vgname=rl_dell logvol / --fstype="ext4" --size=102400 --name=root --vgname=rl_dell # System timezone timezone Europe/Stockholm --utc # Root password (only console and removed after puppet) rootpw --plaintext uppmaxroot %post # Do this directly so no packages sneaks in from the outside mkdir /etc/uppmax.repos.d echo "reposdir=/etc/uppmax.repos.d" >> /etc/dnf/dnf.conf # Some stuff just works better with a fully installed system -- nmcli for example cat < /etc/systemd/system/firstrun.service [Unit] Description=Initial setup ConditionPathExists=!/etc/initial_setp_done [Service] Type=oneshot ExecStart=/usr/local/sbin/firstrun.sh # Should be nice with working network-online.target... but not worth it # without network manager and half broken network... #After=network-online.target #Wants=network-online.target [Install] WantedBy=multi-user.target EOF cat </usr/local/sbin/firstrun.sh #raw #!/bin/bash logger initial_puppet_ping # Util network and resolver works (almost blabla-wait-online.service) while true; do ping -c1 puppet &> /dev/null && break; done logger initial_nmcli # setup static network with nmcli (ip from the dhcp-connection) ethinterface=\$(ip -4 -br a|grep -v ^lo|cut -d ' ' -f1) ipaddress=\$(ip -4 -br a s \$ethinterface|tr -s ' '|cut -d ' ' -f3) nmcli c m \$ethinterface ipv4.addresses \$ipaddress nmcli c m \$ethinterface ipv4.gateway 172.18.36.1 nmcli c m \$ethinterface ipv4.dns "172.18.37.34 172.18.37.37" nmcli c m \$ethinterface ipv4.dns-search uppmax.uu.se nmcli c m \$ethinterface ipv4.dns-options "rotate timeout:1 attempts:5" nmcli c m \$ethinterface ipv4.method manual nmcli c m \$ethinterface ipv6.method disabled nmcli con up \$ethinterface systemctl restart NetworkManager hostnamectl set-hostname \$(hostnamectl --transient) setenforce 0 sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux logger initial_puppet_install rpm -Uvh http://repo1.uppmax.uu.se/repos/mirror/live/rsync.puppet.com/yum/puppet7/el/9/x86_64/puppet-agent-7.29.0-1.el9.x86_64.rpm /opt/puppetlabs/bin/puppet agent -tv --environment rocky9 --ssldir /var/lib/puppetlabs/puppet/ssl --vardir /var/lib/puppetlabs/puppet/cache --tags base_uppmax logger initial_puppet_done # Things from EPEL and perhaps other puppet-managed repos yum install -y fping screen yum update -y echo "PUPPET_EXTRA_OPTS=--environment=rocky9" >> /etc/sysconfig/puppet update-crypto-policies --set DEFAULT:SHA1 #systemctl enable puppet --now systemctl disable firstrun.service rm -f /etc/motd.d/cockpit touch /etc/initial_setup_done logger initial_setup_done echo "initial_setup_done" >/dev/ttyS0 2>/dev/null #end raw EOF chmod +x /usr/local/sbin/firstrun.sh systemctl enable firstrun.service %end