Install API Validation and Scoring

This topic tells you how to install API Validation and Scoring from the Tanzu Application Platform (commonly known as TAP) package repository.

Prerequisites

Before installing API Validation and Scoring, complete the following prerequisites:

  1. Create a Broadcom Support account to download Tanzu Application Platform packages.
  2. 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.

  3. Install Tanzu CLI.
  4. Install kapp.
  5. Install Kubernetes CLI. For more information, see Install Tools in the Kubernetes documentation.
  6. Deploy Cluster Essentials

Resource requirements

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.

Relocate images to a registry

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:

  1. Retrieve your Broadcom registry API token:

    1. Sign in to the Broadcom Support Portal.

    2. Go to Tanzu Application Platform (TAP) and expand the VMware Tanzu Application Platform dropdown.

    3. Click the Token Download icon next to the Tanzu Application Platform version you want to download.

      Screenshot of the Tanzu Application Platform download page in the Broadcom Support Portal
with the Token Download icon highlighted.

    4. 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.

  2. 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.
  3. 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
    
  4. 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
    

Add the API Validation and Scoring package repository

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:

  1. 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.

  2. 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
    
  3. 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
    
  4. 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
    
  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

Install

Follow these steps to install the API Validation and Scoring package:

  1. 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
  2. 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
    
  3. 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

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'
check-circle-line exclamation-circle-line close-line
Scroll to top icon