Skip to content

Feature: Added process to create RHEL 9 image using ansible-image-builder #332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

enothen
Copy link

@enothen enothen commented Apr 13, 2025

Description

Checklist/ToDo's

  • Added documentation
  • Added release note entry
  • Tested

- Added process to create qcow2 image using Red Hat Insights Image
  Builder through the ansible-image-builder role
- Added new process to documentation and release notes
- Implements [RFE] RHEL9 deployment could be automated using
  insights image builder RedHat-EMEA-SSA-Team#328
@enothen
Copy link
Author

enothen commented Apr 13, 2025

@rbo a couple of things here:

  1. I have tested the tarball generation process, but I have not tested that tar with Hetzner, simply because I can't destroy my single server right now. Do you have availability to test that and provide feedback?
  2. I leave it up to you to rename the playbooks, since there's now two files called 00-*
  3. In regards to the customization that is done on the manual process and how it works on the image-builder process:
  • subscription-manager registration: Not required to register, nor to unregister afterwards
  • installing packages: Done on the image definition itself (if anything else is needed, add it to the image definition)
  • dnf upgrade: Not required. Image builder uses latest content on the repositories.
  • Adding rd.auto: Done on the image definition as an image-builder customization of type kernel
  • Disabling system.devices: Removing the file is not required, this file is not present on the image. Changing the value of use_devicesfile in lvm.conf is done as part of the image definition (see offline_customizations)
  • Symlink for dracut: There's no customization method on the image builder API for adding a symlink, so this is done using as an offline customization (same as above, see the image definition)
  • Removing iwl* rpms: Not required as they are not installed on the image
  • Cleanup (OS sealing): Not required, this image was never actually booted

@enothen enothen marked this pull request as draft April 14, 2025 06:44
- Added missing packages on the image definition
- Extended offline customization using ansible-image-builder
  capabilities, rather than with a custom task in the playbook
@enothen enothen changed the title Added process to create RHEL 9 image using ansible-image-builder Feature: Added process to create RHEL 9 image using ansible-image-builder Apr 14, 2025
Release v0.1.1 includes the extension to offline customizations, which
are used in the process to generate the custom Hetzner image.
@enothen
Copy link
Author

enothen commented Apr 14, 2025

Some validation:

$ tar -tJf ./rhel9-hetzner-ocp4.tar.xz | grep bin/dracut
./usr/bin/dracut
./usr/sbin/dracut
$ tar -xJf ./rhel9-hetzner-ocp4.tar.xz ./etc/lvm/lvm.conf ./etc/default/grub 
$ grep use_device etc/lvm/lvm.conf 
	# Configuration option devices/use_devicesfile.
	use_devicesfile = 0
$ grep rd.auto etc/default/grub 
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8 no_timer_check net.ifnames=0 rd.auto"

@enothen enothen marked this pull request as ready for review April 14, 2025 14:36
Clarified pre-requisites on the image creation process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant