feat(build): replace broken Containerfile with osbuild blueprint#92
Merged
Conversation
The previous golden image build used FROM quay.io/containerdisks/fedora:41 and ran dnf install — this fails because containerdisk images are minimal OCI wrappers around a qcow2 file with no rootfs or package manager. Switch to a two-stage build: image-builder (osbuild) produces a Fedora 41 qcow2 from a declarative TOML blueprint, then podman packages it as a KubeVirt containerdisk. This gives developers a version-controlled package manifest they can extend for custom workloads. image-builder uses variant-qualified type names (generic-qcow2, not bare qcow2) and does not ship fedora-41 manifests. Default to fedora-42 with generic-qcow2, and expose IMAGE_TYPE as an env var. Resolves #91 Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mrhillsman The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Contributor
Author
Summary~/Development/goland/virtwork/build/golden-image feat/osbuild-golden-image 5s 01:05:30 AM
❯ PUSH=true ./build.sh
image-builder requires root privileges for disk image assembly.
Re-executing with sudo...
Building golden disk image: quay.io/opdev/virtwork-disk:latest
======================================================
Distro: fedora-42
Type: generic-qcow2
Blueprint: /home/mrhillsman/Development/goland/virtwork/build/golden-image/blueprint.toml
Output: /tmp/tmp.7nnuf6d5aN
[|] Image building step
[6 / 6] Pipeline qcow2 [-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->] 100.00%
[2 / 2] Stage org.osbuild.qemu [------------------------------------------------------------------------------------------------------------------------------------------------------------------------>] 100.00%
Message: Finished pipeline qcow2
Image build successful: /tmp/tmp.7nnuf6d5aN/fedora-42-generic-qcow2-x86_64.qcow2
qcow2 produced: fedora-42-generic-qcow2-x86_64.qcow2 (970M)
Packaging as containerdisk...
STEP 1/3: FROM scratch
STEP 2/3: LABEL io.k8s.display-name="virtwork-disk" io.k8s.description="Fedora container disk with virtwork workload tools pre-installed" summary="Container disk for virtwork with CPU, memory, database, network, and disk tools" description="Pre-built Fedora container disk with stress-ng, fio, iperf3, postgresql-server, and chaos engineering tools for faster VM boot times" name="virtwork-disk" version="1.0" maintainer="Red Hat Ecosystem Engineering"
--> Using cache e9be4e0c0f6f42bb88fae04f441856d9a0510cd7498e77b80df4b95075f1f12a
--> e9be4e0c0f6f
STEP 3/3: COPY --chown=107:107 *.qcow2 /disk/disk.qcow2
COMMIT quay.io/opdev/virtwork-disk:latest
--> 0656fc91cea7
Successfully tagged quay.io/opdev/virtwork-disk:latest
0656fc91cea75b870912e7a15e5853c807c5875fb6d1c4b4b806c2f8d10bc13e
Image built successfully: quay.io/opdev/virtwork-disk:latest
Pushing image to registry...
Getting image source signatures
Copying blob 0da0653e2d26 done |
Copying config 0656fc91ce done |
Writing manifest to image destination
Image pushed successfully
======================================================
Build complete!
Image: quay.io/opdev/virtwork-disk:latest
To push this image to the registry, run:
PUSH=true ./build.sh
To use a custom registry, run:
REGISTRY=my.registry.io ./build.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The previous golden image build used FROM quay.io/containerdisks/fedora:41 and ran dnf install — this fails because containerdisk images are minimal OCI wrappers around a qcow2 file with no rootfs or package manager.
Switch to a two-stage build: image-builder (osbuild) produces a Fedora 41 qcow2 from a declarative TOML blueprint, then podman packages it as a KubeVirt containerdisk. This gives developers a version-controlled package manifest they can extend for custom workloads.
image-builder uses variant-qualified type names (generic-qcow2, not bare qcow2) and does not ship fedora-41 manifests. Default to fedora-42 with generic-qcow2, and expose IMAGE_TYPE as an env var.
Resolves #91