Portal:Toolforge/Admin/Buildpacks

From Wikitech

See Wikimedia Cloud Services team/EnhancementProposals/Toolforge push to deploy for the high-level overview of buildpacks.

Updating buildpacks

Once a patch has been merged in the cloud/toolforge/buildpacks repository, a new builder image can be published from the primary image builder. As root, first git pull inside /srv/buildpacks. Then:

root@tools-docker-imagebuilder-01:/srv/buildpacks# ./make.sh --verbose --publish
Creating builder docker-registry.tools.wmflabs.org/toolforge-buster0-builder:latest from build-image docker-registry.tools.wmflabs.org/toolforge-buster0-build:latest
Using cached version of https://github.com/buildpacks/lifecycle/releases/download/v0.9.1/lifecycle-v0.9.1+linux.x86-64.tgz
Looking up buildpack org.toolforge.buildpacks.python37@0.0.1
Downloading buildpack from URI: file:///srv/buildpacks/python37
Looking up buildpack org.toolforge.buildpacks.pip@0.0.1
Downloading buildpack from URI: file:///srv/buildpacks/pip
Looking up buildpack org.toolforge.buildpacks.uwsgi@0.0.1
Downloading buildpack from URI: file:///srv/buildpacks/uwsgi
Creating builder with the following buildpacks:
-> org.toolforge.buildpacks.python37@0.0.1
-> org.toolforge.buildpacks.pip@0.0.1
-> org.toolforge.buildpacks.uwsgi@0.0.1
Successfully created builder image docker-registry.tools.wmflabs.org/toolforge-buster0-builder:latest
Tip: Run pack build <image-name> --builder docker-registry.tools.wmflabs.org/toolforge-buster0-builder:latest to use this builder

You can verify on the docker-registry frontend that a new image was published.

pack

pack is the command-line tool used to process buildpacks and build images. See the upstream documentation for more details. pack is currently only needed on instances where images are built.

It's installed via a Debian package (operations/debs/pack in Gerrit) that is imported into the local buster-tools aptly repository. For a new upstream release, you'll need to create a new upstream tarball that has all the vendored dependencies, similar to the helm package.