Tanzu Application Service – Part 2: Download required artifacts from tanzu network

Reading Time: 3 mins

Go to Tanzu Network and sign up for a new account if you don’t have one, if already created then just sign in.

VMware Tanzu Network is a catalog of software artifacts published by VMware, including the Tanzu Application Service (TAS), Operations Manager, TAS service tiles, Health watch, Harbor, Concourse for VMware Tanzu and partner products that are part of the Tanzu ecosystem.

In the search field, type “VMware Tanzu Application Service for VMs”

By default, it points to latest release. If you are looking any specific version then select from drop down. In this post, I am using “2.12.1”

For a given release, a product will consist one or more downloadable software artifacts, VMware Tanzu Application Service for VMs has 3 artifacts named:

  • Small Footprint PAS
  • CF CLI
  • Pivotal Application Service

If you see any warning like shown below, the click on “Click here to sign the EULA” to agree and to view the pivnet CLI commands click on “i” symbol next to the artifact.  In this post I will be using Small Footprint PAS which is ideal for POC or test environment, which deploys only few vm’s when compared to Pivotal Application Service which is recommended to use in production.

Once you login to tanzu network, click on your username in top right corner of the page > select Edit Profile, scroll down and click on Request New Refresh Token.

Now vi ~/.env and add the below line

PIVNET_TOKEN=<<token u obtained after clicking on Request New Refresh token>>

#Source your environment file and verify that the PIVNET_TOKEN environment variable is now set using below commands:

source ~/.env

Install Pivnet CLI

Download the Pivnet CLI from https://github.com/pivotal-cf/pivnet-cli/releases using below command:

wget https://github.com/pivotal-cf/pivnet-cli/releases/download/v3.0.1/pivnet-linux-amd64-3.0.1

#Rename pivnet file, make it executable, and move it to your $PATH (e.g. /usr/local/bin) using

chmod +x pivnet-linux-amd64-3.0.1
mv pivnet-linux-amd64-3.0.1 /usr/local/bin/pivnet

#Login to pivnet using below command:

pivnet login --api-token=${PIVNET_TOKEN}

Below pivnet commands will help you get some understanding and I recommend you to try without miss.

pivnet products --help
# list products:
pivnet products
# show product information:
pivnet product -p <product-name>
# list releases for a product:
pivnet releases -p <product-name>
# list files for a specific product release:
pivnet product-files -p <product-name> -r <product-version>
# accept the EULA for each product
pivnet accept-eula -p <product-name> -r <product-version>
# download specific product files
pivnet download-product-files -p <product-name> -r <product-version> -i <product-id>

Product files can be downloaded from network pages as well, but you might get an error message if EULA is not accepted.

Use pivnet CLI to download the following artifacts:

How to easily download the artifacts into jumpbox? Go to the corresponding artifact page in network pages, select the required version of release from the dropdown. Locate the file you need to download and click on “i” icon to get the pivnet command.

For ex:

#GCP Terraform templates 
pivnet download-product-files --product-slug='elastic-runtime' --release-version='2.9.5' --product-file-id=697856

#Tanzu Ops Manager YAML for GCP
pivnet download-product-files --product-slug='ops-manager' --release-version='2.10.21' --product-file-id=1083355

pivnet download-product-files --product-slug='elastic-runtime' --release-version='2.12.1' --product-file-id=1022193

After successful execution of pivnet download-product-files command in jumpbox, you can list the files using “ls”.