VMware Tanzu Application Platform is a powerful layer built on top of Kubernetes. Utilizing native Kubernetes primitives, Tanzu Application Platform provides developers with an easier way to build, deploy, and manage applications on top of Kubernetes, all while still exposing the powerful features that make Kubernetes so desirable.
Following this guide, you will deploy Tanzu Application Platform using the light
profile. Tanzu Application Platform uses profile-based installations to install only the components necessary to complete tasks associated with certain roles. The light
profile is meant for developers building applications and using an inner-loop development workflow for rapid iteration and testing.
Using the light
profile, you will be able to quickly and easily test and deploy your applications to your development Kubernetes cluster. You will receive rapid feedback from live code updates, as well as get a view of how your application is performing on a cluster that closely mimics the production environment.
In this guide, you will do some quick prep work to get your Kubernetes cluster ready for the install. Then you will use a simple deployment YAML template and a single CLI command to kick off the install. And once installed, you can start exploring your test environment.
By the end of this guide, you will have a development platform deployed on top of Kubernetes, which is ready for you to deploy a workload on to.
These are some assumptions you should be aware of before proceeding with this guide:
v1.0
.v12.0
“Monterey” line. Commands provided in this guide make these assumptions.pivnet
installed - This guide walks you through setting up your account on the Tanzu Network, as well as installing the pivnet
CLI tool.tanzu
CLI installed and configured - This guide walks you through downloading, installing, and using the tanzu
CLI tool.kubectl
context is pointed to this cluster. Cluster and resource requirements can be found here./etc/hosts
file to handle routing. However, you may decide you want to set up DNS routing and records to access your install. More on this later in this guide.In order to make some commands easier to run, you should define some local environment variables. These will include sensitive information, such as passwords. This information will be stored in your shell history file. Be aware of this before proceeding, and consider this section optional.
Define your Tanzu Network credentials.
export INSTALL_REGISTRY_USERNAME=your-tanzu-network-username
export INSTALL_REGISTRY_PASSWORD=your-tanzu-network-password
Define your Docker Hub credentials.
export DOCKER_HUB_USERNAME=your-docker-hub-username
export DOCKER_HUB_PASSWORD=your-docker-hub-password
Define your GitHub credentials.
export GITHUB_USERNAME=your-github-username
Define your custom domain name.
export CUSTOM_DOMAIN=example.com
Define other miscellaneous environment variables.
export INSTALL_BUNDLE=registry.tanzu.vmware.com/tanzu-cluster-essentials/cluster-essentials-bundle@sha256:82dfaf70656b54dcba0d4def85ccae1578ff27054e7533d08320244af7fb0343
export INSTALL_REGISTRY_HOSTNAME=registry.tanzu.vmware.com
here are a couple of quick steps necessary to perform against your Kubernetes cluster before we get started with the Tanzu Application Platform install. In this section, you will install Cluster Essentials for VMware Tanzu.
Download the bundle for Cluster Essentials for VMware Tanzu. For bundles for platforms other than MacOS, go here.
pivnet download-product-files --product-slug='tanzu-cluster-essentials' --release-version='1.0.0' --product-file-id=1105820
Create a local directory for Tanzu Cluster Essentials. This is where the install scripts and other packages will be placed.
mkdir ~/tanzu-cluster-essentials
Unpack the tar
file into this directory.
tar -xvf tanzu-cluster-essentials-darwin-amd64-1.0.0.tgz -C ~/tanzu-cluster-essentials
Change directories to the tanzu-cluster-essentials
directory.
cd ~/tanzu-cluster-essentials
Run the install script.
./install.sh
Copy kapp
to your $PATH
.
sudo cp ~/tanzu-cluster-essentials/kapp /usr/local/bin/kapp
Create a namespace to install Tanzu Application platform to.
kubectl create ns tap-install
Your cluster is now ready to start the install of Tanzu Application Platform. You will do that in the next section.
tanzu
CLIAs explained in the tanzu CLI guide, the tanzu
CLI is plug-in and package based. These packages come from separate repositories. In this section, you will set up these additional repositories to gain access to the Tanzu Application Platform packages.
Create a secret, which the tanzu
CLI will use to access packages in the Tanzu Network. This requires your username and password for the Tanzu Network, set up in the prerequisites section.
tanzu secret registry add tap-registry \
--username ${INSTALL_REGISTRY_USERNAME} --password ${INSTALL_REGISTRY_PASSWORD} \
--server ${INSTALL_REGISTRY_HOSTNAME} \
--export-to-all-namespaces --yes --namespace tap-install
Add the package repository to your cluster to be accessed by the tanzu
CLI.
tanzu package repository add tanzu-tap-repository \
--url registry.tanzu.vmware.com/tanzu-application-platform/tap-packages:1.0.0 \
--namespace tap-install
Verify that the repository was added successfully.
tanzu package repository get tanzu-tap-repository --namespace tap-install
Example output:
/ Retrieving repository tanzu-tap-repository...
NAME: tanzu-tap-repository
VERSION: 6984
REPOSITORY: registry.tanzu.vmware.com/tanzu-application-platform/tap-packages
TAG: 1.0.0
STATUS: Reconcile succeeded
REASON:
Application Accelerator is a component of Tanzu Application Platform where code starters are stored. This gives developers access to starter applications that already include any necessary security and compliance frameworks that may be required by their organization.
If you are deploying Tanzu Application Platform in an environment where this catalog already exists, you can skip this section and simply note the URL for the catalog-info.yaml
file. If you do not have access to an accelerator catalog yet, this section will walk you through deploying a blank one.
Download the blank starter template.
pivnet download-product-files --product-slug='tanzu-application-platform' --release-version='1.0.0' --product-file-id=1099786
Extract the file contents.
tar xvf tap-gui-blank-catalog.tgz
Change directories to the extracted directory.
cd blank
Follow your preferred method for pushing the files in this directory to your GitHub account. Here are the GitHub docs for creating a new repository. Call it blank-catalog
.
You now have a repository deployed that you will later add as a reference for your deployment of Tanzu Application Platform.
light
profile and installTanzu Application Platform installs by use of profiles. These profiles take into account the user’s role in an organization, and only install the portions of the Tanzu Application Platform which that user is likely to need.
In this section, you will explore the different packages installed in the light
profile. A profile YAML file will be provided for you, but you will be given all the tools and understanding necessary to find these settings, learn what they do, and what values are available for each.
You can find a list of the packages installed in each profile here.
Create the tap-values.yml
file.
cat << EOF > tap-values-test.yaml
profile: light
ceip_policy_disclosed: true
buildservice:
kp_default_repository: "$DOCKER_HUB_USERNAME/build-service"
kp_default_repository_username: "$DOCKER_HUB_USERNAME"
kp_default_repository_password: "$DOCKER_HUB_PASSWORD"
tanzunet_username: "$INSTALL_REGISTRY_USERNAME"
tanzunet_password: "$INSTALL_REGISTRY_PASSWORD"
supply_chain: basic
ootb_supply_chain_basic:
registry:
server: "index.docker.io"
repository: "$DOCKER_HUB_USERNAME"
gitops:
ssh_secret: ""
tap_gui:
service_type: ClusterIP
ingressEnabled: "true"
ingressDomain: "$CUSTOM_DOMAIN"
app_config:
app:
baseUrl: http://tap-gui.$CUSTOM_DOMAIN
catalog:
locations:
- type: url
target: https://github.com/$GITHUB_USERNAME/blank-catalog/blob/main/catalog-info.yaml
backend:
baseUrl: http://tap-gui.$CUSTOM_DOMAIN
cors:
origin: http://tap-gui.$CUSTOM_DOMAIN
cnrs:
domain_name: $CUSTOM_DOMAIN
contour:
envoy:
service:
type: LoadBalancer
EOF
Install Tanzu Application Platform light
profile.
tanzu package install tap -p tap.tanzu.vmware.com -v 1.0.0 --values-file tap-values.yml -n tap-install
Each time I have tried this, the command returns a deployment failure. Something similar to Error: resource reconciliation failed
. This does not necessarily mean your deployment has failed, however. You can get a more useful error message by running tanzu package installed get tap -n tap-install
. Likely, it will tell you that there was a timeout in the API response time.
You can run watch kubectl get pods -A
to watch the progress of the install. In any case, this install can take up to 30 minutes for all pods to start and reconcile.
As discussed in the prerequisites section, there are a couple different methods for accessing your Tanzu Application Platform UI. In this guide, for simplicity of following along and not introducing too many variables, you will just use your /etc/hosts
file.
If you are comfortable with setting up DNS and records with your custom domain, that is a supported and recommended workflow. Refer to the official install documentation for more information on this process.
Get the IP address of your envoy ingress pod.
kubectl get svc envoy -n tanzu-system-ingress
Example output:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
envoy LoadBalancer 10.24.9.37 34.121.244.203 80:32569/TCP,443:30160/TCP 22h
Save the EXTERNAL-IP
into another environment variable.
export ENVOY_EXTERNAL_IP=34.121.244.203 #change the IP address for your output of the above command
Append this IP address mapping to your configured domain name to /etc/hosts
. You can use a text editor or other methods to add this line as well. This command is provided for simplicity.
sudo echo "$ENVOY_EXTERNAL_IP tap-gui.$CUSTOM_DOMAIN" | sudo tee -a /etc/hosts
Open the Tanzu Application Platform UI in your web browser. This may not work in the Safari browser since the connection is not secure.
open http://tap-gui.$CUSTOM_DOMAIN
Start to familiarize yourself with the Tanzu Application Platform interface.
In later guides, you will use Tanzu Application Platform to deploy a workload. And with this interface up, you can follow along with other Tanzu Application Platform content.
Now you have your own instance of Tanzu Application Platform to use for your development projects. Continue following along to other guides to deploy a workload, and see how your development workflow might change in a Tanzu environment.