Skip to content
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

Build live ISO using osbuild #3847

Closed
wants to merge 2 commits into from
Closed

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Aug 13, 2024

This adds a new osbuild pipeline for building the live ISO using the new
org.osbuild.coreos.live-iso mega stage.

Still missing is changing cmd-buildextend-live to call osbuild
instead. I think we'll need to ratchet this in using e.g. an env var
like we did for the other osbuild artifacts. E.g. COSA_OSBUILD_LIVE
would control whether to use the old logic or the new one. And then turn
it on in rawhide, etc...

The new cmd-buildextend-live would also take care of extracting the
live artifacts from the live ISO to insert into meta.json.

jlebon added 2 commits August 13, 2024 11:55
We run osbuild inside of supermin, so for building the live ISO we'll
need all the tools it needs in there. This includes `genisoimage` and
`syslinux-nonlinux`.

We don't currently name `squashfs-tools` as a toplevel dependency. It's
currently pulled in by libguestfs, but we need it in supermin too, so
explicitly list it there.
This adds a new osbuild pipeline for building the live ISO using the new
`org.osbuild.coreos.live-iso` mega stage.

Still missing is changing `cmd-buildextend-live` to call osbuild
instead. I think we'll need to ratchet this in using e.g. an env var
like we did for the other osbuild artifacts. E.g. `COSA_OSBUILD_LIVE`
would control whether to use the old logic or the new one. And then turn
it on in rawhide, etc...

The new `cmd-buildextend-live` would also take care of extracting the
live artifacts from the live ISO to insert into `meta.json`.
Copy link

openshift-ci bot commented Aug 13, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@jlebon
Copy link
Member Author

jlebon commented Aug 13, 2024

Requires: osbuild/osbuild#1842
Requires: osbuild/osbuild#1843
Requires: osbuild/osbuild#1844
Requires: #3846
Requires: coreos/coreos-installer#1511

@jlebon
Copy link
Member Author

jlebon commented Aug 13, 2024

This works locally! To test it:

$ cat runvm-osbuild-iso-config.json
{
  "osname": "fedora-coreos",
  "ostree-ref": "40.20240627.dev.0",
  "ostree-repo": "/srv/fcos/tmp/repo",
  "ostree-container": "/srv/fcos/fcos-with-newer-coreos-installer.ociarchive",
  "metal-filename": "/srv/fcos/builds/40.20240812.dev.0/x86_64/fedora-coreos-40.20240812.dev.0-metal.x86_64.raw",
  "metal4k-filename": "/srv/fcos/builds/40.20240812.dev.0/x86_64/fedora-coreos-40.20240812.dev.0-metal4k.x86_64.raw",
  "container-imgref": "",
  "extra-kargs-string": "mitigations=auto,nosmt",
  "image-type": "live-iso",
  "cloud-image-size": "10240",
  "metal-image-size": "2405",
  "squashfs-compression": "lz4",
  "rootfs-size": 0,
  "live-efiboot-img-size": 16
}
$ cosa supermin-run --cache /usr/lib/coreos-assembler/runvm-osbuild --config runvm-osbuild-iso-config.json --mpp /usr/lib/coreos-assembler/osbuild-manifests/coreos.osbuild.x86_64.mpp.yaml --filepath out.iso
...

And we get an out.iso! Though it doesn't fully work yet. It boots fine (tested both BIOS and UEFI), but we're not switching root yet. Also only tested on x86_64 for now.

@openshift-merge-robot
Copy link

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ravanelli
Copy link
Member

Tested, lgtm! Thanks for working on it @jlebon!

@ravanelli
Copy link
Member

I also started working on: #3861 i

@jlebon
Copy link
Member Author

jlebon commented Oct 28, 2024

This is part of #3861.

@jlebon jlebon closed this Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants