This topic tells you how to install API Validation and Scoring from the Tanzu Application Platform (commonly known as TAP) package repository.
Before installing API Validation and Scoring, complete the following prerequisites:
Provision Kubernetes cluster v1.22, v1.23 or v1.24 on Amazon Elastic Kubernetes Service.
NoteThe Installation of API scoring and validation package must be done on a new cluster without any existing Tanzu Application Platform installations.
To deploy API Validation and Scoring package, your cluster must have at least:
Before installation, you must relocate the Tanzu Application Platform images from tanzu.packages.broadcom.com
to your own container image registry.
The supported registries are Harbor, Azure Container Registry, Google Container Registry, and Quay.io. See the following documentation to learn how to set up your container image registry:
To relocate images from tanzu.packages.broadcom.com
to your registry:
Retrieve your Broadcom registry API token:
Sign in to the Broadcom Support Portal.
Go to Tanzu Application Platform (TAP) and expand the VMware Tanzu Application Platform dropdown.
Click the Token Download icon next to the Tanzu Application Platform version you want to download.
Follow the instructions in the dialog box. Save the token as a variable named MY_BROADCOM_SUPPORT_ACCESS_TOKEN
. For example:
export MY_BROADCOM_SUPPORT_ACCESS_TOKEN=API-TOKEN
Where API-TOKEN
is your token from the Broadcom Support Portal.
Set up environment variables for installation use by running:
export IMGPKG_REGISTRY_HOSTNAME_0=tanzu.packages.broadcom.com
export IMGPKG_REGISTRY_USERNAME_0=MY-BROADCOM-SUPPORT-USERNAME
export IMGPKG_REGISTRY_PASSWORD_0=${MY_BROADCOM_SUPPORT_ACCESS_TOKEN}
export IMGPKG_REGISTRY_HOSTNAME_1=MY-REGISTRY
export IMGPKG_REGISTRY_USERNAME_1=MY-REGISTRY-USER
export IMGPKG_REGISTRY_PASSWORD_1=MY-REGISTRY-PASSWORD
export INSTALL_REGISTRY_USERNAME="${IMGPKG_REGISTRY_USERNAME_1}"
export INSTALL_REGISTRY_PASSWORD="${IMGPKG_REGISTRY_PASSWORD_1}"
export APIX_VERSION=VERSION-NUMBER
export INSTALL_REPO=TARGET-REPOSITORY
Where:
MY-BROADCOM-SUPPORT-USERNAME
is the user with access to the images in tanzu.packages.broadcom.com
.MY-REGISTRY
is your own container registry.MY-REGISTRY-USER
is the user with write access to MY-REGISTRY
.MY-REGISTRY-PASSWORD
is the password for MY-REGISTRY-USER
.VERSION-NUMBER
is your API Validation and Scoring package version. For example, 0.2.5
TARGET-REPOSITORY
is your target repository, a folder/repository on MY-REGISTRY
that serves as the location for the installation files for API Validation and Scoring.Install the Carvel tool imgpkg CLI.
To query for the available imgpkg
CLI versions on tanzu.packages.broadcom.com
, run:
imgpkg tag list -i tanzu.packages.broadcom.com/tanzu-application-platform/apix | sort -V
Relocate the images with the imgpkg
CLI by running:
imgpkg copy -b tanzu.packages.broadcom.com/tanzu-application-platform/apix:${APIX_VERSION} --to-repo ${INSTALL_REGISTRY_HOSTNAME}/${INSTALL_REPO}/apix
Tanzu CLI packages are available on repositories. Adding the API Validation and Scoring package repository makes the packages available for installation.
To add the API Validation and Scoring package repository to your cluster:
Create a namespace called apix-install
for deploying API Validation and Scoring package by running:
kubectl create ns apix-install
This namespace keeps the objects grouped together logically.
Create a secret for adding the API Validation and Scoring package repository:
tanzu secret registry add tap-registry --username ${INSTALL_REGISTRY_USERNAME} --password ${INSTALL_REGISTRY_PASSWORD} --server ${INSTALL_REGISTRY_HOSTNAME} --export-to-all-namespaces --yes --namespace apix-install
Add the API Validation and Scoring package repository to the cluster by running:
tanzu package repository add apix-repository \
--url ${INSTALL_REGISTRY_HOSTNAME}/${INSTALL_REPO}/apix:${APIX_VERSION} \
--namespace apix-install
Verify the package installation by running:
tanzu package available list -n apix-install
If the package installed, expect to see the output that resembles the following:
NAME DISPLAY-NAME SHORT_DESCRIPTION LATEST-VERSION
apix.apps.tanzu.vmware.com apix apix.apps.tanzu.vmware.com 0.2.5
Get the status of the API Validation and Scoring package repository by running:
tanzu package repository get apix-repository --namespace apix-install
For example:
~ % tanzu package repository get apix-repository --namespace apix-install
NAME: apix-repository
VERSION: 796582
REPOSITORY: projects.registry.vmware.com/mazinger/apix
TAG: 0.2.5
STATUS: Reconcile succeeded
REASON:
Verify the STATUS
is Reconcile succeeded
Follow these steps to install the API Validation and Scoring package:
To overwrite the default values when installing the package, create the apix-values.yaml
file:
apix:
host: "HOST"
backstage:
host: "BACKSTAGE-HOST"
port: "BACKSTAGE-PORT"
Where:
HOST
is the hostname of the API Validation and Scoring GUI. It can be left empty ""
to use the default value.BACKSTAGE-HOST
is the Tanzu Developer Portal or Backstage host that you want to point to. For example, https://tap-gui.view-cluster.com
BACKSTAGE-PORT
is the Tanzu Developer Portal or Backstage port that you want to point to. For example, 443
Install the API Validation and Scoring package using the Tanzu CLI by running:
tanzu package install apix -n apix-install -p apix.apps.tanzu.vmware.com -v ${APIX_VERSION} -f apix-values.yaml
Verify that STATUS is Reconcile succeeded
by running:
tanzu package installed get apix -n apix-install
If your package successfully reconciled, expect to see the output that resembles the following::
NAME: apix
PACKAGE-NAME: apix.apps.tanzu.vmware.com
PACKAGE-VERSION: 0.2.5
STATUS: Reconcile succeeded
CONDITIONS: [{ReconcileSucceeded True }]
USEFUL-ERROR-MESSAGE:
Uninstall the API Validation and Scoring package by running:
tanzu package installed delete apix -n apix-install
For example:
% tanzu package installed delete apix -n apix-install
Deleting installed package 'apix' in namespace 'apix-install'. Are you sure? [y/N]: y
Uninstalling package 'apix' from namespace 'apix-install'
Getting package install for 'apix'
Deleting package install 'apix' from namespace 'apix-install'
'PackageInstall' resource deletion status: Deleting
Deleting admin role 'apix-apix-install-cluster-role'
Deleting role binding 'apix-apix-install-cluster-rolebinding'
Deleting secret 'apix-apix-install-values'
Deleting service account 'apix-apix-install-sa'
Uninstalled package 'apix' from namespace 'apix-install'