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

osbuild: add support for metal platform #3654

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

dustymabe
Copy link
Member

This reworks the coreos.osbuild.mpp.yaml to use the new kernel-cmdline.bls-append
stage [1], enabling us to share earlier stages among the platform specific pipelines.
We have renamed the pipeline stages to be more appropriate. Now we have

  • tree
    • the filesystem tree
  • raw-image
    • builds on "tree"
    • a raw disk image with nothing platform specific, like kernel arguments
  • raw-metal-image
    • builds on "raw-image"
    • adds kernel arguments specific to metal platform
  • raw-qemu-image
    • builds on "raw-image"
    • adds kernel arguments specific to qemu platform
  • metal
    • builds on "raw-metal-image"
    • copies out raw image file from "raw-metal-image" stage
    • no other modifications needed
  • qemu
    • builds on "raw-qemu-image"
    • converts raw image file from "raw-qemu-image" into a qcow2

We have also modified cmd-buildextend-metal to support calling
runvm-osbuild for either metal or qemu platform images and also added
support for running with the cache qcow2. The cache qcow will allow us
to call osbuild multiple times, with later invocations building on work
done in previous invocations. For example if we checkpiont the tree
and raw-image stages (as depicted above) then when we call osbuild to
build the metal image it won't have to do the work for that. The
benefits of this will compound when we start to build more disk images
in this way.

[1] osbuild/osbuild#1429

@dustymabe dustymabe mentioned this pull request Nov 16, 2023
@dustymabe dustymabe force-pushed the dusty-osbuild-metal branch 2 times, most recently from 5af5bb4 to 48c7195 Compare November 16, 2023 14:45
Bumping to v99 lets us drop 0001-objectstore-also-mount-etc-containers-for-host-build.patch.
We'll also include the yet to be released 0001-stages-add-kernel-cmdline.bls-append-stage.patch
and also a 0001-osbuild-util-fscache-calculate-actual-size-of-files.patch to fix how the
osbuild cache file sizes are calcuated.
This reworks the coreos.osbuild.mpp.yaml to use the new kernel-cmdline.bls-append
stage [1], enabling us to share earlier stages among the platform specific pipelines.
We have renamed the pipeline stages to be more appropriate. Now we have

- tree
    - the filesystem tree
- raw-image
    - builds on "tree"
    - a raw disk image with nothing platform specific, like kernel arguments
- raw-metal-image
    - builds on "raw-image"
    - adds kernel arguments specific to `metal` platform
- raw-qemu-image
    - builds on "raw-image"
    - adds kernel arguments specific to `qemu` platform
- metal
    - builds on "raw-metal-image"
    - copies out raw image file from "raw-metal-image" stage
    - no other modifications needed
- qemu
    - builds on "raw-qemu-image"
    - converts raw image file from "raw-qemu-image" into a qcow2

We have also modified cmd-buildextend-metal to support calling
runvm-osbuild for either metal or qemu platform images and also added
support for running with the cache qcow2. The cache qcow will allow us
to call osbuild multiple times, with later invocations building on work
done in previous invocations. For example if we checkpiont the `tree`
and `raw-image` stages (as depicted above) then when we call osbuild to
build the `metal` image it won't have to do the work for that. The
benefits of this will compound when we start to build more disk images
in this way.

[1] osbuild/osbuild#1429
@jlebon jlebon force-pushed the dusty-osbuild-metal branch from 48c7195 to cb8abcc Compare November 16, 2023 15:26
Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane to me!

@jlebon jlebon enabled auto-merge (rebase) November 16, 2023 15:26
@jlebon jlebon merged commit e578133 into coreos:main Nov 16, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants