Skip to content

Support for Multi-Architecture Index Manifest#198

Merged
hardikdr merged 3 commits intomainfrom
feat/multiarch-oci
Jul 22, 2025
Merged

Support for Multi-Architecture Index Manifest#198
hardikdr merged 3 commits intomainfrom
feat/multiarch-oci

Conversation

@hardikdr
Copy link
Member

@hardikdr hardikdr commented Apr 28, 2025

Proposed Changes

This PR extends the image building, inspecting, listing, and pushing workflows to support [OCI index manifests](https://github.com/opencontainers/image-spec/blob/main/image-index.md) for multi-architecture images.

🔧 Key Changes

  • Build command enhancements:

    • --multi-arch: Builds a top-level index manifest referencing per-arch layered manifests (e.g., amd64, arm64). Respects all per-arch inputs specified via --<flag>-<arch> format.
    • If --multi-arch is not used, the --arch flag becomes mandatory to clarify the target platform for a single image.
  • Push command enhancements:

    • --push-sub-manifests: Pushes the index manifest along with all referenced architecture-specific sub-manifests.
    • Default behavior remains unchanged if this flag is omitted.

🧪 Example Test Command

./ironcore-image build \
  --multi-arch \
  --tag ghcr.io/ironcore-dev/os-images/test-image:100.4 \
  --rootfs-file-amd64 testdata/amd64/rootfs.img \
  --squashfs-file-amd64 testdata/amd64/squashfs.img \
  --initramfs-file-amd64 testdata/amd64/initramfs.img \
  --kernel-file-amd64 testdata/amd64/kernel.img \
  --uki-file-amd64 testdata/amd64/uki.img \
  --iso-file-amd64 testdata/amd64/iso.img \
  --rootfs-file-arm64 testdata/arm64/rootfs.img \
  --squashfs-file-arm64 testdata/arm64/squashfs.img \
  --initramfs-file-arm64 testdata/arm64/initramfs.img \
  --kernel-file-arm64 testdata/arm64/kernel.img \
  --uki-file-arm64 testdata/arm64/uki.img \
  --iso-file-arm64 testdata/arm64/iso.img

Feedback on the flag structure and UX is very welcome!!

Fixes #

@hardikdr hardikdr added this to Roadmap May 4, 2025
@hardikdr hardikdr added the area/metal-automation Automation processes within the Metal project. label May 4, 2025
@hardikdr hardikdr linked an issue May 7, 2025 that may be closed by this pull request
@hardikdr hardikdr added this to the H1/2025 milestone May 7, 2025
@hardikdr hardikdr force-pushed the feat/multiarch-oci branch from f9a8cf5 to ce204b6 Compare May 12, 2025 10:58
@hardikdr hardikdr marked this pull request as ready for review May 13, 2025 08:36
@hardikdr hardikdr requested a review from a team as a code owner May 13, 2025 08:36
@hardikdr hardikdr changed the title Add support for milti-arch OCI builds Support for Multi-Architecture Index Manifest May 13, 2025
@hardikdr
Copy link
Member Author

For a quick test:

oras manifest fetch ghcr.io/ironcore-dev/os-images/test-image:100.4 | jq

@hardikdr hardikdr requested review from afritzler and defo89 May 13, 2025 08:59
@hardikdr hardikdr force-pushed the feat/multiarch-oci branch from 93c6cb6 to 2bc2230 Compare May 13, 2025 09:09
@afritzler
Copy link
Member

How about also adding --multi-arch --config=/path/to/config.yaml

architectures:
  amd64:
    rootfs: /path/to/amd64.rootfs
    kernel: /path/to/amd64.kernel
    # ...
  arm64:
    rootfs: /path/to/arm64.rootfs
    kernel: /path/to/arm64.kernel
    # ...

@hardikdr hardikdr force-pushed the feat/multiarch-oci branch 2 times, most recently from bd5bc0e to a9d3765 Compare May 19, 2025 15:03
@github-actions github-actions bot added size/XL and removed size/L labels May 19, 2025
@hardikdr
Copy link
Member Author

hardikdr commented May 19, 2025

How about also adding --multi-arch --config=/path/to/config.yaml

Sounds good! I've added a --config flag to support parsing from a file -- if it's not provided, it’ll just fall back to the command-line flags.

@hardikdr hardikdr force-pushed the feat/multiarch-oci branch from 291b5d1 to 0014bf5 Compare July 14, 2025 16:27
@hardikdr hardikdr force-pushed the feat/multiarch-oci branch from 82f97fd to b4de9eb Compare July 17, 2025 08:21
@hardikdr hardikdr force-pushed the feat/multiarch-oci branch 2 times, most recently from 5da70ee to 6802da1 Compare July 21, 2025 09:16
@hardikdr hardikdr force-pushed the feat/multiarch-oci branch from 6802da1 to 07c4547 Compare July 21, 2025 12:30
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 21, 2025
@hardikdr hardikdr merged commit 278f968 into main Jul 22, 2025
6 checks passed
@hardikdr hardikdr deleted the feat/multiarch-oci branch July 22, 2025 11:31
@github-project-automation github-project-automation bot moved this from In Progress to Done in Roadmap Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/metal-automation Automation processes within the Metal project. documentation Improvements or additions to documentation size/L

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Support for Multi Arch Aware OS Images

3 participants