osbuild / osbuild-composer

An HTTP service for building bootable OS images.
https://www.osbuild.org
Apache License 2.0
166 stars 107 forks source link

Add support for using custom kickstart file for Anaconda #3416

Open ardrigh opened 1 year ago

ardrigh commented 1 year ago

Describe the bug We have a workflow for automating the builds of our servers which use predefined Kickstart scripts for CentOS and RHEL servers that I would like to use with osbuild.

I was looking at building a custom ISO file that I could provide our kickstart file into, that would work as a bootable ISO to run the pre-defined Kickstart for the Anaconda installation.

The pre-defined Kickstart scripts we have are pre-validated and used regularly. They include full steps for our disk partitioning (both single and dual-disk layouts), registration for RHEL servers, and triggering post scripts to run Puppet configuration jobs.

I have tried manually creating images using the Red Hat hosted Image Builder tool, but the current customization options are not enough for our requirements.

Allowing us provide a kickstart file would simplify our automated server build process.

Environment

To Reproduce Steps to reproduce the behavior:

Expected behavior osbuild-composer allows us to specify a kickstart file that is passed through to Anaconda to use as the OS installation settings, allowing more advanced automated installations.

Additional context We are hoping that osbuild will evolve to allow more customization so we can create ISO files to use alongside Terraform vSphere provider to created automated workflow. Creating the VM via Terraform, assigning it the ISO which starts at VM first-boot, and Anaconda installation completes without interruption, and triggers the post Puppet configuration jobs.

Creating VMDK files requires too many additional manual steps and does not fit in the IaC server build model we are working with.

ardrigh commented 1 year ago

I was talking to a Red Hat consultant who happened to mention Ignition files, which after a quick search turned up this document for RHEL 9.

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/composing_installing_and_managing_rhel_for_edge_images/assembly_using-the-ignition-tool-for-the-rhel-for-edge-simplified-installer-images_composing-installing-managing-rhel-for-edge-images

If the full Anaconda is not preferred, would Ignition files be a possible replacement?

Mainly need more flexibility for disk layouts here, especially the ability to specify a layout for a second disk.

Some examples here showing disk layout specifying devices: https://docs.fedoraproject.org/en-US/fedora-coreos/storage/#_setting_up_separate_var_mounts https://coreos.github.io/ignition/examples/

SvenVD-be commented 1 year ago

+1