generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1476 from 0nebody/rhel_9_ova
RHEL9 OVA
- Loading branch information
Showing
4 changed files
with
117 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# version=RHEL9 | ||
# Use CDROM installation media | ||
cdrom | ||
|
||
# Use text install | ||
text | ||
|
||
# Don't run the Setup Agent on first boot | ||
firstboot --disabled | ||
eula --agreed | ||
|
||
# Keyboard layout | ||
keyboard --vckeymap=us --xlayouts='us' | ||
|
||
# System language | ||
lang en_US.UTF-8 | ||
|
||
# Network information | ||
network --bootproto=dhcp --onboot=on --ipv6=auto --activate --hostname=rhel9 | ||
|
||
# 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=sshd | ||
|
||
# System timezone | ||
timezone UTC | ||
|
||
# System booloader configuration | ||
bootloader --location=mbr --boot-drive=sda | ||
zerombr | ||
clearpart --all --initlabel --drives=sda | ||
autopart --nohome --noswap --nolvm | ||
|
||
skipx | ||
|
||
%packages --ignoremissing --excludedocs | ||
# dnf group info minimal-environment | ||
@^minimal-environment | ||
@core | ||
openssh-server | ||
sed | ||
sudo | ||
python3 | ||
open-vm-tools | ||
|
||
# Exclude unnecessary firmwares | ||
-iwl*firmware | ||
%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 | ||
|
||
# Disable quiet boot and splash screen | ||
sed -i 's/ rhgb quiet//' /etc/default/grub | ||
sed -i 's/ rhgb quiet//' /boot/grub2/grubenv | ||
|
||
# Remove the package cache | ||
yum -y clean all | ||
|
||
# Disable swap | ||
swapoff -a | ||
rm -f /swapfile | ||
sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab | ||
|
||
# Ensure on next boot that network devices get assigned unique IDs. | ||
sed -i '/^\(HWADDR\|UUID\)=/d' /etc/sysconfig/network-scripts/ifcfg-* | ||
|
||
%end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"boot_command_prefix": "<up>e <down><down><end><wait> text inst.ks=", | ||
"boot_command_suffix": "/9/ks.cfg<enter><wait><leftCtrlOn>x<leftCtrlOff>", | ||
"boot_media_path": "http://{{ .HTTPIP }}:{{ .HTTPPort }}", | ||
"build_name": "rhel-9", | ||
"distro_arch": "amd64", | ||
"distro_name": "rhel", | ||
"distro_version": "9", | ||
"epel_rpm_gpg_key": "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9", | ||
"firmware": "efi", | ||
"guest_os_type": "rhel9-64", | ||
"http_directory": "./packer/ova/linux/{{user `distro_name`}}/http/", | ||
"iso_checksum": "398561d7b66f1a4bf23664f4aa8f2cfbb3641aa2f01a320068e86bd1fc0e9076", | ||
"iso_checksum_type": "sha256", | ||
"iso_url": "file:///rhel-9.4-x86_64-dvd.iso", | ||
"os_display_name": "RHEL 9", | ||
"redhat_epel_rpm": "https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm", | ||
"shutdown_command": "shutdown -P now", | ||
"vsphere_guest_os_type": "rhel9_64Guest" | ||
} |