Skip to content

Commit f89bf78

Browse files
authored
Merge pull request #37 from Helene/merge_7.0
Merge changes for 7.0.1 release
2 parents 34e9a0e + aac7625 commit f89bf78

27 files changed

+4926
-293
lines changed

.s2i/environment

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
APP_FILE = ../source/zimonGrafanaIntf.py

docs/CHANGELOG.md

Lines changed: 184 additions & 144 deletions
Large diffs are not rendered by default.

docs/CLASSIC_SETUP.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ Define a new data source (Data Sources -> Add New)
9797

9898
![](/docs/Example_Add_DataSource.png)
9999

100-
**NOTE**: The IBM Spectrum Scale bridge listens on port 4242 for HTTP connections, and on port 8443 for HTTPS(SSL) connections. Follow the instructions [Generate SSL certificates](https://github.com/IBM/ibm-spectrum-scale-bridge-for-grafana/wiki/How-to-setup-HTTPS%28SSL%29-connection-for-the-IBM-Spectrum-Scale-bridge-for-Grafana#generate-ssl-certificates) to generate a private ssl key and a ssl certificate
100+
**NOTE**: Per default the IBM Spectrum Scale bridge listens on port 4242 for HTTP connections. For HTTPS(SSL) connections you need to set the appropriate protocol settings on the bridge start.
101+
Follow the instructions [Generate SSL certificates](https://github.com/IBM/ibm-spectrum-scale-bridge-for-grafana/wiki/How-to-setup-HTTPS%28SSL%29-connection-for-the-IBM-Spectrum-Scale-bridge-for-Grafana#generate-ssl-certificates) to generate a private ssl key and a ssl certificate
102+
103+
101104

102105
Grafana now can talk to Spectrum Scale Performance Monitoring tool via the bridge. Follow the grafana instructions to create dashboards.

docs/RUNNING_AS_DOCKER_CONTAINER.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Now you can add the host running the bridge container to the Grafana monitoring
7575
2. Start the bridge running in a container:
7676

7777
```shell
78-
# podman run -dt -p 4242:4242,8443:8443 -e "SERVER=9.XXX.XXX.XXX" -e "APIKEYVALUE=XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" -e "PORT=8443" -e "TLSKEYPATH=/etc/bridge_ssl/certs" -e "TLSKEYFILE=privkey.pem" -e "TLSCERTFILE=cert.pem" \ -v /tmp:/var/log/ibm_bridge_for_grafana -v /etc/bridge_ssl/certs:/etc/bridge_ssl/certs \ --pod new:my-bridge-ssl-test-pod --name bridge-ssl-test bridge_image:latest
78+
# podman run -dt -p 4242:4242,8443:8443 -e "SERVER=9.XXX.XXX.XXX" -e "APIKEYVALUE=XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" -e "PORT=8443" -e "PROTOCOL=https" -e "TLSKEYPATH=/etc/bridge_ssl/certs" -e "TLSKEYFILE=privkey.pem" -e "TLSCERTFILE=cert.pem" \ -v /tmp:/var/log/ibm_bridge_for_grafana -v /etc/bridge_ssl/certs:/etc/bridge_ssl/certs \ --pod new:my-bridge-ssl-test-pod --name bridge-ssl-test bridge_image:latest
7979

8080
# podman logs bridge-ssl-test
8181
2021-04-25 16:05 - INFO - *** IBM Spectrum Scale bridge for Grafana - Version: 7.0 ***

docs/SETUP_SSL_CONNECTION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ Openssl will then ask you a series of questions. You can enter whatever values a
2121
Note: The file names for the key and the certificate should be ‘privkey.pem’ and ‘cert.pem’.
2222

2323

24-
3. Start the bridge listening on the socket port 8443. Don't forget to provide the location and the file name of the tls private key and the tls certificate:
24+
3. Start the bridge listening on the socket port 8443 using HTTPS protocol. Don't forget to provide the location and the file name of the tls private key and the tls certificate:
2525

2626
```shell
27-
# python3 zimonGrafanaIntf.py -p 8443 -t /etc/bridge_ssl/certs -k privkey.pem -m cert.pem
27+
# python3 zimonGrafanaIntf.py -p 8443 -r https -t /etc/bridge_ssl/certs -k privkey.pem -m cert.pem
2828
```
2929

3030

docs/SUPPORT_MATRIX.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,31 @@
11
The following matrix gives a quick overview of the supported software for the IBM Spectrum Scale bridge for Grafana packages by version number:
2+
# Version 7.0.1 (07/21/2021)
3+
- Python 3.6
4+
- CherryPy 18.6.0
5+
- IBM Spectrum Scale system must run 5.1.1 and above or
6+
- IBM Spectrum Scale Container Native Storage Access(CNSA) devices having minReleaseLevel 5.1.1.1
7+
- Grafana 7.5.0 and above
8+
29
# Version 7 (04/26/2021)
310
- Python 3.6
411
- CherryPy 18.6.0
512
- IBM Spectrum Scale system must run 5.1.1 and above
613
- Grafana 7.1.0 and above
714

15+
# Version 6.1.4 (07/21/2021)
16+
- Python 3.6
17+
- CherryPy 18.6.0
18+
- IBM Spectrum Scale system must run 5.1.0.3 and above or
19+
- IBM Spectrum Scale Container Native Storage Access(CNSA) devices having minReleaseLevel 5.1.0.1
20+
- Grafana 8.0.0 and above
21+
22+
# Version 6.1.3 (05/21/2021)
23+
- Python 3.6
24+
- CherryPy 18.6.0
25+
- IBM Spectrum Scale system must run 5.1.0 and above or
26+
- IBM Spectrum Scale Container Native Storage Access(CNSA) devices having minReleaseLevel 5.1.0.1
27+
- Grafana 7.5.0 and above
28+
829
# Version 6.1.2 (03/20/2021)
930
- Python 3.6
1031
- CherryPy 18.6.0

docs/grafana_bridge_deployment_ocp.md

Lines changed: 90 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Check that the both .pem files are created in the /tmp directory
6363

6464
```
6565
[root@mycluster-inf ~]# cd /etc/bridge_ssl/certs
66-
[root@mycluster-inf tmp]# cat privkey.pem
66+
[root@mycluster-inf certs]# cat privkey.pem
6767
-----BEGIN PRIVATE KEY-----
6868
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDZ7v0Oq9n9zx8T
6969
v/VPln5K74udrUVPA/4xz/+MsUIThlt+RLcaVuBx2jTbxDlSdPiQc/rSfZRtBTBt
@@ -92,7 +92,7 @@ ehAHRd4XxCH0p4/lAI+qQZxmkRfho1IXg/sAQoFXCF2dj+hMZ9nlV26m3n6iZxFY
9292
bjRUDSzBGHtV+WhPLzrKrsRFn4USCQHDA9+0aL2jGnfwC3En4SeMfk/3usLPVSAX
9393
B4MtCX8SrTMkQ7PutwU2/R+i
9494
-----END PRIVATE KEY-----
95-
[root@mycluster-inf tmp]# cat cert.pem
95+
[root@mycluster-inf certs]# cat cert.pem
9696
-----BEGIN CERTIFICATE-----
9797
MIIDNzCCAh+gAwIBAgIJAMlcr+FBcrAnMA0GCSqGSIb3DQEBCwUAMDIxFzAVBgNV
9898
BAMMDmdyYWZhbmEtYnJpZGdlMRcwFQYDVQQKDA5ncmFmYW5hLWJyaWRnZTAeFw0y
@@ -119,7 +119,7 @@ O+6FAarz5qVR/D09GhoohwQDT8m5N2hfS61JQ/f3iN3KUYK00ppwWzJeumabVY+Z
119119
5. Create the 'grafana-bridge-secret' secret for the TLS keys
120120

121121
```
122-
[root@mycluster-inf tmp]# kubectl create secret tls grafana-bridge-secret --key="privkey.pem" --cert="cert.pem"
122+
[root@mycluster-inf certs]# kubectl create secret tls grafana-bridge-secret --key="privkey.pem" --cert="cert.pem"
123123
secret/grafana-bridge-secret created
124124
125125
[root@mycluster-inf tmp]# oc describe secret grafana-bridge-secret
@@ -138,10 +138,77 @@ tls.key: 1704 bytes
138138
```
139139

140140

141-
6. Change to the directory example_deployment_scripts/bridge_deployment/ and apply the following .yaml files:
141+
6. Since the IBM Spectrum Scale version 5.1.1 any client querying the performance data from the IBM Spectrum Scale cluster needs the API key authentication. You need to create API key secret for the grafana-bridge application using key name 'scale_default'.
142+
143+
First check the secret 'ibm-spectrum-scale-perfmon-default-api-key' exists in your CNSA project
144+
145+
```
146+
[root@mycluster-inf ~]# oc get secret ibm-spectrum-scale-perfmon-default-api-key
147+
NAME TYPE DATA AGE
148+
ibm-spectrum-scale-perfmon-default-api-key Opaque 1 16h
149+
150+
```
151+
Copy the scale_default api key value from that secret, mounted as a file in core pods
152+
153+
```
154+
[root@mycluster-inf ~]# oc get po -o wide
155+
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
156+
ibm-spectrum-scale-core-8gqvm 1/1 Running 0 19h 10.16.105.140 worker1.mycluster.os.fyre.ibm.com <none> <none>
157+
ibm-spectrum-scale-core-h5m6n 1/1 Running 0 19h 10.16.105.141 worker2.mycluster.os.fyre.ibm.com <none> <none>
158+
ibm-spectrum-scale-core-mwstf 1/1 Running 0 19h 10.16.97.21 worker0.mycluster.os.fyre.ibm.com <none> <none>
159+
ibm-spectrum-scale-gui-0 9/9 Running 0 19h 10.254.16.108 worker1.mycluster.os.fyre.ibm.com <none> <none>
160+
ibm-spectrum-scale-operator-79cd7dfb68-q4k49 1/1 Running 0 19h 10.254.12.168 worker2.mycluster.os.fyre.ibm.com <none> <none>
161+
ibm-spectrum-scale-pmcollector-0 2/2 Running 0 19h 10.254.4.84 worker0.mycluster.os.fyre.ibm.com <none> <none>
162+
ibm-spectrum-scale-pmcollector-1 2/2 Running 0 19h 10.254.16.109 worker1.mycluster.os.fyre.ibm.com <none> <none>
163+
164+
[root@mycluster-inf ~]# oc rsh ibm-spectrum-scale-core-8gqvm
165+
Defaulting container name to gpfs.
166+
Use 'oc describe pod/worker0 -n ibm-spectrum-scale' to see all of the containers in this pod.
167+
168+
sh-4.4# cat /etc/perfmon-api-keys/scale_default
169+
7h7p860oF99YwIBKJag8TZPkvILQAx3p8F9E
170+
sh-4.4#
171+
```
172+
173+
As next encode the plaintext API key name and value using base_64:
142174

143175
```
144-
[root@mycluster-inf tmp]# cd /opt/example_deployment_scripts/bridge_deployment
176+
[root@mycluster-inf certs]# echo -n 'scale_default'| base64
177+
c2NhbGVfZGVmYXVsdA==
178+
[root@mycluster-inf certs]# echo -n '7h7p860oF99YwIBKJag8TZPkvILQAx3p8F9E'| base64
179+
YjBmYmMzNDAtNDNlOC00MDM5LTk4OTUtZTA3ZWIzNGQxMTUz
180+
```
181+
182+
183+
7. Change to the directory example_deployment_scripts/bridge_deployment/ and open the secret.yaml file in edit mode.
184+
Replace the <YOUR_BASE64_ENCODED_API_KEY_NAME> and the <YOUR_BASE64_ENCODED_API_KEY_VALUE> with the values you generated with base_64.
185+
186+
187+
8. Create the 'scale-grafana-api' secret for the 'scale_grafana' API key authentication
188+
189+
```
190+
[root@mycluster-inf certs]# oc create -f secret.yaml
191+
secret/scale-grafana-api created
192+
193+
[root@mycluster-inf certs]# oc describe secret scale-grafana-api
194+
Name: scale-grafana-api
195+
Namespace: ibm-spectrum-scale-ns
196+
Labels: <none>
197+
Annotations: <none>
198+
199+
Type: Opaque
200+
201+
Data
202+
====
203+
api-key-name: 13 bytes
204+
api-key-value: 36 bytes
205+
```
206+
207+
208+
9. Apply the following .yaml files:
209+
210+
```
211+
[root@mycluster-inf certs]# cd /opt/example_deployment_scripts/bridge_deployment
145212
146213
[root@mycluster-inf bridge_deployment]# oc create -f role.yaml
147214
role.rbac.authorization.k8s.io/grafana-bridge created
@@ -157,29 +224,27 @@ deployment.apps/grafana-bridge-deployment created
157224
```
158225

159226

160-
7. Verify the grafana-bridge pods are up and running
227+
10. Verify the grafana-bridge pods are up and running
161228

162229
```
163230
[root@mycluster-inf bridge_deployment]# oc get po -o wide
164-
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
165-
grafana-bridge-deployment-5bdfcb6956-cpmjl 1/1 Running 0 9s 10.254.4.92 worker0.mycluster.os.fyre.ibm.com <none> <none>
166-
grafana-bridge-deployment-5bdfcb6956-zcq59 1/1 Running 0 9s 10.254.16.118 worker1.mycluster.os.fyre.ibm.com <none> <none>
167-
ibm-spectrum-scale-core-8gqvm 1/1 Running 0 20h 10.16.105.140 worker1.mycluster.os.fyre.ibm.com <none> <none>
168-
ibm-spectrum-scale-core-h5m6n 1/1 Running 0 20h 10.16.105.141 worker2.mycluster.os.fyre.ibm.com <none> <none>
169-
ibm-spectrum-scale-core-mwstf 1/1 Running 0 20h 10.16.97.21 worker0.mycluster.os.fyre.ibm.com <none> <none>
170-
ibm-spectrum-scale-gui-0 9/9 Running 0 20h 10.254.16.108 worker1.mycluster.os.fyre.ibm.com <none> <none>
171-
ibm-spectrum-scale-operator-79cd7dfb68-q4k49 1/1 Running 0 20h 10.254.12.168 worker2.mycluster.os.fyre.ibm.com <none> <none>
172-
ibm-spectrum-scale-pmcollector-0 2/2 Running 0 20h 10.254.4.84 worker0.mycluster.os.fyre.ibm.com <none> <none>
173-
ibm-spectrum-scale-pmcollector-1 2/2 Running 0 20h 10.254.16.109 worker1.mycluster.os.fyre.ibm.com <none> <none>
174-
175-
[root@mycluster-inf bridge_deployment]# oc logs grafana-bridge-deployment-5bdfcb6956-cpmjl
176-
Connection to the collector server established successfully
177-
Successfully retrieved MetaData
178-
Received sensors:
179-
180-
CPU DiskFree GPFSNodeAPI GPFSRPCS GPFSVFSX GPFSWaiters Load Memory Netstat Network TopProc
181-
Initial cherryPy server engine start have been invoked. Python version: 3.6.8 (default, Dec 5 2019, 15:45:45)
231+
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
232+
grafana-bridge-deployment-686f577585-jcr6r 1/1 Running 8 89m 10.254.20.19 worker0.helene.os.fyre.ibm.com <none> <none>
233+
grafana-bridge-deployment-686f577585-wdrcs 1/1 Running 8 89m 10.254.16.19 worker1.helene.os.fyre.ibm.com <none> <none>
234+
ibm-spectrum-scale-core-bpdwp 0/1 Running 0 14h 10.16.69.109 worker1.helene.os.fyre.ibm.com <none> <none>
235+
ibm-spectrum-scale-core-dsnx7 0/1 Running 0 14h 10.16.69.105 worker0.helene.os.fyre.ibm.com <none> <none>
236+
ibm-spectrum-scale-core-rdf54 0/1 Running 0 14h 10.16.69.110 worker2.helene.os.fyre.ibm.com <none> <none>
237+
ibm-spectrum-scale-gui-0 9/9 Running 0 14h 10.254.16.11 worker1.helene.os.fyre.ibm.com <none> <none>
238+
ibm-spectrum-scale-operator-6877d5c9bb-6xtxj 1/1 Running 0 15h 10.254.16.9 worker1.helene.os.fyre.ibm.com <none> <none>
239+
ibm-spectrum-scale-pmcollector-0 2/2 Running 9 8h 10.254.20.16 worker0.helene.os.fyre.ibm.com <none> <none>
240+
ibm-spectrum-scale-pmcollector-1 2/2 Running 0 8h 10.254.16.14 worker1.helene.os.fyre.ibm.com <none> <none>
241+
242+
[root@mycluster-inf bridge_deployment]# oc logs grafana-bridge-deployment-686f577585-jcr6r
243+
2021-04-08 21:12 - INFO - *** IBM Spectrum Scale bridge for Grafana - Version: 7.0 ***
244+
2021-04-08 21:12 - INFO - Successfully retrieved MetaData
245+
2021-04-08 21:12 - INFO - Received sensors:CPU, DiskFree, GPFSNodeAPI, GPFSRPCS, GPFSVFSX, GPFSWaiters, Load, Memory, Netstat, Network, TopProc
246+
2021-04-08 21:12 - INFO - Initial cherryPy server engine start have been invoked. Python version: 3.6.8 (default, Aug 18 2020, 08:33:21)
182247
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)], cherryPy version: 18.6.0.
183-
server started
248+
2021-04-08 21:12 - INFO - server started
184249
185250
```

example_deployment_scripts/bridge_deployment/bridge-deployment.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,20 @@ spec:
6363
value: "tls.crt"
6464
- name: PORT
6565
value: "8443"
66+
- name: PROTOCOL
67+
value: "https"
68+
- name: SERVERPORT
69+
value: "9981"
70+
- name: APIKEYNAME
71+
valueFrom:
72+
secretKeyRef:
73+
name: scale-grafana-api
74+
key: api-key-name
75+
- name: APIKEYVALUE
76+
valueFrom:
77+
secretKeyRef:
78+
name: scale-grafana-api
79+
key: api-key-value
6680
imagePullPolicy: Always
6781
ports:
6882
- name: http
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: scale-grafana-api
5+
type: Opaque
6+
data:
7+
api-key-name: <YOUR_BASE64_ENCODED_API_KEY_NAME>
8+
api-key-value: <YOUR_BASE64_ENCODED_API_KEY_VALUE>

0 commit comments

Comments
 (0)