Skip to content

Spring Boot VMware Tanzu Observability by Wavefront demo running on Cloud Foundry

Notifications You must be signed in to change notification settings

timosalm/spring-wavefront-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Wavefront VMware Tanzu Observability demo running on Cloud Foundry

Prerequisites

  • JDK 11

  • Wavefront VMware Tanzu Observability account

  • Cloud Foundry environment (e.g. sign up for a free Pivotal Web Services account)

  • 'cf' command-line interface for Cloud Foundry:

    Follow the instructions on how to install the cf CLI using a package manager on Mac OS X and Linux operating systems here.

    You can install the cf CLI using a compressed binary on Windows, Mac OS X, and Linux operating systems here.

    Log in to the cf CLI targeting your environment. E.g.

     cf login -a https://api.run.pivotal.io
    

Install Wavefront Proxy on CF

  1. Push the Docker container to CF with an internal route
    cf push wavefront-proxy --docker-image wavefronthq/proxy:latest --no-start -d apps.internal
    
  2. Change the type of the healthcheck
    cf set-health-check wavefront-proxy process
    
  3. Login to Wavefront VMware Tanzu Observability, navigate to Browse → Proxies and click on Add new proxy. Select Docker in the How to Add a Proxy section and set replace the values of the ENV variables in the following commands with yours
    cf set-env wavefront-proxy WAVEFRONT_URL "YOUR_WAVEFRONT_URL"
    cf set-env wavefront-proxy WAVEFRONT_TOKEN YOUR_WAVEFRONT_TOKEN
    
  4. Set the following ENV variable to activate the ZipKin integration
    cf set-env wavefront-proxy WAVEFRONT_PROXY_ARGS "--traceZipkinListenerPorts 9411"
    
  5. Start the Proxy
     cf start wavefront-proxy
    
  6. Switch back to Wavefront VMware Tanzu Observability. Now the proxy should be detected. Press Done to add the proxy.

Run the application on CF

  1. Create a MySQL service instance with the name mysql
    cf create-service cleardb spark mysql
    
  2. Build the application
    ./gradlew test bootJar
    
  3. Push the application to CF
    cf push --no-start
    
  4. Configure Container-to-Container Networking from the application to the deployed Wavefront VMware Tanzu Observability proxy
    cf add-network-policy spring-wavefront-demo --destination-app wavefront-proxy --protocol tcp --port 9411
    
  5. Set ZipKin base url to the proxy's integration endpoint (possible via application.yml, too)
    cf set-env spring-wavefront-demo SPRING_ZIPKIN_BASE-URL "http://wavefront-proxy.apps.internal:9411/"
    
  6. Start the application
     cf start spring-wavefront-demo
    

View traces of the app in Wavefront VMware Tanzu Observability

  1. Call the REST API to create one or more items.
    curl --request POST --url https://YOUR-APP-URL/items
    
  2. Call the REST API to fetch the available items.
    curl --request GET --url https://YOUR-APP-URL/items
    
  3. Switch back to Wavefront VMware Tanzu Observability, and navigate to Applications → Traces.

About

Spring Boot VMware Tanzu Observability by Wavefront demo running on Cloud Foundry

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages