Skip to content

Commit 68942b2

Browse files
Rework the dashboard setup (#335) (#338)
* Rework the dashboard setup Reword the dashboard setup to break out the image override section. Make that a separate procedure and reference it from the base deployment. A compatible version of Grafana is already deployed by default. * Dashboards are not provided as part of OSP13 deployments * Update doc-Service-Telemetry-Framework/modules/proc_setting-up-grafana-to-host-the-dashboard.adoc * Update doc-Service-Telemetry-Framework/modules/proc_overriding-the-default-grafana-container-image.adoc * Update doc-Service-Telemetry-Framework/modules/proc_setting-up-grafana-to-host-the-dashboard.adoc Co-authored-by: JoanneOFlynn2018 <45287002+JoanneOFlynn2018@users.noreply.github.com> Co-authored-by: Leif Madsen <lmadsen@redhat.com>
1 parent 0728847 commit 68942b2

4 files changed

Lines changed: 42 additions & 35 deletions

File tree

doc-Service-Telemetry-Framework/assemblies/assembly_advanced-features.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ endif::include_when_16[]
2222
include::../modules/con_dashboards.adoc[leveloffset=+1]
2323
include::../modules/proc_setting-up-grafana-to-host-the-dashboard.adoc[leveloffset=+2]
2424
ifdef::include_when_16[]
25+
include::../modules/proc_overriding-the-default-grafana-container-image.adoc[leveloffset=+2]
2526
//TODO: Add dashboards back when we have working code for OSP13
2627
include::../modules/proc_importing-dashboards.adoc[leveloffset=+2]
2728
endif::include_when_16[]

doc-Service-Telemetry-Framework/modules/con_dashboards.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Infrastructure dashboard::
1414
Use the infrastructure dashboard to view metrics for a single node at a time. Select a node from the upper left corner of the dashboard.
1515

1616
Cloud view dashboard::
17-
Use the cloud view dashboard to view panels to monitor service resource usage, API stats, and cloud events. You must enable API health monitoring and service monitoring to provide the data for this dashboard. API health monitoring is enabled by default in the {ProjectShort} base configuration. For more information, see xref:creating-the-base-configuration-for-stf_assembly-completing-the-stf-configuration
17+
Use the cloud view dashboard to view panels to monitor service resource usage, API stats, and cloud events. You must enable API health monitoring and service monitoring to provide the data for this dashboard. API health monitoring is enabled by default in the {ProjectShort} base configuration. For more information, see xref:creating-the-base-configuration-for-stf_assembly-completing-the-stf-configuration[].
1818
** For more information about API health monitoring, see xref:container-health-and-api-status_assembly-advanced-features[].
1919
** For more information about {OpenStackShort} service monitoring, see xref:resource-usage-of-openstack-services_assembly-advanced-features[].
2020
endif::include_when_16[]
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[id="overriding-the-default-grafana-container-image_{context}"]
2+
= Overriding the default Grafana container image
3+
4+
The dashboards in {Project} ({ProjectShort}) require features that are available only in Grafana version 8.1.0 and later. By default, the Service Telemetry Operator installs a compatible version. You can override the base Grafana image by specifying the image path to an image registry with `graphing.grafana.baseImage`.
5+
6+
.Procedure
7+
8+
. Ensure that you have the correct version of Grafana:
9+
+
10+
[source,bash,options="nowrap"]
11+
----
12+
$ oc get pod -l "app=grafana" -ojsonpath='{.items[0].spec.containers[0].image}'
13+
docker.io/grafana/grafana:7.3.10
14+
----
15+
16+
. If the running image is older than 8.1.0, patch the ServiceTelemetry object to update the image. Service Telemetry Operator updates the Grafana manifest, which restarts the Grafana deployment:
17+
+
18+
[source,bash,options="nowrap"]
19+
----
20+
$ oc patch stf/default --type merge -p '{"spec":{"graphing":{"grafana":{"baseImage":"docker.io/grafana/grafana:8.1.5"}}}}'
21+
----
22+
23+
. Verify that a new Grafana pod exists and has a `STATUS` value of `Running`:
24+
+
25+
[source,bash,options="nowrap"]
26+
----
27+
$ oc get pod -l "app=grafana"
28+
NAME READY STATUS RESTARTS AGE
29+
grafana-deployment-fb9799b58-j2hj2 1/1 Running 0 10s
30+
----
31+
32+
. Verify that the new instance is running the updated image:
33+
+
34+
[source,bash,options="nowrap"]
35+
----
36+
$ oc get pod -l "app=grafana" -ojsonpath='{.items[0].spec.containers[0].image}'
37+
docker.io/grafana/grafana:8.1.0
38+
----

doc-Service-Telemetry-Framework/modules/proc_setting-up-grafana-to-host-the-dashboard.adoc

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
[role="_abstract"]
55
Grafana is not included in the default {Project} ({ProjectShort}) deployment so you must deploy the Grafana Operator from OperatorHub.io. When you use the Service Telemetry Operator to deploy Grafana, it results in a Grafana instance and the configuration of the default data sources for the local {ProjectShort} deployment.
66

7+
ifdef::include_16[The dashboards in {ProjectShort} require features that are available only in Grafana version 8.1.0 and later. By default, the Service Telemetry Operator installs a compatible version. For more information about how to override the Grafana container image, see xref:overriding-the-default-grafana-container-image_assembly-advanced-features[].]
8+
79
.Procedure
810

911
. Log in to {OpenShift}.
@@ -89,37 +91,3 @@ $ oc get route grafana-route
8991
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
9092
grafana-route grafana-route-service-telemetry.apps.infra.watch grafana-service 3000 edge None
9193
----
92-
93-
. The dashboards in {ProjectShort} require features that are available only in Grafana version 8.1.0 and later. Ensure that you have the correct version of Grafana:
94-
+
95-
[source,bash]
96-
----
97-
$ oc get pod -l "app=grafana" -ojsonpath='{.items[0].spec.containers[0].image}'
98-
99-
docker.io/grafana/grafana:7.3.10
100-
----
101-
102-
. If the running image is older than 8.1.0, patch the ServiceTelemetry object to update the image. Service Telemetry Operator updates the Grafana manifest, which restarts the Grafana deployment:
103-
+
104-
[source,bash,options="nowrap"]
105-
----
106-
$ oc patch stf/default --type merge -p '{"spec":{"graphing":{"grafana":{"baseImage":"docker.io/grafana/grafana:8.1.5"}}}}'
107-
----
108-
+
109-
110-
. Verify that a new Grafana pod exists and has a `STATUS` value of `Running`:
111-
+
112-
[source,bash,options="nowrap"]
113-
----
114-
$ oc get pod -l "app=grafana"
115-
NAME READY STATUS RESTARTS AGE
116-
grafana-deployment-fb9799b58-j2hj2 1/1 Running 0 10s
117-
----
118-
119-
. Verify that the new instance is running the updated image:
120-
+
121-
[source,bash,options="nowrap"]
122-
----
123-
$ oc get pod -l "app=grafana" -ojsonpath='{.items[0].spec.containers[0].image}'
124-
docker.io/grafana/grafana:8.1.0
125-
----

0 commit comments

Comments
 (0)