Updating Build Service Dependencies

Page last updated:

Visit the Build Service dependencies tile on PivNet. Build Service can be updated with those artifacts both directly against the PivNet registry or via the downloaded versions of those images.

Accessing the Tanzu Net Registry

The Tanzu Net registry (registry.pivotal.io) contains the stack and buildpack images needed to keep Tanzu Build Service up to date to keep applications secure. Once you log in to the Tanzu Net registry, you can use the kp CLI to update dependencies.

You will need the docker CLI to authenticate with the Tanzu Net registry.

To log in to the Tanzu Net registry, run:

docker login registry.pivotal.io

When prompted for a username and password, use the same credentials that you used to log in to Tanzu Net.

Online update of Dependencies

If the kp CLI has access to pull images from the TanzuNet Registry. The stack images and buildpacks used by build service can be updated using the following commands.

Stacks Update

Update the stacks:

kp stack update base --build-image registry.pivotal.io/tbs-dependencies/build-base@sha256:<image-sha> --run-image registry.pivotal.io/tbs-dependencies/run-base@sha256:<image-sha>
kp stack update default --build-image registry.pivotal.io/tbs-dependencies/build-full@sha256:<image-sha> --run-image registry.pivotal.io/tbs-dependencies/run-full@sha256:<image-sha>
kp stack update full --build-image registry.pivotal.io/tbs-dependencies/build-full@sha256:<image-sha> --run-image registry.pivotal.io/tbs-dependencies/run-full@sha256:<image-sha>
kp stack update tiny --build-image registry.pivotal.io/tbs-dependencies/build-tiny@sha256:<image-sha> --run-image registry.pivotal.io/tbs-dependencies/run-tiny@sha256:<image-sha>

Note: Both build and run images need to be provided to update the stack.

The updated stack can be viewed with the following command:

kp stack status <stack-name>

Store Update

Update a store:

kp store add <store-name> registry.pivotal.io/tbs-dependencies/<buildpack-name>:<buildpack-tag>

Additionally, multiple buildpacks can be added to Build Service by passing multiple image references

kp store add <store-name> registry.pivotal.io/tbs-dependencies/<buildpack1>:<buildpack1-tag> registry.pivotal.io/tbs-dependencies/<buildpack2>:<buildpack2-tag> registry.pivotal.io/tbs-dependencies/<buildpack3>:<buildpack3-tag>

To list the buildpacks now available in the store:

kp store status <store-name>

Offline update of Dependencies

If the kp CLI cannot access the images in the Pivnet Registry, the stack images and buildpacks used by build service can be updated by first downloading those images and saving them as .tar files. These file can be provided to the kp CLI to upload to build service.

Stack Update

Fetch the stack images into the docker daemon:

docker pull registry.pivotal.io/tbs-dependencies/build-full@sha256:<image-sha>
docker pull registry.pivotal.io/tbs-dependencies/run-full@sha256:<image-sha>

Save those images to disk:

docker save registry.pivotal.io/tbs-dependencies/build-full@sha256:<image-sha> > build.tar
docker save registry.pivotal.io/tbs-dependencies/run-full@sha256:<image-sha> > run.tar

Update the stack with the saved image:

kp stack update full --build-image build.tar --run-image run.tar

Note: Both build and run images need to be provided to update the stack.

The updated stack can be viewed with the following command:

kp stack status

Store Update

Offline store updates using the Tanzu Net registry is not currently supported but will be in upcoming releases.