-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support building OracleLinux 9.4 base template
- Loading branch information
Showing
7 changed files
with
123 additions
and
15 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
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,87 @@ | ||
cdrom | ||
# Use text mode install | ||
text | ||
|
||
# License agreement | ||
eula --agreed | ||
|
||
# System language | ||
lang en_US.UTF-8 | ||
|
||
# Keyboard layout | ||
keyboard --vckeymap=us --xlayouts='us' | ||
|
||
|
||
|
||
|
||
|
||
# Network information | ||
network --bootproto=dhcp --device=link --activate | ||
|
||
### Lock the root account | ||
rootpw --lock | ||
|
||
firewall --disabled | ||
|
||
# SELinux configuration | ||
selinux --permissive | ||
|
||
# Do not configure the X Window System | ||
skipx | ||
|
||
# System timezone | ||
timezone UTC | ||
|
||
# Add a user named builder | ||
user --name=${ssh_username} | ||
sshkey --username=${ssh_username} "${public_key}" | ||
|
||
# System bootloader configuration | ||
bootloader --location=mbr | ||
|
||
# Clear the Master Boot Record | ||
zerombr | ||
|
||
clearpart --all --initlabel | ||
part / --fstype="ext4" --grow --asprimary --label=slash --ondisk=sda | ||
|
||
%packages --excludedocs | ||
# dnf group info minimal-environment | ||
@^minimal-environment | ||
@core | ||
openssh-server | ||
sed | ||
sudo | ||
python3 | ||
open-vm-tools | ||
|
||
# Exclude unnecessary firmwares | ||
-iwl*firmware | ||
%end | ||
|
||
# Enable/disable the following services | ||
services --enabled=sshd | ||
|
||
%post --logfile=/mnt/sysimage/root/ks-post.log --erroronfail | ||
# Disable quiet boot and splash screen | ||
sed --follow-symlinks -i "s/ rhgb quiet//" /etc/default/grub | ||
sed --follow-symlinks -i "s/ rhgb quiet//" /boot/grub2/grubenv | ||
# Passwordless sudo for the user '${ssh_username}' | ||
echo "${ssh_username} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/${ssh_username} | ||
chmod 440 /etc/sudoers.d/${ssh_username} | ||
|
||
# Remove the package cache | ||
dnf makecache | ||
dnf install epel-release -y | ||
dnf makecache | ||
dnf install -y sudo open-vm-tools perl cloud-init cloud-utils-growpart | ||
|
||
# Disable swap | ||
swapoff -a | ||
rm -f /swapfile | ||
sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab | ||
sed -i '/^\(HWADDR\|UUID\)=/d' /etc/sysconfig/network-scripts/ifcfg-* || true | ||
%end | ||
|
||
# Reboot after successful installation | ||
reboot |
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,4 @@ | ||
distribution="OracleLinux" | ||
distribution_version="9.4" | ||
iso_url="https://yum.oracle.com/ISOS/OracleLinux/OL9/u4/x86_64/OracleLinux-R9-U4-x86_64-dvd.iso" | ||
iso_checksum="77034a4945474cb7c77820bd299cac9a557b8a298a5810c31d63ce404ad13c5e" |
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