bootc: allow ignition first boot stage in blueprint#2222
bootc: allow ignition first boot stage in blueprint#2222jbtrystram merged 3 commits intoosbuild:mainfrom
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
|
I've done a release of the blueprint library so you can update the dependency here and the option will be available in the code. |
f0ed2b5 to
21bc18c
Compare
21bc18c to
0a1ae10
Compare
supakeen
left a comment
There was a problem hiding this comment.
Getting there; the errors returned now need to be handled and I see c.GetISO() now also returns an error. That was my mistake as I implemented that but never updated blueprint in images.
I can make a PR or you can fix it in this PR; what do you prefer?
In [1] customizations.GetISO was updated to return an error, handle that [1] osbuild/blueprint@a072bbf
I'll add a commit here :) |
57c5090 to
5641cd7
Compare
17f3c71 to
7e48e57
Compare
d60302c to
b0248f0
Compare
|
@supakeen I added a second commit here to handle osbuild/osbuild#2149 but it feel quite crudes and does not work. The generated manifest looks correct though, so I am not sure what is happening. |
This requires a local build of osbuild/images#2222 Then to test: ``` IBC_IMAGE=localhost/ibc sudo podman build -t localhost/ibc -f Containerfile-ibc alias ibc='sudo podman run --rm --privileged --network=none -v /var/lib/containers/storage:/var/lib/containers/storage -v ./output:/output -v ./fcos-bp.toml:/fcos-bp.toml $IBC_IMAGE' ibc build qcow2 \ --bootc-build-ref $BUILDER_IMAGE \ --bootc-ref $TARGET_FCOS_IMAGE \ --output-dir fedora-coreos \ --output-name fedora-coreos-rawhide \ --with-buildlog \ --with-manifest \ --with-metrics --blueprint /fcos-bp.toml ```
b0248f0 to
a66cb0c
Compare
supakeen
left a comment
There was a problem hiding this comment.
Thanks this looks OK to me.
The commits could be redone a bit (e.g. first introduce the blueprint bump + the changes that needs) then a commit to use the new customizations but I won't block on that as it's pretty minor.
| } | ||
| var err error | ||
| // We cannot reuse the existing mounts because the generated ostree mounts are shadowing /boot and the file ends up | ||
| // in the wrong place. We reuse the bootupd mount generator as it's enough for this. We just need /boot. |
There was a problem hiding this comment.
❤️ for adding this in a comment as well.
This allow setting a `Firstboot.Ignition.Empty` boolean to inject the igntition firstboot stage[1] after the container is deployed. Note that we specify the target directory to create the `ignition.firstboot` stamp, as introduced in [2]. This is required because `bootc install to-filesystem` wants an empty /boot FS, so we need to run the stage after. We reuse the bootupd mounts generator. We really only need /boot, so bootupd is probably a bit overkill but does the job. We cannot reuse the existing mounts here because the `ostree` generated mounts are shadowing /boot so the file end up in the wrong place. Requires osbuild/blueprint#46 [1] https://github.com/osbuild/osbuild/blob/main/stages/org.osbuild.ignition [2] osbuild/osbuild#2149 Signed-off-by: jbtrystram <jbtrystram@redhat.com> Co-authored-by: Simon de Vlieger <cmdr@supakeen.com>
a66cb0c to
4868e5c
Compare
I cleaned up the commits :) It was a nice opportunity to practice some git-fu ! |
And you did it so that the diffs didn't change so the approval I gave didn't get dismissed. If you want, I think you can order the 'update to blueprints 1.25.0' before the ' allow ignition first boot stage' thing. |
See https://issues.redhat.com/browse/HMS-10227 This requires a local build of osbuild/images#2222 Then to test: ``` IBC_IMAGE=localhost/ibc sudo podman build -t localhost/ibc -f Containerfile-ibc alias ibc='sudo podman run --rm --privileged --network=none -v /var/lib/containers/storage:/var/lib/containers/storage -v ./output:/output -v ./fcos-bp.toml:/fcos-bp.toml $IBC_IMAGE' ibc build qcow2 \ --bootc-build-ref $BUILDER_IMAGE \ --bootc-ref $TARGET_FCOS_IMAGE \ --output-dir fedora-coreos \ --output-name fedora-coreos-rawhide \ --with-buildlog \ --with-manifest \ --with-metrics --blueprint /fcos-bp.toml ``` Alternatively, use quay.io/jbtrystramtestimages/cosa-ib
It's already in that order |
See https://issues.redhat.com/browse/HMS-10227 This requires a local build of osbuild/images#2222 Then to test: ``` IBC_IMAGE=localhost/ibc sudo podman build -t localhost/ibc -f Containerfile-ibc alias ibc='sudo podman run --rm --privileged --network=none -v /var/lib/containers/storage:/var/lib/containers/storage -v ./output:/output -v ./fcos-bp.toml:/fcos-bp.toml $IBC_IMAGE' ibc build qcow2 \ --bootc-build-ref $BUILDER_IMAGE \ --bootc-ref $TARGET_FCOS_IMAGE \ --output-dir fedora-coreos \ --output-name fedora-coreos-rawhide \ --with-buildlog \ --with-manifest \ --with-metrics --blueprint /fcos-bp.toml ``` Alternatively, use quay.io/jbtrystramtestimages/cosa-ib
Ah, GitHub UI being silly. Disregard :) |
This image contains osbuild/images#2222
achilleas-k
left a comment
There was a problem hiding this comment.
This isn't tested anywhere but I trust you tried it already with your own builds. We should add some FCOS manifests to test these things at some point.
I'll file something to track this as part of our overall effort of moving to image-builder |
This allow setting a
Firstboot.Ignition.Enableboolean to inject the igntition firstboot stage[1] after the container is deployed.Requires osbuild/blueprint#46 [1] https://github.com/osbuild/osbuild/blob/main/stages/org.osbuild.ignition