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

Enhance ironcore-image with Platform-Specific Layer Support and CPU Architecture Variants #101

Open
afritzler opened this issue Dec 4, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@afritzler
Copy link
Member

afritzler commented Dec 4, 2023

Description

The ironcore-image project, responsible for defining the OCI manifest for our Operating System images, currently includes layers like rootfs, initramfs, and kernel. We need to improve this project by introducing platform-specific support, where each platform type holds a distinct subset of these layers. Additionally, the project should be capable of handling different CPU architectures, specifically arm64 and amd64.

Requirements

  1. Platform Support:

    • virtualization platform should include only the rootfs layer.
    • baremetal platform should encompass kernel, initramfs, and rootfs layers.
  2. CPU Architecture Support:

    • Ensure compatibility with arm64 and amd64 architectures.

Expected Outcome

  • Enhanced flexibility in the ironcore-image project to generate OCI manifests tailored to specific platform requirements.
  • Robust support for the primary CPU architectures in use, enhancing our OS image's compatibility and reach.

Additional Context

  • This enhancement is crucial for optimizing our OS images for different deployment scenarios, like virtualized environments versus bare-metal setups.
  • Consideration for the varying requirements of arm64 and amd64 architectures is essential for broadening our OS's applicability.

Sample Manifest

An ironcore-image OCI Specification Draft could look like the following:

schemaVersion: 2.0
mediaType: application/vnd.oci.image.manifest.v1+json

# Manifests for different platforms and architectures
manifests:
  - # Virtualization platform - rootfs only
    mediaType: application/vnd.oci.image.manifest.v1+json
    platform:
      architecture: amd64
      os: linux
      variant: virtualization
    layers:
      - mediaType: application/vnd.oci.image.layer.v1.tar+gzip
        digest: "<digest-rootfs-amd64>"
        size: <size>
        annotations:
          title: "rootfs"

  - # Virtualization platform - rootfs only (ARM64)
    mediaType: application/vnd.oci.image.manifest.v1+json
    platform:
      architecture: arm64
      os: linux
      variant: virtualization
    layers:
      - mediaType: application/vnd.oci.image.layer.v1.tar+gzip
        digest: "<digest-rootfs-arm64>"
        size: <size>
        annotations:
          title: "rootfs"

  - # Baremetal platform - kernel, initramfs, rootfs (AMD64)
    mediaType: application/vnd.oci.image.manifest.v1+json
    platform:
      architecture: amd64
      os: linux
      variant: baremetal
    layers:
      - mediaType: application/vnd.oci.image.layer.v1.tar+gzip
        digest: "<digest-kernel-amd64>"
        size: <size>
        annotations:
          title: "kernel"
      - mediaType: application/vnd.oci.image.layer.v1.tar+gzip
        digest: "<digest-initramfs-amd64>"
        size: <size>
        annotations:
          title: "initramfs"
      - mediaType: application/vnd.oci.image.layer.v1.tar+gzip
        digest: "<digest-rootfs-amd64>"
        size: <size>
        annotations:
          title: "rootfs"

  - # Baremetal platform - kernel, initramfs, rootfs (ARM64)
    mediaType: application/vnd.oci.image.manifest.v1+json
    platform:
      architecture: arm64
      os: linux
      variant: baremetal
    layers:
      - mediaType: application/vnd.oci.image.layer.v1.tar+gzip
        digest: "<digest-kernel-arm64>"
        size: <size>
        annotations:
          title: "kernel"
      - mediaType: application/vnd.oci.image.layer.v1.tar+gzip
        digest: "<digest-initramfs-arm64>"
        size: <size>
        annotations:
          title: "initramfs"
      - mediaType: application/vnd.oci.image.layer.v1.tar+gzip
        digest: "<digest-rootfs-arm64>"
        size: <size>
        annotations:
          title: "rootfs"
# Replace <digest-*> and <size> with actual hash values and sizes of the layers.
@afritzler afritzler added the enhancement New feature or request label Dec 4, 2023
@afritzler afritzler removed this from Integration Dec 4, 2023
@afritzler afritzler added this to Core Dec 4, 2023
@afritzler afritzler moved this to Todo in Core Dec 4, 2023
@afritzler afritzler moved this to Todo in Roadmap Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Status: Todo
Development

No branches or pull requests

1 participant