Skip to content

Commit

Permalink
docs(quickstart): add agent autoconfig quickstart (#1048) (#1061)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9688876)

Co-authored-by: Andrew Azores <[email protected]>
  • Loading branch information
mergify[bot] and andrewazores authored Feb 25, 2025
1 parent feb581d commit ec55bc9
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 23 deletions.
95 changes: 95 additions & 0 deletions config/openshift/cryostat-quickstart-autoconfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
apiVersion: console.openshift.io/v1
kind: ConsoleQuickStart
metadata:
annotations:
capability.openshift.io/name: Console
name: configuring-cryostat-autoconfig
spec:
icon: >-
data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxkZWZzPjxzdHlsZT4uY2xzLTF7ZmlsbDojZmZmO30uY2xzLTJ7ZmlsbDojMWI0OTY1O30uY2xzLTN7ZmlsbDojOTVjOWU5O30uY2xzLTR7ZmlsbDojNWZhOGQzO308L3N0eWxlPjwvZGVmcz48cG9seWdvbiBjbGFzcz0iY2xzLTQiIHBvaW50cz0iNjYxLjc2IDEzOS40OSA2MDcuMzggODUuMTEgNTUwLjQ1IDE0Mi4wNCA1NTAuNDUgMCA0NzMuNTUgMCA0NzMuNTUgMTQyLjA0IDQxNi42MiA4NS4xMSAzNjIuMjQgMTM5LjQ5IDUxMiAyODkuMjYgNjYxLjc2IDEzOS40OSIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtMiIgcG9pbnRzPSI1OTcuMzQgNjU5LjgyIDY5OC45MiA2ODcuMDQgNjc3LjY0IDYwNy42MyA3NTcuMDQgNTg2LjM1IDY4Mi42OSA1MTIgNzU3LjA0IDQzNy42NSA2NzcuNjQgNDE2LjM3IDY5OC45MSA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IDkzNi4xOCA4MDEuMyA5NzQuNjMgNzM0LjcgODUxLjYyIDY2My42OCA5MjkuMzkgNjQyLjg0IDkwOS40OCA1NjguNTUgNzA0LjkgNjIzLjM3IDc1OS43MiA4MjcuOTUiLz48cG9seWdvbiBjbGFzcz0iY2xzLTQiIHBvaW50cz0iOTA5LjQ4IDQ1NS40NCA5MjkuMzkgMzgxLjE2IDg1MS42MiAzNjAuMzIgOTc0LjYzIDI4OS4zIDkzNi4xOCAyMjIuNyA4MTMuMTcgMjkzLjcyIDgzNCAyMTUuOTUgNzU5LjcyIDE5Ni4wNSA3MDQuOSA0MDAuNjMgOTA5LjQ4IDQ1NS40NCIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTUxMi41NCw1NzkuNDdjLTM3LjQ3LDAtNjcuOTYtMzAuNDktNjcuOTYtNjcuOTZzMzAuNDktNjcuOTYsNjcuOTYtNjcuOTZjMjUuMTEsMCw0Ny4wNiwxMy42OSw1OC44MiwzNGw2OS4xNy0zOS43Ni0xMjguNTMtNzQuMjEtMTI4LjUzLDc0LjIxdjE0OC40MmwxMjguNTMsNzQuMjEsMTI4LjUzLTc0LjIxLTY5LjE3LTQwLjczYy0xMS43NywyMC4zLTMzLjcyLDMzLjk5LTU4LjgyLDMzLjk5WiIvPjwvc3ZnPgo=
description: Automatically configure your Java applications on OpenShift to be profiled and monitored using the Red Hat build of Cryostat and Cryostat Agent.
durationMinutes: 10
displayName: Auto-configure Java applications with the Red Hat build of Cryostat
nextQuickStart:
- configuring-cryostat-jmx
introduction: >-
Red Hat build of Cryostat is a container-native Java application based on JDK Flight Recorder (JFR). You can use it to monitor the performance of the Java Virtual Machine (JVM) for containerized workloads that run on an OpenShift cluster.
- To enable Cryostat to gather, store, and analyze Java Flight Recorder (JFR) data about target applications that run on Java Virtual Machine (JVM)s, you must configure the applications so that Cryostat can detect and connect to them.
- You can use Red Hat build of Cryostat Operator to automatically configure your target application to use the Cryostat Agent to register with a specific Cryostat instance and provide HTTP-based connectivity by following the **Auto-configure Java applications with the Red Hat build of Cryostat** quick start.
- Alternatively, you can configure your Java applications to allow Java Management Extensions (JMX) connections and use an OpenShift Service for detection and JMX for connectivity. JMX is a standard feature on a JVM with which you can monitor and manage target applications that run on the JVM. You may enable and configure JMX when you start the target application JVM so that Red Hat build of Cryostat can communicate with your JVM over the network using built-in JDK functionality. Follow the **Configure JMX-based Java applications with the Red Hat build of Cryostat** quick start for instructions on that setup.
- If you have not yet installed the Red Hat Build of Cryostat Operator, start with the **Get started with the Red Hat build of Cryostat** quick start.
- **Note**: The quickstart uses a sample [Quarkus application](https://github.com/quarkusio/quarkus-quickstarts). You can deploy your own application or follow the **Get started with Quarkus using s2i** quick start.
tasks:
- title: Enable **Cryostat Agent instrumentation** on your Java Application
description: >
To enable Cryostat Agent instrumentation:
1. In the main navigation, click the dropdown menu and select **Administrator**.
1. In the navigation menu, click **Workloads > Deployments**.
1. Click on the quarkus-quickstarts deployment name (or your application's deployment name).
1. Click **YAML**
Alternatively,
1. In the main navigation, click the dropdown menu and select **Developer**.
1. In the navigation menu, click **Topology**.
1. Click on the quarkus-quickstarts deployment (or your application's deployment).
1. Click **Actions > Edit Deployment**.
1. Click **Configure via: > YAML view**.
Then,
1. In the text editor, add the following labels to the `.spec.template.metadata.labels` section:
- **Name**: `cryostat.io/name`
- **Value**: Set this to the name of your Cryostat Custom Resource instance.
- **Name**: `cryostat.io/namespace`
- **Value**: Set this to the installation namespace of your Cryostat Custom Resource instance.
1. Click **Save.**
review:
failedTaskHelp: >-
This task isn't verified yet. Try the task again, or [read more](https://docs.redhat.com/en/documentation/red_hat_build_of_cryostat/4/html/getting_started_with_cryostat/configuring_java_applications#working_with_cryostat_agent)
about this topic.
instructions: >
#### Click **Reload** at the bottom of the **YAML** tab.
Do you see a the expected labels under the `.spec.template.metadata.labels`?
- title: View your Java Application as a target in Cryostat
description: >
View your Java application as a target in the Red Hat build of Cryostat web application:
1. In the main navigation, click the dropdown menu and select **Developer**.
1. In the navigation menu, click **Topology**.
1. The external link icon on **cryostat-sample deployment** represents the route URL.
1. Click the external link icon to open the URL and run the Cryostat web application in a new browser tab.
1. Enter your Red Hat OpenShift credentials to log in to the Cryostat web application.
1. In the web application, click **Recordings** in the navigation menu.
1. View quarkus-quickstarts (or your deployed application) in the **Targets** list.
review:
failedTaskHelp: >-
This task isn't verified yet. Try the task again, or [read more](https://docs.redhat.com/en/documentation/red_hat_build_of_cryostat/4/html/getting_started_with_cryostat/configuring_java_applications)
about this topic.
instructions: |-
#### Verify your Java application is running on Red Hat build of Cryostat web application:
Did the Cryostat web application open in a separate browser window?
conclusion: >-
Your Java application has now been configured to be detected by Cryostat. To profile your Java applications with Cryostat, please follow [this documentation](https://docs.redhat.com/en/documentation/red_hat_build_of_cryostat/4/html/using_cryostat_to_manage_a_jfr_recording/index).
Loading

0 comments on commit ec55bc9

Please sign in to comment.