-
Notifications
You must be signed in to change notification settings - Fork 1
/
ibm-spectrum-symphony-app-template.yaml
414 lines (414 loc) · 11.4 KB
/
ibm-spectrum-symphony-app-template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
---
apiVersion: template.openshift.io/v1
kind: Template
labels:
app: ibm-spectrum-symphony-app
template: ibm-spectrum-symphony-app
message: 'The following service(s) have been created in your project ${NAME}.'
metadata:
annotations:
description: IBM Spectrum Symphony Application.
iconClass: icon-other-unknown
openshift.io/display-name: IBM Spectrum Symphony
openshift.io/documentation-url: https://www.ibm.com/us-en/marketplace/analytics-workload-management
openshift.io/long-description: This template defines resources needed to run a Symphony application.
openshift.io/provider-display-name: IBM, Inc.
openshift.io/support-url: https://ibm.com
tags: symphony
bindable: 'false'
name: ibm-spectrum-symphony-app
objects:
- apiVersion: v1
kind: Service
metadata:
annotations:
description: Exposes and load balances the application pods
name: '${NAME}'
spec:
type: NodePort
ports:
- name: webgui
port: 8443
selector:
name: '${NAME}'
role: master
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: '${NAME}-webgui'
spec:
port:
targetPort: webgui
to:
kind: Service
name: '${NAME}'
tls:
termination: passthrough
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: '${NAME}'
labels:
name: '${NAME}'
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi
- apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: '${NAME}'
labels:
name: '${NAME}'
spec:
scaleTargetRef:
kind: DeploymentConfig
apiVersion: apps.openshift.io/v1
name: '${NAME}-compute'
minReplicas: 1
maxReplicas: 64
targetCPUUtilizationPercentage: ${{HAS_CPU_UTILIZATON}}
- kind: ImageStream
apiVersion: v1
metadata:
name: ${NAME}-client
labels:
name: ${NAME}
spec:
lookupPolicy:
local: true
- kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
name: ${NAME}-client
labels:
name: ${NAME}
spec:
serviceAccount: builder
nodeSelector: null
resources:
requests:
cpu: '${CPU_REQ_BUILD}'
memory: '${MEMORY_REQ_BUILD}'
limits:
cpu: '${CPU_LIMIT_BUILD}'
memory: '${MEMORY_LIMIT_BUILD}'
output:
to:
kind: ImageStreamTag
name: '${NAME}-client:latest'
successfulBuildsHistoryLimit: 2
failedBuildsHistoryLimit: 2
strategy:
type: Docker
dockerStrategy:
from:
kind: DockerImage
name: ${IMAGE}
postCommit: {}
source:
type: Git
git:
uri: ${GIT_APP_SRC}
ref: ${GIT_APP_SRC_BRANCH}
contextDir: ${GIT_APP_SRC_PATH}
triggers:
- type: ConfigChange
runPolicy: Serial
- kind: DeploymentConfig
apiVersion: apps.openshift.io/v1
metadata:
annotations:
description: Defines how to deploy the application server
template.alpha.openshift.io/wait-for-ready: 'true'
name: '${NAME}-master'
spec:
replicas: 1
selector:
name: '${NAME}'
strategy:
type: Rolling
triggers:
- type: ConfigChange
template:
metadata:
labels:
name: '${NAME}'
role: master
name: '${NAME}'
spec:
hostname: master
volumes:
- name: '${NAME}-master'
persistentVolumeClaim:
claimName: '${NAME}'
containers:
- name: '${NAME}-master'
image: '${IMAGE}'
imagePullPolicy: Always
env:
- name: LICENSE
value: '${LICENSE}'
- name: HOST_ROLE
value: MANAGEMENT
- name: DELETE_SHARED_TOP_SUBDIR
value: 'Y'
- name: CLUSTER_NAME
value: '${NAME}'
- name: LOGS_ON_SHARED
value: 'Y'
- name: GENERATE_SSL_CERT
value: 'Y'
- name: SHARED_TOP_SUBDIR
value: '${NAME}'
volumeMounts:
- name: '${NAME}-master'
mountPath: '/shared'
ports:
- containerPort: 8443
- containerPort: 8543
- containerPort: 8050
- containerPort: 17870
- containerPort: 27870
- containerPort: 17874
- containerPort: 17875
- containerPort: 17873
- containerPort: 21000
- containerPort: 21001
- containerPort: 21002
- containerPort: 21003
resources:
requests:
cpu: '${CPU_REQ_MASTER}'
memory: '${MEMORY_REQ_MASTER}'
limits:
cpu: '${CPU_LIMIT_MASTER}'
memory: '${MEMORY_LIMIT_MASTER}'
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
annotations:
description: Defines how to deploy the application server
template.alpha.openshift.io/wait-for-ready: 'true'
name: '${NAME}-compute'
spec:
replicas: 1
selector:
name: '${NAME}'
strategy:
type: Rolling
triggers:
- type: ConfigChange
template:
metadata:
labels:
name: '${NAME}'
role: compute
name: '${NAME}'
spec:
volumes:
- name: '${NAME}-compute'
persistentVolumeClaim:
claimName: '${NAME}'
containers:
- name: '${NAME}-compute'
image: '${IMAGE}'
imagePullPolicy: Always
env:
- name: LICENSE
value: '${LICENSE}'
- name: HOST_ROLE
value: COMPUTE
- name: CLUSTER_NAME
value: '${NAME}'
- name: LOGS_ON_SHARED
value: 'Y'
- name: SHARED_TOP_SUBDIR
value: '${NAME}'
volumeMounts:
- name: '${NAME}-compute'
mountPath: '/shared'
resources:
requests:
cpu: '${CPU_REQ_COMP}'
memory: '${MEMORY_REQ_COMP}'
limits:
cpu: '${CPU_LIMIT_COMP}'
memory: '${MEMORY_LIMIT_COMP}'
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
annotations:
description: Defines how to deploy the application server
template.alpha.openshift.io/wait-for-ready: 'true'
name: '${NAME}-client'
spec:
replicas: 1
selector:
name: '${NAME}'
strategy:
type: Rolling
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
from:
kind: ImageStreamTag
name: ${NAME}-client:latest
containerNames:
- ${NAME}-client
template:
metadata:
labels:
name: '${NAME}'
role: client
name: '${NAME}'
spec:
volumes:
- name: '${NAME}'
persistentVolumeClaim:
claimName: '${NAME}'
containers:
- name: '${NAME}-client'
image: '${IMAGE}-client'
imagePullPolicy: Always
env:
- name: LICENSE
value: '${LICENSE}'
- name: HOST_ROLE
value: CLIENT
- name: CLUSTER_NAME
value: '${NAME}'
- name: LOGS_ON_SHARED
value: 'Y'
- name: SHARED_TOP_SUBDIR
value: '${NAME}'
volumeMounts:
- name: '${NAME}'
mountPath: '/shared'
resources:
requests:
cpu: '${CPU_REQ_CLN}'
memory: '${MEMORY_REQ_CLN}'
limits:
cpu: '${CPU_LIMIT_CLN}'
memory: '${MEMORY_LIMIT_CLN}'
parameters:
- description: The name assigned to all of the frontend objects defined in this template.
displayName: Name
name: NAME
required: true
value: myapp
- description: You must accept the terms and conditions of IBM Spectrum Symhony CE. See /licenses directory on the image for details.
displayName: Accept the license by entering "accept" value.
name: LICENSE
required: true
value: ''
- description: Image name
displayName: Image
name: IMAGE
required: true
value: docker.io/ibmcom/spectrum-symphony:7.3.0.0
- description: GIT repository
displayName: Application GIT repository
name: GIT_APP_SRC
required: true
value: https://github.com/IBMSpectrumComputing/sym-ocp.git
- description: GIT repository branch
displayName: Application GIT repository branch
name: GIT_APP_SRC_BRANCH
required: true
value: master
- description: Sources path
displayName: Application sources path inside GIT repository
name: GIT_APP_SRC_PATH
required: true
value: samples/sampleapp_cpp
- description: CPU utilization for compute pods auto scaler.
displayName: Horizontal Autoscaler CPU Utilization Threshold
name: HAS_CPU_UTILIZATON
required: true
value: '70'
- description: Maximum amount of CPU the Symphony master container can use.
displayName: Master Host CPU Request
name: CPU_REQ_MASTER
required: true
value: '1'
- description: Maximum amount of memory the Symphony master container can use.
displayName: Master Host Memory Request
name: MEMORY_REQ_MASTER
required: true
value: 4Gi
- description: Maximum amount of CPU the Symphony master container can use.
displayName: Master Host CPU Limit
name: CPU_LIMIT_MASTER
required: true
value: '1'
- description: Maximum amount of memory the Symphony master container can use.
displayName: Master Host Memory Limit
name: MEMORY_LIMIT_MASTER
required: true
value: 4Gi
- description: Maximum amount of CPU the Symphony compute container can use.
displayName: Compute Host CPU Request
name: CPU_REQ_COMP
required: true
value: '500m'
- description: Maximum amount of memory the Symphony compute container can use.
displayName: Compute Host Memory Request
name: MEMORY_REQ_COMP
required: true
value: 1Gi
- description: Maximum amount of CPU the Symphony compute container can use.
displayName: Compute Host CPU Limit
name: CPU_LIMIT_COMP
required: true
value: '500m'
- description: Maximum amount of memory the Symphony compute container can use.
displayName: Compute Host Memory Limit
name: MEMORY_LIMIT_COMP
required: true
value: 1Gi
- description: Maximum amount of CPU the Symphony build container can use.
displayName: Build Host CPU Request
name: CPU_REQ_BUILD
required: true
value: '500m'
- description: Maximum amount of memory the Symphony build container can use.
displayName: Build Host Memory Request
name: MEMORY_REQ_BUILD
required: true
value: 1Gi
- description: Maximum amount of CPU the Symphony build container can use.
displayName: Build Host CPU Limit
name: CPU_LIMIT_BUILD
required: true
value: '500m'
- description: Maximum amount of memory the Symphony build container can use.
displayName: Build Host Memory Limit
name: MEMORY_LIMIT_BUILD
required: true
value: 1Gi
- description: Maximum amount of CPU the Symphony client container can use.
displayName: Client Host CPU Request
name: CPU_REQ_CLN
required: true
value: '500m'
- description: Maximum amount of memory the Symphony client container can use.
displayName: Client Host Memory Request
name: MEMORY_REQ_CLN
required: true
value: 1Gi
- description: Maximum amount of CPU the Symphony client container can use.
displayName: Client Host CPU Limit
name: CPU_LIMIT_CLN
required: true
value: '500m'
- description: Maximum amount of memory the Symphony client container can use.
displayName: Client Host Memory Limit
name: MEMORY_LIMIT_CLN
required: true
value: 1Gi