How to test buildpack download functionality locally
search cancel

How to test buildpack download functionality locally

book

Article ID: 298303

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

If issues while downloading buildpacks during app deployment occur, it is possible to create a signed URL to test downloading the buildpack locally.

Environment

Product Version: 2.11

Resolution

1. SSH onto one of the Cloud Controllers within the foundation:
$ bosh -d <DEPLOYMENT> ssh cloud_controller/0

2. Run the following command to access the Ruby Cloud Controller Console:
$ /var/vcap/jobs/cloud_controller_ng/bin/console

3. Run the following once a prompt is available in the console. Replace <BUILDPACK> with the buildpack name you wish to use:
$ buildpack = Buildpack.where(name: '<BUILDPACK>').first
Note: In the following example the "java_buildpack_offline" buildpack is used.
Screenshot 2023-08-14 at 12.26.30 PM.png

4. Run the following command and replace "GUID" and "sha256_checksum" with the GUID and sha256_checksum from the output of the previous command:
$ CloudController::DependencyLocator.instance.buildpack_blobstore.blob("<GUID_sha256_checksum>").public_download_url
Note: Be sure to include an underscore "_" between the GUID and sha256_checksum values as shown in the below example.
Screenshot 2023-08-14 at 12.28.40 PM.png

5. Use the generated URL to download the buildpack locally or on a jumpbox:
$ wget "DOWNLOAD_URL" -O buildpack.zip --no-check-certificate
Screenshot 2023-08-14 at 12.31.23 PM.png