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

WIP added image-index methods #2

Merged
merged 61 commits into from
Apr 2, 2024

Conversation

WYGIN
Copy link

@WYGIN WYGIN commented Dec 8, 2023

CNB Pack Manifest Commands: Streamlining Multi-Architecture Image Management

This proposal introduces a new experimental set of commands to the CNB tooling ecosystem: pack manifest. These commands empower buildpack authors to efficiently manage and distribute multi-architecture images, aligning with functionalities offered by existing tools like podman manifest and docker manifest.

Key Features:

  • Create manifest lists: Construct local manifest lists for annotating and pushing to container registries.
  • Annotate manifests: Add essential information like architecture, OS, or variant to existing manifest lists.
  • Add/remove images: Manage individual image entries within manifest lists.
  • Push manifests: Publish constructed manifest lists to container registries.
  • Inspect manifests: View detailed information about locally stored manifest lists.

Benefits:

Simplified workflows: Centralized management of multi-architecture image variants for efficient distribution.
Enhanced interoperability: Potential adherence to established standards for seamless integration with existing tools and runtimes.
Improved developer experience: Streamlined workflows and user-friendly commands for managing manifest lists.
Target Users:

Buildpack authors seeking to distribute their buildpacks across diverse architectures.

Example Workflow:

Create a manifest list:

pack manifest create cnbs/sample-package:hello-multiarch-universe \
    cnbs/sample-package:hello-universe \
    cnbs/sample-package:hello-universe-windows

Annotate architecture:

pack manifest annotate --arch amd64 cnbs/sample-package:hello-multiarch-universe cnbs/sample-package:hello-universe
pack manifest annotate --arch amd64 cnbs/sample-package:hello-multiarch-universe cnbs/sample-package:hello-universe-windows

Push to registry:

pack manifest push cnbs/sample-package:hello-multiarch-universe

Current Status:

These commands are initially experimental and gated behind the pack config experimental flag. They will transition to supported status upon deemed readiness by maintainers.

This innovative addition to the CNB ecosystem empowers buildpack authors to streamline multi-architecture image management, fostering efficient distribution and enhanced developer experiences.

Development setup:

This guide outlines the steps to set up your development environment and test the pack manifest commands under development in the image-index branch of the github.com/WYGIN/buildpacks-pack repository against the github.com/WYGIN/buildpacks-imgutil repository.

Prerequisites:

  • Docker installed and running on your system.
  • Git version control system installed.

Steps:

  1. Clone the repositories:
git clone https://github.com/WYGIN/buildpacks-pack.git
  1. Navigate to the buildpacks-pack repository:
cd buildpacks-pack
  1. Checkout the image-index branch:
git checkout image-index
  1. Build the pack binary:
make build
  1. Install the pack binary:
sudo make install
  1. Enable pack's experimental features:
pack config experimental true
  1. Run pack manifest:
pack manifest create cnbs/sample-package:hello-multiarch-universe \
     cnbs/sample-package:hello-universe \

     cnbs/sample-package:hello-universe-windows
# annotate first image
pack manifest annotate --arch amd64 cnbs/sample-package:hello-multiarch-universe cnbs/sample-package:hello-universe
# annotate second image
pack manifest annotate --arch amd64 cnbs/sample-package:hello-multiarch-universe cnbs/sample-package:hello-universe-windows
pack manifest add cnbs/sample-package:hello-multiarch-universe \
					cnbs/sample-package:hello-universe-riscv-linux
pack manifest delete cnbs/sample-package:hello-multiarch-universe
pack manifest rm cnbs/sample-package:hello-multiarch-universe \
					cnbs/sample-package:hello-universe-windows
pack manifest push cnbs/sample-package:hello-multiarch-universe
pack manifest inspect cnbs/sample-builder:multiarch

Resolves:

  1. issue: Create an new interface to handle Manifest Lists #188

Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
… index

Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
…il.Index

Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
… loaded from local filesystem

Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
@WYGIN WYGIN marked this pull request as ready for review February 2, 2024 13:15
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
WYGIN and others added 17 commits February 13, 2024 22:53
Signed-off-by: Sai Kiran Maggidi <107541780+WYGIN@users.noreply.github.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
…il.Image

Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
cnb_image.go Outdated Show resolved Hide resolved
cnb_image.go Outdated Show resolved Hide resolved
WYGIN and others added 6 commits March 15, 2024 08:41
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>
Signed-off-by: WYGIN <wygininc@gmail.com>

Author:    WYGIN <wygininc@gmail.com>
Date:      Sat Mar 30 07:52:55 2024 +0000
Changes to be committed:
	modified:   index.go
	modified:   index/new.go
	modified:   index_test.go
	modified:   new.go
	modified:   new_test.go
	modified:   util.go
	modified:   util_test.go
Signed-off-by: WYGIN <wygininc@gmail.com>

Author:    WYGIN <wygininc@gmail.com>
Date:      Sat Mar 30 08:07:30 2024 +0000
Changes to be committed:
	modified:   util_test.go
Signed-off-by: Sai Kiran <sai90100msk@gmail.com>
@jjbustamante jjbustamante merged commit ce6569d into husni-faiz:dev-image-index Apr 2, 2024
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.

3 participants