Skip to content

Simple demo to showcase how to connect and download JFR via MBeans, how to add a simple JFR event and finally how to use the standalone JMC API to get simple statistics.

Notifications You must be signed in to change notification settings

rh-jmc-team/jmc-robots-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jmc-robots-demo

Local Run

Run ./gradlew clean build then podman-compose up in the root of this project. This will run the three robots applications in containers running on the host system, plus one OpenTelemetry collector, one Jaeger tracing dashboard, one Prometheus database for Micrometer metrics, and additionally one cryostat instance for instrumenting the three demo applications with JFR. FIXME: Cryostat is unable to detect the other containers using JDP when running with podman-compose, so the other containers must be added manually by custom targets.

By default the OCI build will use podman. This can be overridden by setting a property when invoking the build, for example: ./gradlew build -Dquarkus.docker.executable-name=docker.

Once all containers have started, open http://localhost:16686 to see the Jaeger tracing dashboard, or https://0.0.0.0:8181 to see the Cryostat dashboard.

Openshift (CodeReady Containers) Run

Install and configure CodeReady Containers and ensure that your oc cli commands are working.

Then run sh openshift/setup-robots.sh, which will create a new project named robots containing an application corresponding to each of the three applications within this project, as well as an OpenTelemetry collector, Jaeger tracing dashboard, and Prometheus database for Micrometer metrics.

Then deploy Cryostat to the namespace. The easiest way to do this is to open the OpenShift Console and navigate to OperatorHub. First, install the cert-manager Operator (version 1.3.0+), which provides SSL/TLS certificates for Cryostat to use when securing communications between components. Then search for Cryostat and install the Cryostat Operator in your robots project. Then create a Cryostat resource to instruct the Operator to create an actual deployment. The next easiest way to achieve this is to clone the operator and run IMAGE_VERSION=2.0.0 make DEPLOY_NAMESPACE=$(oc project -q) cert_manager deploy create_cryostat_cr (no build is required - an image from the Quay.io remote registry will be pulled by your CRC node and deployed).

For more information on how to use Cryostat to interact with the robot demo applications, visit the cryostat docs.

When you're done, use sh openshift/cleanup-robots.sh to remove the robots resources from your namespace. The Cryostat and cert-manager Operators can then be uninstalled from the OpenShift Console OperatorHub UI. Use IMAGE_VERSION=2.0.0 make DEPLOY_NAMESPACE=$(oc project -q) destroy_cryostat_cr remove_cert_manager undeploy in the cloned Operator repo to remove Cryostat from the namespace if you installed it manually previously.

About

Simple demo to showcase how to connect and download JFR via MBeans, how to add a simple JFR event and finally how to use the standalone JMC API to get simple statistics.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 96.2%
  • Shell 3.8%