Sample project for Tanzu Platform
Instructions at: https://github.com/vmware-tanzu/tanzu-cli/blob/main/docs/quickstart/install.md
On a Mac:
brew tap vmware-tanzu/tanzu
brew install tanzu-cli
tanzu plugin install --group vmware-tanzu/app-developer:v1.0.0
You need to have an environment available
Using your default org:
tanzu login
Using specific endpoint:
tanzu login --endpoint <provided endpoint>
Using specific endpoint with self-signed certs:
tanzu login --endpoint <provided endpoint> --endpoint-ca-certificate <path to cert>
For a staging environment:
tanzu login --staging --endpoint <provided endpoint>
tanzu project use
Use the provided
spring-dev-space.yml
to create a space
tanzu deploy --only spring-dev-space.yml
use the new space
tanzu space use spring-dev-space
tanzu app init
we need java 21 and 1 instance to start with
tanzu app config build non-secret-env set BP_JVM_VERSION=21
tanzu app config scale set instances=1
you need a registry that is accessible from the platform environment.
For DockerHub:
tanzu build config --build-engine daemon
tanzu build config --containerapp-registry docker.io/<docker-id>/{name}
The
{name}
part is a placeholder that will be resolved to match your app at build time, so leave that as is.
tanzu build config --build-engine platform
tanzu deploy
tanzu app scale hello-world --instances=2
Use port-forward
tanzu app port-forward hello-world --port 8080
use curl to get some feedback
curl localhost:8080