Skip to content

Commit d9cd695

Browse files
authored
Merge pull request #36 from Helene/cnsa_5.1.1.1
Update deployment scripts for CNSA_5.1.1.1
2 parents 072239f + 353da80 commit d9cd695

File tree

3 files changed

+110
-25
lines changed

3 files changed

+110
-25
lines changed

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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,18 @@ spec:
6363
value: "tls.crt"
6464
- name: PORT
6565
value: "8443"
66+
- name: SERVERPORT
67+
value: "9981"
68+
- name: APIKEYNAME
69+
valueFrom:
70+
secretKeyRef:
71+
name: scale-grafana-api
72+
key: api-key-name
73+
- name: APIKEYVALUE
74+
valueFrom:
75+
secretKeyRef:
76+
name: scale-grafana-api
77+
key: api-key-value
6678
imagePullPolicy: Always
6779
ports:
6880
- 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)