Skip to content

Commit

Permalink
Merge pull request #1558 from alekitto/proxmox-rockylinux9
Browse files Browse the repository at this point in the history
add proxmox rockylinux 9
  • Loading branch information
k8s-ci-robot authored Sep 12, 2024
2 parents 3a0e013 + 66f6e9b commit fde08cf
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 3 deletions.
3 changes: 2 additions & 1 deletion images/capi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ NUTANIX_BUILD_NAMES ?= nutanix-ubuntu-2004 nutanix-ubuntu-2204 nutanix-ubuntu-24

HCLOUD_BUILD_NAMES ?= hcloud-ubuntu-2004 hcloud-ubuntu-2204 hcloud-ubuntu-2404 hcloud-centos-7 hcloud-rockylinux-8 hcloud-rockylinux-9 hcloud-flatcar

PROXMOX_BUILD_NAMES ?= proxmox-ubuntu-2204 proxmox-ubuntu-2404
PROXMOX_BUILD_NAMES ?= proxmox-ubuntu-2204 proxmox-ubuntu-2404 proxmox-rockylinux-9

VULTR_BUILD_NAMES ?= vultr-ubuntu-2204

Expand Down Expand Up @@ -844,6 +844,7 @@ build-hcloud-all: $(HCLOUD_BUILD_TARGETS) ## Builds all Hetzner Cloud image

build-proxmox-ubuntu-2204: ## Builds the Proxmox ubuntu-2204 image
build-proxmox-ubuntu-2404: ## Builds the Proxmox ubuntu-2404 image
build-proxmox-rockylinux-9: ## Builds the Proxmox rockylinux-9 image

build-vultr-ubuntu-2204: ## Builds Ubuntu 22.04 Vultr Snapshot

Expand Down
102 changes: 102 additions & 0 deletions images/capi/packer/proxmox/linux/rockylinux/http/9/ks.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Use CDROM installation media
repo --name="AppStream" --baseurl="http://download.rockylinux.org/pub/rocky/9/AppStream/x86_64/os/"
cdrom

# Use text install
text

# Don't run the Setup Agent on first boot
firstboot --disabled
eula --agreed

# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'

# System language
lang en_US.UTF-8

# Network information
network --bootproto=dhcp --onboot=on --ipv6=auto --activate --hostname=capv.vm

# Lock Root account
rootpw --lock

# Create builder user
user --name=builder --groups=wheel --password=builder --plaintext --shell=/bin/bash

# System services
selinux --permissive
firewall --disabled
services --enabled="NetworkManager,sshd,chronyd"

# System timezone
timezone UTC

# System booloader configuration
bootloader --location=mbr --boot-drive=sda
zerombr
clearpart --all --initlabel --drives=sda
part / --fstype="ext4" --grow --asprimary --label=slash --ondisk=sda

skipx

%packages --ignoremissing --excludedocs
openssh-server
qemu-guest-agent
sudo
sed
python3

# unnecessary firmware
-aic94xx-firmware
-atmel-firmware
-b43-openfwwf
-bfa-firmware
-ipw2100-firmware
-ipw2200-firmware
-ivtv-firmware
-iwl*-firmware
-libertas-usb8388-firmware
-ql*-firmware
-rt61pci-firmware
-rt73usb-firmware
-xorg-x11-drv-ati-firmware
-zd1211-firmware
-cockpit
-quota
-alsa-*
-fprintd-pam
-intltool
-microcode_ctl
%end

%addon com_redhat_kdump --disable
%end

reboot

%post

echo 'builder ALL=(ALL) NOPASSWD: ALL' >/etc/sudoers.d/builder
chmod 440 /etc/sudoers.d/builder

# Remove the package cache
yum -y clean all

swapoff -a
rm -f /swapfile
sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab

dnf install -y cloud-init systemd-resolved

# Allow guest-exec operation from qemu-guest-agent
echo 'FILTER_RPC_ARGS=$FILTER_RPC_ARGS,guest-exec' >> /etc/sysconfig/qemu-ga

systemctl enable qemu-guest-agent
systemctl start qemu-guest-agent
systemctl enable systemd-resolved

# Ensure on next boot that network devices get assigned unique IDs.
sed -i '/^\(HWADDR\|UUID\)=/d' /etc/sysconfig/network-scripts/ifcfg-*

%end
7 changes: 5 additions & 2 deletions images/capi/packer/proxmox/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@
],
"provisioners": [
{
"expect_disconnect": true,
"environment_vars": [
"BUILD_NAME={{user `build_name`}}"
],
"inline": [
"ls /",
"if [ $BUILD_NAME != \"ubuntu\" ]; then exit 0; fi",
"while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting for cloud-init...'; sleep 1; done",
"sudo apt-get -qq update",
"echo done"
],
"inline_shebang": "/bin/bash -e",
Expand Down
19 changes: 19 additions & 0 deletions images/capi/packer/proxmox/rockylinux-9.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"boot_command_prefix": "<up><tab> text inst.ks=",
"boot_command_suffix": "/9/ks.cfg<enter><wait><enter>",
"boot_media_path": "http://{{ .HTTPIP }}:{{ .HTTPPort }}",
"build_name": "rockylinux-9",
"distro_arch": "amd64",
"distro_name": "rockylinux",
"distro_version": "9",
"epel_rpm_gpg_key": "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9",
"firmware": "efi",
"guest_os_type": "rockylinux-64",
"iso_checksum": "ee3ac97fdffab58652421941599902012179c37535aece76824673105169c4a2",
"iso_checksum_type": "sha256",
"iso_url": "https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.4-x86_64-minimal.iso",
"os_display_name": "RockyLinux 9",
"redhat_epel_rpm": "https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm",
"shutdown_command": "/sbin/halt -h -p",
"vsphere_guest_os_type": "rockylinux_64Guest"
}

0 comments on commit fde08cf

Please sign in to comment.