Skip to content

Commit

Permalink
Version 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinbojko committed Dec 8, 2023
1 parent 2d9b724 commit 22f413e
Show file tree
Hide file tree
Showing 19 changed files with 605 additions and 91 deletions.
28 changes: 14 additions & 14 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variables:
packer_version: "1.9.2"
packer_version: "1.9.4"
dind: 24.0-dind
build_alma8: "false"
build_alma9: "false"
Expand All @@ -16,7 +16,7 @@ variables:

default:
artifacts:
expire_in: 1 hour
expire_in: 4 hour
when: always
retry:
max: 2
Expand Down Expand Up @@ -49,7 +49,7 @@ alma8:
- pwd
- '$env:PACKER_CACHE_DIR="d:\packer_cache"'
- packer init config.pkr.hcl
- .\hv_generic.ps1 -Action verify -Version almalinux-8.8 -Template rhel -Log 0
- .\hv_generic.ps1 -Action verify -Version almalinux-8.9 -Template rhel -Log 0
tags:
- windows
- hyperv
Expand All @@ -59,7 +59,7 @@ alma9:
- pwd
- '$env:PACKER_CACHE_DIR="d:\packer_cache"'
- packer init config.pkr.hcl
- .\hv_generic.ps1 -Action verify -Version almalinux-9.2 -Template rhel -Log 0
- .\hv_generic.ps1 -Action verify -Version almalinux-9.3 -Template rhel -Log 0
tags:
- windows
- hyperv
Expand All @@ -69,7 +69,7 @@ rocky8:
- pwd
- '$env:PACKER_CACHE_DIR="d:\packer_cache"'
- packer init config.pkr.hcl
- .\hv_generic.ps1 -Action verify -Version rockylinux-8.8 -Template rhel -Log 0
- .\hv_generic.ps1 -Action verify -Version rockylinux-8.9 -Template rhel -Log 0
tags:
- windows
- hyperv
Expand All @@ -79,7 +79,7 @@ rocky9:
- pwd
- '$env:PACKER_CACHE_DIR="d:\packer_cache"'
- packer init config.pkr.hcl
- .\hv_generic.ps1 -Action verify -Version rockylinux-9.2 -Template rhel -Log 0
- .\hv_generic.ps1 -Action verify -Version rockylinux-9.3 -Template rhel -Log 0
tags:
- windows
- hyperv
Expand All @@ -89,7 +89,7 @@ oracle8:
- pwd
- '$env:PACKER_CACHE_DIR="d:\packer_cache"'
- packer init config.pkr.hcl
- .\hv_generic.ps1 -Action verify -Version oraclelinux-8.8 -Template rhel -Log 0
- .\hv_generic.ps1 -Action verify -Version oraclelinux-8.9 -Template rhel -Log 0
tags:
- windows
- hyperv
Expand All @@ -99,7 +99,7 @@ oracle9:
- pwd
- '$env:PACKER_CACHE_DIR="d:\packer_cache"'
- packer init config.pkr.hcl
- .\hv_generic.ps1 -Action verify -Version oraclelinux-9.2 -Template rhel -Log 0
- .\hv_generic.ps1 -Action verify -Version oraclelinux-9.3 -Template rhel -Log 0
tags:
- windows
- hyperv
Expand Down Expand Up @@ -217,7 +217,7 @@ alma8_build:
- Sleep 120
- "Get-Vm -name packer-*|Remove-VM -Force"
- packer init config.pkr.hcl
- .\hv_generic.ps1 -Action build -Version almalinux-8.8 -Template rhel -Log 0
- .\hv_generic.ps1 -Action build -Version almalinux-8.9 -Template rhel -Log 0
rules:
- if: $build_alma8 == "true"
when: on_success
Expand All @@ -234,7 +234,7 @@ alma9_build:
- Sleep 120
- "Get-Vm -name packer-*|Remove-VM -Force"
- packer init config.pkr.hcl
- .\hv_generic.ps1 -Action build -Version almalinux-9.2 -Template rhel -Log 0
- .\hv_generic.ps1 -Action build -Version almalinux-9.3 -Template rhel -Log 0
rules:
- if: $build_alma9 == "true"
when: on_success
Expand All @@ -250,7 +250,7 @@ rocky8_build:
- Sleep 120
- "Get-Vm -name packer-*|Remove-VM -Force"
- packer init config.pkr.hcl
- .\hv_generic.ps1 -Action build -Version rockylinux-8.8 -Template rhel -Log 0
- .\hv_generic.ps1 -Action build -Version rockylinux-8.9 -Template rhel -Log 0
rules:
- if: $build_rocky8 == "true"
when: on_success
Expand All @@ -266,7 +266,7 @@ rocky9_build:
- Sleep 120
- "Get-Vm -name packer-*|Remove-VM -Force"
- packer init config.pkr.hcl
- .\hv_generic.ps1 -Action build -Version rockylinux-9.2 -Template rhel -Log 0
- .\hv_generic.ps1 -Action build -Version rockylinux-9.3 -Template rhel -Log 0
rules:
- if: $build_rocky9 == "true"
when: on_success
Expand All @@ -282,7 +282,7 @@ oracle8_build:
- Sleep 120
- "Get-Vm -name packer-*|Remove-VM -Force"
- packer init config.pkr.hcl
- .\hv_generic.ps1 -Action build -Version oraclelinux-8.8 -Template rhel -Log 0
- .\hv_generic.ps1 -Action build -Version oraclelinux-8.9 -Template rhel -Log 0
rules:
- if: $build_oracle8 == "true"
when: on_success
Expand All @@ -298,7 +298,7 @@ oracle9_build:
- Sleep 120
- "Get-Vm -name packer-*|Remove-VM -Force"
- packer init config.pkr.hcl
- .\hv_generic.ps1 -Action build -Version oraclelinux-9.2 -Template rhel -Log 0
- .\hv_generic.ps1 -Action build -Version oraclelinux-9.3 -Template rhel -Log 0
rules:
- if: $build_oracle9 == "true"
when: on_success
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## Version 3.0.1 2023-12-08

Codename: Slip Away - [https://www.youtube.com/watch?v=G8g_7CDwbmI](https://www.youtube.com/watch?v=G8g_7CDwbmI)

* [RockyLinux] added `RockyLinux 8.9` support
* [RockyLinux] added `RockyLinux 9.3` support
* [AlmaLinux] added `AlmaLinux 8.9` support
* [AlmaLinux] added `AlmaLinux 9.3` support
* [OracleLinux] added `OracleLinux 8.9` support
* [OracleLinux] added `OracleLinux 9.3` support
* [https://github.com/marcinbojko/hv-packer/issues/19](https://github.com/marcinbojko/hv-packer/issues/19) - fixed typo.

## Version 3.0.0 2023-09-16

* [BREAKING_CHANGE] complete redesign of building process. Instead od separate scripts now you're presented with generic `hv_generic.ps1` script run with proper parameters. This will allow for easier maintenance and less clutter in repository
Expand All @@ -22,7 +34,7 @@ Codename: Jedwab - [https://www.youtube.com/watch?v=G_Lsdk88AYM](https://www.you
* [RockyLinux] added `RockyLinux 9.1 Vagrant` support
* [RockyLinux] added `RockyLinux 8.7` support
* [RockyLinux] added `RockyLinux 8.7 Docker` support
* [RockyLinux] added `RockyLinux 8.7 Vagrant` supportv
* [RockyLinux] added `RockyLinux 8.7 Vagrant` support
* introduced required packer plugins
* reworked README.md

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ text
selinux --disabled
# Network information
network --bootproto=dhcp --noipv6 --activate
# firewall
firewall --disabled
# Use CDROM installation media
cdrom
# Run the Setup Agent on first boot
Expand All @@ -28,7 +30,7 @@ rootpw --plaintext password
# System timezone
timezone UTC --isUtc --ntpservers=0.rhel.pool.ntp.org
# System bootloader configuration
bootloader --location=mbr
bootloader
zerombr
# Partition clearing information
clearpart --all --initlabel
Expand All @@ -42,6 +44,7 @@ part / --fstype="ext4" --grow --size=1
@guest-agents
@legacy-unix
@system-tools
bash
mc
curl
wget
Expand All @@ -59,15 +62,13 @@ glibc-all-langpacks
openssh-server
openssh-clients
openssh
tuned
tuned-profiles-atomic
qemu-guest-agent
python3-pip
python3-setuptools
tuned
tuned-profiles-atomic
tuned-utils
spice-vdagent
qemu-guest-agent
cloud-init
cloud-utils-growpart
%end

%addon com_redhat_subscription_manager
Expand All @@ -88,11 +89,10 @@ pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
sed -ri 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
sed -ri 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
sed -ri 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
systemctl enable sshd --now
systemctl enable sshd
%end

%post --log=/var/log/anaconda/kickstart_post.log
systemctl enable sshd --now
systemctl enable qemu-guest-agent
systemctl set-default multi-user.target
%end
Expand Down
101 changes: 101 additions & 0 deletions extra/files/rockylinux/8/proxmox/ks.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#version=RHEL8
# X Window System configuration information
# License agreement
eula --agreed
# Use graphical install
text
# SELinux configuration
selinux --disabled
# Network information
network --bootproto=dhcp --noipv6 --activate
# firewall
firewall --disabled
# Use CDROM installation media
cdrom
# Run the Setup Agent on first boot
firstboot --disable
# System services
services --enabled="chronyd"
services --enabled="sshd"
services --enabled="NetworkManager"

# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US --addsupport=en_GB.UTF-8

repo --name="AppStream" --baseurl=file:///run/install/repo/AppStream
# Root password
rootpw --plaintext password
# System timezone
timezone UTC --isUtc --ntpservers=0.rhel.pool.ntp.org
# System bootloader configuration
bootloader
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part /boot/efi --fstype="vfat" --size=400
part /boot --fstype="ext4" --size=2048
part swap --fstype="swap" --size=8192
part / --fstype="ext4" --grow --size=1

%packages
@guest-agents
@legacy-unix
@system-tools
bash
mc
curl
wget
tar
bzip2
kernel-devel
kernel-headers
perl
gcc
git
make
elfutils-libelf-devel
langpacks-en
glibc-all-langpacks
openssh-server
openssh-clients
openssh
python3-pip
python3-setuptools
tuned
tuned-profiles-atomic
tuned-utils
spice-vdagent
qemu-guest-agent
%end

%addon com_redhat_subscription_manager
%end
%addon ADDON_placeholder --disable --reserve-mb=auto
%end
%addon com_redhat_kdump --disable
%end

%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end

# post part
%post --log=/var/log/anaconda/kickstart_post_sshd.log
sed -ri 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
sed -ri 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
sed -ri 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
systemctl enable sshd
%end

%post --log=/var/log/anaconda/kickstart_post.log
systemctl enable qemu-guest-agent
systemctl set-default multi-user.target
%end

#reboot
reboot
Loading

0 comments on commit 22f413e

Please sign in to comment.