-
Notifications
You must be signed in to change notification settings - Fork 87
bib: add support for --type bootc-installer
#1094
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
base: main
Are you sure you want to change the base?
Conversation
3bcac31 to
4359aea
Compare
| assert "usr/bin/bootc" in output | ||
|
|
||
|
|
||
| @pytest.mark.skipif(platform.system() != "Linux", reason="boot test only runs on linux right now") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this build/boot test would ideally live in "images" but we don't have the infra there yet for this kind of local qemu tests.
README.md
Outdated
| | `vmdk` | [VMDK](https://en.wikipedia.org/wiki/VMDK) usable in vSphere, among others | | ||
| | `anaconda-iso` | An unattended Anaconda installer that installs to the first disk found. | | ||
| | `bootc-installer` | An installer ISO image based on the specified bootc container image. | | ||
| | `anaconda-iso` | (legacy) an unattended Anaconda installer that installs to the first disk found build from RPMs. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is legacy yet? Does any project currently publish installer containers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'm happy to revert this again. In my head it is already legacy but maybe I'm a bit (too) quick with jumping to this. I will let @ondrejbudai chime in here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it probably can't be legacy yet.
It also adds a new --installer-payload-ref option
so that the user can specify a different payload container
to install.
As far as the mechanics...I think it (almost) never makes sense for one to install this installer container (today). Feels like the target image should be a required positional argument (do we have the ability to do that?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend to agree that if I were using this I'd expect to have to pass two containers always with a stretch goal of passing only the payload (to-be-installed) container which then automatically gets derviced.
Embedding of the payload container would become optional once anaconda gains its bootc verb, the remote would still need to be passed but we can put embedding behind a flag (smaller ISO for deployment environments with network).
@cgwalters since you're here now; are there already issues tracking the building of a 'base installer' container for Fedora and/or CentOS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cgwalters since you're here now; are there already issues tracking the building of a 'base installer' container for Fedora and/or CentOS?
Not that I know of, we could definitely add something like this in fedora-bootc.
But it's a bit complex because that'd add another variable in all of this. The way I was thinking of this is we just document how to add Anaconda as a layer on top of one's image - this means it naturally carries all configuration from the base (including critical stuff like kernel + kargs + injected 3rd party drivers in /usr/lib/modules etc.)
If we shipped a pre-built installer container...hmm, well I guess it would work equally well really (maybe sometimes better even?) to have users do a matrix build where they do two builds, one FROM <golden installer image> and one that generates their target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. I guess an intermediate thing we could do here is add bootc-base-imagectl --anaconda, before shipping it as a prebuilt image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing, I can look into this tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cgwalters since you're here now; are there already issues tracking the building of a 'base installer' container for Fedora and/or CentOS?
Not that I know of, we could definitely add something like this in fedora-bootc.
But it's a bit complex because that'd add another variable in all of this. The way I was thinking of this is we just document how to add Anaconda as a layer on top of one's image - this means it naturally carries all configuration from the base (including critical stuff like kernel + kargs + injected 3rd party drivers in /usr/lib/modules etc.)
If we shipped a pre-built installer container...hmm, well I guess it would work equally well really (maybe sometimes better even?) to have users do a matrix build where they do two builds, one
FROM <golden installer image>and one that generates their target.
Mmm, sure that's right; the question is if any of that configuration is going to interfere with Anaconda's operation, it can be picky about its environment. Only one way to find out :)
We'll definitely need to document and standarize on the bootc documentation pages how these types of containers should be built and that it should be the default way of building installers in bootc-land?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the part about the deprecation.
4359aea to
2f6ea26
Compare
--type bootc-installer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is the workaround that can be removed.
| # can update images/ to set the correct efi_src_dir and this can | ||
| # be removed | ||
| # see also https://bugzilla.redhat.com/show_bug.cgi?id=1750708 | ||
| RUN dnf reinstall -y shim-x64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since osbuild/osbuild#2202 is merged, this can be removed now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me update the comment, sadly its more complicated, see osbuild/osbuild#2205
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
The NewAnacondaContainerInstaller got renamed to NewAnacondaContainerInstallerLegacy.
This commit adds support for the new `bootc-installer` image type that will take a bootc container and create an ISO out of it. It also adds a new `--installer-payload-ref` option so that the user can specify a different payload container to install. See osbuild/images#1906 for details. This is the equivalent of osbuild/image-builder-cli#341 for bootc-image-builder and allows us to build these kinds of images with bib now too.
Add an integration test that uses the new `bootc-installer` image type to perform a full install and validate that booting into the resulting image works.
2f6ea26 to
f8b67b4
Compare
This commit adds support for the new
bootc-installerimagetype that will take a bootc container and create an ISO out
of it. It also adds a new
--installer-payload-refoptionso that the user can specify a different payload container
to install.
See osbuild/images#1906 for details.
This is the equivalent of
osbuild/image-builder-cli#341
for bootc-image-builder and allows us to build these kinds
of images with bib now too.
/jira-epic HMS-8839