-
Notifications
You must be signed in to change notification settings - Fork 264
Description
Cloud Native Buildpack Artifact Types
Cloud Native Buildpacks (CNB) is a spec-driven project used for transforming source code to OCI Images. At the time of writing, CNB is a CNFC incubating project.
Developers and platform operators interested in using CNB should have a great discoverability story for finding and learning more about two artifact types:
- CNB Component Buildpacks
- CNB Builders
In service to that goal, this is a proposal for Artifact Hub to support these artifact types.
Artifact Types
Component Buildpacks
Component Buildpacks are often referred to as simply "buildpacks".
Component buildpacks are distributed as OCI artifacts that contain metadata and executables used for the CNB build and detect processes.
Component buildpacks are typically used to build language-specific applications. There are many community buildpacks such as heroku buildpacks and paketo buildpacks. A reference to the CNB registry, which indexes community buildpacks, is provided later in this document.
Builders
Builders are distributed as OCI Images that contain metadata, component buildpack layers, and a lifecycle executable (used to assemble the end-result application OCI Image).
Builders are typically used by platform operators that support a number of languages in which applications can be built. For example, if a platform supports python and node, a Builder will contain python and node buildpacks. A platform typically creates its own Builder(s) that may be of use to the community. For example, here are the Heroku Builders and the Paketo Builders.
Discoverability Today
CNB runs a bespoke, centralized registry for community buildpacks today, hosted at https://registry.buildpacks.io/. This registry provides basic discoverability. For example, see the search results for python buildpacks. This registry does not host the artifacts themselves. It serves as an index which refers to the registry that hosts a buildpack. This example demonstrates a buildpack where some versions are hosted on gcr and some versions hosted on docker.io.
This registry is utilized by the CNB cli tool, pack, as one method of exploring, discovering, and resolving buildpacks.
Community buildpacks are indexed via the registry-index project. Users may add community buildpacks by submitting an issue to the registry index project via the pack tool. Here is an example. The existing registry-index has an ownership model for component buildpacks, outlined at the bottom of this page and illustrated by this example.
The registry api (https://registry.buildpacks.io/) utilizes the registry-index as the source of truth for community component buildpacks. This API is used by pack.
This registry supports component buildpacks and not builders.
Artifact Hub Integration
It would improve the CNB artifact discoverability story to define and integrate Component Buildpacks and Builders. My understanding is that Artifact Hub exists to support this kind of mission.
As mentioned, CNB has an index for community Buildpacks, but not an index for Builders.
Questions
Does this seem like a good fit for Artifact Hub?
Can we continue using the existing CNB community buildpack registry? Perhaps we could create a specialized tracker source for component buildpacks? Does it make sense for CNB to create a registry/index for builders before integrating with Artifact Hub?
Does CNB need to host an instance of Artifact Hub from which ArtifactHub.io pulls?
Closing Thoughts
Before integrating with Artifact Hub, we would want sign-off on the CNB side. CNB is a spec-driven project and decisions like this are generally discussed and approved through a formal RFC process. Here is a CNB RFC for integrating with Artifact Hub. It is a concept of a plan. When we are in agreement about specifics of what must be done in order to support these new Artifact Hub artifact types (and I understand more about Artifact Hub), I can finish up that CNB RFC and work to get it through the approval process.
We are interested in integrating CNB artifacts with Artifact Hub, but we don't want ArtifactHub.io to be a hard dependency for the pack tool. Perhaps an "extension" of the CNB project would be how we would like to think about it.
I would love to get some feedback from yall on this request, and I'm happy to answer questions yall may have.
Thank you for your time and consideration!