Managing Stores

Page last updated:

A Store provides a collection of buildpacks that can be utilized by Builders. Buildpacks are distributed and added to a store in buildpackages which are docker images containing one or more buildpacks.

Build Service ships with a curated collection of Tanzu buildpacks for Java, and Paketo buildpacks for Nodejs, go, PHP, nginx, httpd, and .NET Core. It is important to keep these buildpacks up-to-date. Updates to these buildpacks are provided on the Tanzu Network Build Service Dependency page.

In addition to supported Tanzu and Paketo buildpacks, custom buildpackages can be uploaded to Build Service stores.

Creating Buildpacks and Buildpackages

Documentation for creating buildpacks is available here.

Documentation for creating buildpackages is available here.

Note: Only Build Service Admins can perform store commands.

Listing Stores

Users can view the existing stores with:

kp store list

Creating a Store

Tanzu Build Service ships with a default store containing all of the supported buildpacks. Users can create additional stores with:

kp store create <store-name> <buildpackage-1> <buildpackage-2> --default-repository <image-repository>

Where <image-repository> is the Docker repository where the buildpackage images will be stored. This can be set to the same value used during installation for the docker_repository during the duffle install described in the install docs.

Note: The user must have read access to the source Docker registry and write access to the registry used for the default-repository on the local machine.

Adding Buildpackages to a Store

Users can add multiple buildpackages at a time from a registry or from a file on the local machine:

  • If using a Docker registry:

    kp store add <store-name> <buildpackage-1> <buildpackage-2> ...
    

Note: The user must have read access to the source Docker registry and write access to build service registry on the local machine.

  • If using local .cnb buildpackage files created as described in the buildpackages docs:

    kp store add <store-name> <path-to-buildpackage-1>.cnb <path-to-buildpackage-2>.cnb ...
    

Removing Buildpackages from a Store

Users can remove a buildpackage from a store:

kp store remove <store-name> <buildpackage>

Note: Buildpackages must be removed from stores by full image reference. The <buildpackage> args should include their digests and will look like registry.io/repository@sha256:.

Store Status

Users can use the kp CLI to get details about a store including buildpackages and their buildpacks, as well as meta-buildpacks. Meta-buildpacks are buildpacks that indicate the order that other buildpacks run:

To view the buildpackages in a store:

kp store status <store-name>

To view buildpackages & their individual buildpacks as well as display the order of meta-buildpacks:

kp store status <store-name> --verbose

Corresponding kpack Resource

All Build Service builders utilize cluster scoped Store Resources.