Giter VIP home page Giter VIP logo

tanzu-java-web-app-prometheus's Introduction

tanzu-java-web-app-prometheus

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.

Application Live View

The workload is set up by default to autoconfigure the actuators. This results in that the Spring Actuators are available at TCP port 8081 and will be used by Application Live View. Application Live View allows you see all health metrics in the TAP GUI. If you would like to have the Actuators available at TCP port 8080 you can set the annotation apps.tanzu.vmware.com/auto-configure-actuators to false.

Building with local source

You can build using source from either a Git repository or from source on your local disk. The instructions below use the latter option, where you build using the source from your local disk. This is specified by adding a --local-path option providing the path for the source, and a --source-image option providing the OCI repository (e.g. registry.io/user/tanzu-java-web-app-prometheus-source) to use for publishing the local source code.

You can set this as an environment variable before running any of the commands below using:

export SOURCE_IMAGE=registry.io/user/tanzu-java-web-app-prometheus-source

Deploying the sample for TAP

Start the app deployment by running:

tanzu apps workload create tanzu-java-web-app-prometheus \
  --file ./config/workload.yaml \
  --local-path . \
  --source-image "${SOURCE_IMAGE}"

Running the sample on TAP using Tilt for live update

You can use the IDE plugins for VSCode or IntelliJ IDEA to enable live update. You can also use the command line following these steps.

  1. Set the environment variable mentioned above specifying the repository to use for the source image. This is where the local source code will be written. As an example, use export SOURCE_IMAGE=registry.io/user/tanzu-java-web-app-prometheus-source.
  2. Start Tilt by running tilt up

    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.

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

tanzu-java-web-app-prometheus's People

Contributors

ksankaranara-vmw avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.