The bootiso.mono stage in osbuild that we used until recently adds the
inst.stage2 option unconditionally [1] whereas the current grub2.iso
stage that we use now doesn't.
[1] 8511add169/stages/org.osbuild.bootiso.mono (L369)
Define the OSTreeSimplifiedInstaller ImageKind.
This is the top-level image definition.
It uses the raw image pipelines, iso pipelines, and the new coreos
installer pipelines.
Different distros and image types have different dracut modules
available and enabled. Set these at the distro level and push them down
through the appropriate manifests, pipelines, and stages.
Added to both anaconda and coreos installers.
The kernel arguments for the EFIBootTree depend on the type of ISO we're
building, the payload, and the location of the kickstart file if any.
Instead of setting multiple fields on the object, most of which would be
mutually exclusive, set the kernel arguments from the image manifest
generator function which has all the information.
Support adding any pipeline as the tree for the ISO.
The existing ISOTree (bootiso-tree) pipeline is specific to Anaconda.
This change will allow the ISO (bootiso) pipeline to be created with any
pipeline, so we can add an ISO tree that is specific to the CoreOS
Installer.
Remove dependence of EFIBootTree pipeline (efiboot-tree) on an Anaconda
pipeline. The Anaconda pipeline was used to get the product and version
strings, so we pass those in instead.
This way, we an use the pipeline without needing an Anaconda pipeline.
The EFI tree shouldn't depend on an installer (or any) pipeline.
Currently we only support "xz", but keeping it as a `switch` to easily
support more types in the future.
The empty string is also supported as a no-op.
Add support for specifying where the kickstart file will be created:
either in the default location in the anaconda tree or at the root of
the ISO like we did so far in RHEL.
From the distro level, this is controlled by a boolean that when set to
true puts the kickstart file in the root of the ISO tree at /osbuild.ks
(the old behaviour) and if unset falls back to the default location
/usr/share/anaconda/interactive-defaults.ks.
Changed the name of the kickstart file for ostree back to osbuild.ks
Was ostree.ks for a while since a1bfcfe91c.
For Fedora we use the default and for RHEL we maintain the old behaviour
for now.
Add support for specifying the squashfs compression method for ISOTree
pipelines from the caller.
Build Fedora ISOs with lz4 compression and RHEL with xz.
Unconditionally enable the users module in Anaconda.
The module serves two purposes:
- It will create a user that's defined in the blueprint by adding the
user creation stage in the kickstart file.
- It allows users to create user accounts interactively during
installation.
add the image function and remove the pipeline function.
Remove the build package set.
Parameterise image config creation functions so that RHSM is added
conditionally based on distro name, like we did for AMI/EC2.
image: set the raw filename for the GCE image type
GCP requires that the raw image file inside the archive be named
'disk.raw'. We set it on the imagePipeline while instantiating the
manifest as a workaround for now.
This should be changed to be configurable on the image type when
necessary, the same way the final filename is defined.
Apply "xz" compression to any artifact pipeline if it's specified in the
image type. The image filename should be applied to the pipeline only
if it's the last one, so we need to skip this assignment if we're going
to add a compression pipeline at the end.
This is a bit dirty but the plan is to remove artifact compression from
manifests and perform it during the export in osbuild-composer, so this
should go away soon.
This adds the `fedora-image-installer` and
`fedora-image-installer-preview` images.
The image installer type installs anaconda-webui on Fedora >= 38 to use
the new UI. It also writes its setting to
`/usr/share/anaconda/interactive-defaults.ks` as the current
anaconda-webui has not yet been tested in kickstart mode.
To do so manifest.Anaconda was expanded to take a (subset) of options
for a KickstartStage which is will write into interactive-defaults.ks.
And to take a list of additional modules to enable, so we can set up
Anaconda with all default modules.
Make the ostree commit spec mandatory in the OSTreeRawImage by adding it
to the constructor.
Use the ostree.CommitSpec to specify parameters in the OSTreeRawImage
ImageKind and the OSTreeDeployment Pipeline.
Make the ostree commit spec mandatory in the OSTreeInstaller ImageKind.
The installer image type is not just for ostree types so make the ostree
parameters optional for the ISOTree Pipeline.
Use the ostree.CommitSpec to specify commits parameters.
In the OS pipeline, the parent configuration was used to detect if the
pipeline's setup was meant for an ostree commit or not. Also, the
pipeline used a new type to specify the ostree parameters.
- Use the ostree.CommitSpec for the parent configuration.
- Add a new attribute, OSTreeRef, that defines the ref for the ostree
commit being built. An empty string indicates that the tree is not
for an ostree commit.
Additionally, in the ImageKind configurations for the ostree archive and
container, separate the ostree ref from the parent spec, make the parent
spec optional (pointer) and the ostree ref mandatory, by requiring it in
the constructor of the ImageKind.
Don't pass blueprint Users and Groups options all the way down to the
osbuild stage bindings. Instead, convert them to the internal
users.User and users.Group structs.
Ideally we would do this even higher up in the code path, before
reaching the distro, but this is the first step towards that.
- Use newer granular stages to build the bootiso tree rather than the
deprecated bootiso.mono stage.
- Adjust the ISOTree struct properties: add the ones needed by the new
stages and remove any properties that have been moved to the new
pipelines.
A new struct in ostree can be used to define configuration options for
the ostree remote of an image. So far remotes were always set up with
the remote URL used to pull the commit. Now we support setting a
different remote with extra configuration options.
This is used by the fedora-iot-raw-image to set up the remote
configuration of the final image, separately from the source of the
commit.
Test manifests updated.
Adding support for config options to OSTreeDeployment that are required
by the IoT raw image:
- Kernel command line options
- Keyboard layout
- Locale
Test manifests updated.
Implement all of Fedora in terms of this new abstraction. What used to be the
manifest functions (and before that the pipeline functions) are now the image
functions, whose purpose is to instantiate the right image kind structs from the
image type definitions we currently have in the distro definition.
This abstracts away the manifest instantiation. The idea is that we define one
of these image kind types to represent a group of image types that are
sufficiently similar. Each image kind will have a struct with with all the
properties that can be customised for the image and a function to turn that into
an actual manifest. This is similar to how distro/fedora/manifest.go and
cmd/osbuild-playground works today, and aspires to move these closer together
and to eventually make the distro definitions simpler.
For now cmd/osbuild-playground is moved over to using the new abstraction.