Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ jobs:
name: bootc-image-${{ matrix.kube-minor }}
path: bootc-image.tar

- name: Print bootc image digest
working-directory: node-images/fedora
run: |
BOOTC_IMAGE=$(make -s print-bootc-image KUBE_MINOR=${{ matrix.kube-minor }})
sudo podman inspect --format '{{.Digest}}' ${BOOTC_IMAGE}

- name: Build disk image
working-directory: node-images/fedora
run: sudo make build-disk-image KUBE_MINOR=${{ matrix.kube-minor }}
Expand Down
12 changes: 11 additions & 1 deletion node-images/fedora/Containerfile.disk
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
ARG FEDORA_VERSION=44
ARG BCVK_REF=main

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Containerfile has ARG BCVK_REF=main but the Makefile pins BCVK_REF ?= 9005...

I think it will make difference when someone uses makefile or podman build. like they will have different thing pinned/unpinned

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

if you use podman build you should know what to put as build argument otherwise, it will take it from main which is fine IMO


FROM quay.io/fedora/fedora-minimal:${FEDORA_VERSION} AS bcvk-builder
ARG BCVK_REF
RUN dnf install -y --setopt=install_weak_deps=0 git rust cargo && dnf clean all
RUN git clone https://github.com/bootc-dev/bcvk.git /bcvk && \
git -C /bcvk checkout ${BCVK_REF} && \
cargo build --release --manifest-path /bcvk/Cargo.toml

FROM quay.io/fedora/fedora-minimal:${FEDORA_VERSION} AS builder
RUN dnf install -y --setopt=install_weak_deps=0 qemu-kvm podman bcvk binutils && dnf clean all
RUN dnf install -y --setopt=install_weak_deps=0 qemu-kvm qemu-img virtiofsd podman binutils openssh && dnf clean all
COPY --from=bcvk-builder /bcvk/target/release/bcvk /usr/local/bin/bcvk
RUN printf '[containers]\nnetns="host"\ncgroups="disabled"\n[engine]\ncgroup_manager="cgroupfs"\n' \
> /etc/containers/containers.conf

Expand All @@ -18,6 +27,7 @@ RUN mkdir -p /output ${LOG_DIR} && \
bcvk to-disk -K \
--karg 'console=tty0' \
--karg 'console=ttyS0,115200n8' \
--karg 'console=hvc0' \
--filesystem ext4 \
--format qcow2 \
--memory ${MEMORY} \
Expand Down
3 changes: 3 additions & 0 deletions node-images/fedora/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ DISK_SIZE ?= 10G
BUILD_MEMORY ?= 4G
BUILD_LOG_DIR ?= /tmp/bcvk-logs
BCVK_EXTRA_ARGS ?=
BCVK_REF ?= 9005a6111f62533cb7b8b6a3cdffe6e1e98ce673

IMAGE_TAG ?= v$(KUBE_MINOR)-fedora-$(FEDORA_VERSION)
REGISTRY ?= ghcr.io/bootc-dev/bink
Expand Down Expand Up @@ -58,6 +59,7 @@ build-disk-image:
--build-arg KUBE_MINOR="$(KUBE_MINOR)" \
--build-arg BOOTC_DIGEST="$$BOOTC_DIGEST" \
--build-arg BCVK_EXTRA_ARGS="$(BCVK_EXTRA_ARGS)" \
--build-arg BCVK_REF="$(BCVK_REF)" \
-t $(NODE_IMAGE) \
-f Containerfile.disk \
.
Expand Down Expand Up @@ -103,3 +105,4 @@ help:
@echo " BUILD_MEMORY - Memory for bcvk build (default: $(BUILD_MEMORY))"
@echo " BUILD_LOG_DIR - Host path to collect bcvk logs (default: none)"
@echo " BCVK_EXTRA_ARGS - Extra arguments passed to bcvk to-disk (default: none)"
@echo " BCVK_REF - Git commit/tag to build bcvk from source (default: $(BCVK_REF))"