Skip to content

Latest commit

 

History

History
202 lines (145 loc) · 8.18 KB

install.hbs.md

File metadata and controls

202 lines (145 loc) · 8.18 KB

Install API Validation and Scoring

This topic describes how to install API Validation and Scoring from the Tanzu Application Platform package repository.

Prerequisites

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

  1. Create a Tanzu Network 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.

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

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:

  1. 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 to MY-REGISTRY.
    • MY-REGISTRY-PASSWORD is the password for MY-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 registry registry.tanzu.vmware.com
    • MY-TANZUNET-PASSWORD is the password for MY-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 on MY-REGISTRY that serves as the location for the installation files for API Validation and Scoring.
  2. [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
  3. 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

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.

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 is registry.tanzu.vmware.com
  • INSTALL_REPO is tanzu-application-platform.
  • INSTALL_REGISTRY_USERNAME and INSTALL_REGISTRY_PASSWORD are the credentials for the VMware Tanzu Network registry registry.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:

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