This topic describes how to install API Validation and Scoring from the Tanzu Application Platform package repository.
Before installing API Validation and Scoring, complete the following prerequisites:
-
Create a Tanzu Network account to download Tanzu Application Platform packages.
-
Provision Kubernetes cluster v1.22, v1.23 or v1.24 on Amazon Elastic Kubernetes Service.
Note The Installation of API scoring and validation package must be done on a new cluster without any existing Tanzu Application Platform installations.
-
Install Kubernetes CLI. For more information, see Install Tools in the Kubernetes documentation.
To deploy API Validation and Scoring package, your cluster must have at least:
- 5 nodes.
- 4 vCPUs available per node.
- 16 GB of RAM available per node.
- 100 GB of disk space available across all nodes.
VMware recommends relocating the images from VMware Tanzu Network registry to your own container image registry before attempting installation. API Validation and Scoring depends on VMware Tanzu Network for continued operation. If you don’t relocate the images, VMware Tanzu Network offers no uptime guarantees. The option to skip relocation is documented for evaluation and proof-of-concept only.
To relocate images from the VMware Tanzu Network registry to your registry:
-
Set up environment variables for installation use by running:
export IMGPKG_REGISTRY_HOSTNAME_0=registry.tanzu.vmware.com export IMGPKG_REGISTRY_USERNAME_0=MY-TANZUNET-USERNAME export IMGPKG_REGISTRY_PASSWORD_0=MY-TANZUNET-PASSWORD 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-REGISTRY-USER
is the user with write access toMY-REGISTRY
.MY-REGISTRY-PASSWORD
is the password forMY-REGISTRY-USER
.MY-REGISTRY
is your own container registry.MY-TANZUNET-USERNAME
is the user with access to the images in the VMware Tanzu Network registryregistry.tanzu.vmware.com
MY-TANZUNET-PASSWORD
is the password forMY-TANZUNET-USERNAME
.VERSION-NUMBER
is your API Validation and Scoring package version. For example,0.2.5
TARGET-REPOSITORY
is your target repository, a folder/repository onMY-REGISTRY
that serves as the location for the installation files for API Validation and Scoring.
-
[Install the Carvel tool imgpkg CLI](https://docs.vmware.com/en/Cluster-Essentials-for-VMware-Tanzu/{{ vars.url_version }}/cluster-essentials/deploy.html#optionally-install-clis-onto-your-path).
To query for the available
imgpkg
CLI versions on VMWare Tanzu Network Registry, run:imgpkg tag list -i registry.tanzu.vmware.com/tanzu-application-platform/apix | sort -V
-
Relocate the images with the
imgpkg
CLI by running:imgpkg copy -b registry.tanzu.vmware.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.
Relocate images to a registry is strongly recommended but not required for installation. If you skip this step, you can use the following values to replace the corresponding variables:
INSTALL_REGISTRY_HOSTNAME
isregistry.tanzu.vmware.com
INSTALL_REPO
istanzu-application-platform
.INSTALL_REGISTRY_USERNAME
andINSTALL_REGISTRY_PASSWORD
are the credentials for the VMware Tanzu Network registryregistry.tanzu.vmware.com
APIX_VERSION
is your API Validation and Scoring package version. For example,0.2.5
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.
-
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
isReconcile 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 Application Platform GUI or Backstage host that you want to point to. For example,https://tap-gui.view-cluster.com
BACKSTAGE-PORT
is the Tanzu Application Platform GUI 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'