/tanzu-java-web-app

Primary LanguageJavaApache License 2.0Apache-2.0

tanzu-java-web-app

This is a sample of a Java Spring app that works with Tilt and the Tanzu Application Platform.

Dependencies

  1. kubectl CLI
  2. Tilt version >= v0.23.2
  3. Tanzu CLI and the apps plugin v0.2.0 which are provided as part of Tanzu Application Platform
  4. A cluster with Tanzu Application Platform, and the "Default Supply Chain", plus its dependencies. This supply chains is part of Tanzu Application Platform.

Running the sample

Start the app deployment by running:

tilt up

You can hit the spacebar to open the UI in a browser.

  • If you see an "Update error" message like the one below, then just follow the instructions and allow that context:

    Stop! tap-beta2 might be production.
    If you're sure you want to deploy there, add:
        allow_k8s_contexts('tap-beta2')
    to your Tiltfile. Otherwise, switch k8s contexts and restart Tilt.
    

Tanzu Notes

Show cluster urls and data

kubectl get secret tap-values -n tap-install -o jsonpath="{.data['tap-values\.yaml']}" | base64 -d
tanzu apps workload create tanzu-java-web-app \
   --git-repo https://github.com/poprygun/tanzu-java-web-app.git \
   --git-branch master \
   --type web \
   --label app.kubernetes.io/part-of=tanzu-java-web-app \
   --label apps.tanzu.vmware.com/has-tests=true \
   --yes \
   --namespace my-apps

View build logs

kp build logs tanzu-java-web-app
tanzu apps workload tail tanzu-java-web-app -n my-apps
tanzu apps workload get tanzu-java-web-app --namespace my-apps

Show Image volnurabilities

kubectl get imagescan

Tail application logs

tanzu apps workload tail tanzu-java-web-app --since 10m --timestamp -n my-apps

Determine Cluster Name

kubectl config view --minify

References

Deploy a Test Workload to a Workload or Unmanaged Cluster

Tanzu Cluster Commands

ToDos

Experiment with TCE

Add Tanzu Service Bindings DB example

TAP Cluster

http://tap-gui.hackaton.tapdemo.vmware.com http://spring-petclinic.my-apps.hackaton.tapdemo.vmware.com