-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdedalus.template.yml
330 lines (328 loc) · 10.2 KB
/
dedalus.template.yml
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
apiVersion: template.openshift.io/v1
kind: Template
labels:
template: dedalus-drools-kie-template
message: |-
The following service(s) have been created in your current project.
Application Name: ${APP_NAME_DROOLS}
Application Version: ${APP_VERSION_DROOLS}
For more information about using this template, including OpenShift considerations, see http://ci-git.noemalife.loc:80/enterprise-architect/openshift-s2i-template.git.
metadata:
annotations:
description: |-
This template includes:
- Drools (showcase flavour) v7.24.0
- Kie Server v7.24.0.
This template will create two different DeploymentConfig, one for each component. To access the Drools WB, use the Drools route on port 8080 and add the following context: "/business-central/rest/controller".
iconClass: icon-d4center
openshift.io/display-name: D4 - Drools w Kie Executor
openshift.io/documentation-url: drools
openshift.io/long-description: WIP
openshift.io/provider-display-name: Dedalus S.p.A.
openshift.io/support-url: [email protected]
tags: dedalus-drools-kie,dedalus,drools
name: dedalus-drools-kie
objects:
- apiVersion: v1
kind: DeploymentConfig
metadata:
annotations:
template.alpha.openshift.io/wait-for-ready: "true"
labels:
app.kubernetes.io/part-of: drools
io.dedalus.drools: drools
name: ${APP_NAME_DROOLS}
spec:
replicas: 1
revisionHistoryLimit: 5
selector:
app: ${APP_NAME_DROOLS}
deploymentconfig: ${APP_NAME_DROOLS}
strategy:
activeDeadlineSeconds: 1800
type: Rolling
template:
metadata:
labels:
app: ${APP_NAME_DROOLS}
deploymentconfig: ${APP_NAME_DROOLS}
spec:
containers:
- name: ${APP_NAME_DROOLS}
image: 350801433917.dkr.ecr.eu-west-1.amazonaws.com/enterprise-architect/support:${APP_VERSION_DROOLS}
imagePullPolicy: Always
ports:
- containerPort: 8080
protocol: TCP
- containerPort: 8001
protocol: TCP
volumeMounts:
- mountPath: /wildfly/bin/.niogit
name: drools-git
resources:
limits:
cpu: 700m
memory: 1800Mi
requests:
cpu: 100m
memory: 1000Mi
readinessProbe:
httpGet:
path: /healthcheck
port: 8080
scheme: HTTP
initialDelaySeconds: 120
timeoutSeconds: 3
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
livenessProbe:
httpGet:
path: /healthcheck
port: 8080
scheme: HTTP
initialDelaySeconds: 120
timeoutSeconds: 3
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
env:
- name: NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
envFrom:
- configMapRef:
name: '${APP_NAME_DROOLS}-envs'
volumes:
- name: drools-git
persistentVolumeClaim:
claimName: drools-git
dnsPolicy: ClusterFirst
terminationGracePeriodSeconds: 30
test: false
triggers:
- type: ConfigChange
- apiVersion: v1
kind: DeploymentConfig
metadata:
annotations:
template.alpha.openshift.io/wait-for-ready: "true"
labels:
app.kubernetes.io/part-of: drools
io.dedalus.drools: kie-server
name: ${APP_NAME_KIE}
spec:
replicas: 1
revisionHistoryLimit: 5
selector:
app: ${APP_NAME_KIE}
deploymentconfig: ${APP_NAME_KIE}
strategy:
activeDeadlineSeconds: 1800
type: Rolling
template:
metadata:
labels:
app: ${APP_NAME_KIE}
deploymentconfig: ${APP_NAME_KIE}
spec:
containers:
- name: ${APP_NAME_KIE}
image: 350801433917.dkr.ecr.eu-west-1.amazonaws.com/enterprise-architect/support:${APP_VERSION_KIE}
imagePullPolicy: Always
ports:
- containerPort: 8080
protocol: TCP
readinessProbe:
httpGet:
path: /healthcheck
port: 8080
scheme: HTTP
initialDelaySeconds: 140
timeoutSeconds: 3
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
livenessProbe:
httpGet:
path: /healthcheck
port: 8080
scheme: HTTP
initialDelaySeconds: 140
timeoutSeconds: 3
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
resources:
limits:
cpu: '400m'
memory: '3Gi'
requests:
cpu: '100m'
memory: '1.5Gi'
envFrom:
- configMapRef:
name: '${APP_NAME_KIE}-envs'
# - configMapRef:
# name: '${APP_NAME_KIE}-creds'
env:
- name: NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: KIE_WB_ENV_KIE_CONTEXT_PATH
value: "business-central"
- name: KIE_SERVER_LOCATION
value: http://${APP_NAME_KIE}-8080-tcp:8080/kie-server/services/rest/server
- name: KIE_MAVEN_REPO
value: http://${APP_NAME_DROOLS}-8080-tcp:8080/business-central/maven2
- name: KIE_SERVER_CONTROLLER
value: http://${APP_NAME_DROOLS}-8080-tcp:8080/business-central/rest/controller
dnsPolicy: ClusterFirst
terminationGracePeriodSeconds: 30
test: false
triggers:
- type: ConfigChange
# - apiVersion: v1
# kind: ConfigMap
# metadata:
# name: ${APP_NAME_KIE}-creds
# labels:
# app.kubernetes.io/part-of: drools
# io.dedalus.drools: kie-server
# data:
# KIE_SERVER_USER: kieserver
# KIE_SERVER_PWD: kieserver1!
# KIE_SERVER_CONTROLLER_USER: admin
# KIE_SERVER_CONTROLLER_PWD: admin
# KIE_MAVEN_REPO_USER: admin
# KIE_MAVEN_REPO_PASSWORD: admin
- apiVersion: v1
kind: ConfigMap
metadata:
name: ${APP_NAME_DROOLS}-envs
data:
JAVA_OPTS: -Xms256m -Xmx2048m -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8
- apiVersion: v1
kind: ConfigMap
metadata:
name: ${APP_NAME_KIE}-envs
labels:
app.kubernetes.io/part-of: drools
io.dedalus.drools: kie-server
data:
JAVA_OPTS: -Xms256m -Xmx1024m -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8
- apiVersion: v1
kind: Service
metadata:
annotations:
description: Exposes and load balances the application pods
labels:
app: ${APP_NAME_DROOLS}
name: ${APP_NAME_DROOLS}-8080-tcp
spec:
ports:
- name: 8080-tcp
port: 8080
protocol: TCP
targetPort: 8080
- name: 8001-tcp
port: 8001
protocol: TCP
targetPort: 8001
selector:
app: ${APP_NAME_DROOLS}
deploymentconfig: ${APP_NAME_DROOLS}
- apiVersion: v1
kind: Service
metadata:
annotations:
description: Exposes and load balances the application pods
labels:
app: ${APP_NAME_KIE}
name: ${APP_NAME_KIE}-8080-tcp
spec:
ports:
- name: 8080-tcp
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: ${APP_NAME_KIE}
deploymentconfig: ${APP_NAME_KIE}
- apiVersion: v1
kind: Route
metadata:
annotations:
template.openshift.io/expose-uri: http://{.spec.host}{.spec.path}
labels:
app: ${APP_NAME_KIE}
name: ${APP_NAME_KIE}-8080-tcp
spec:
port:
targetPort: 8080-tcp
to:
kind: Service
name: ${APP_NAME_KIE}-8080-tcp
- apiVersion: v1
kind: Route
metadata:
annotations:
template.openshift.io/expose-uri: http://{.spec.host}{.spec.path}
labels:
app: ${APP_NAME_DROOLS}
name: ${APP_NAME_DROOLS}-8080-tcp
spec:
port:
targetPort: 8080-tcp
to:
kind: Service
name: ${APP_NAME_DROOLS}-8080-tcp
- apiVersion: v1
kind: Route
metadata:
annotations:
template.openshift.io/expose-uri: http://{.spec.host}{.spec.path}
labels:
app: ${APP_NAME_DROOLS}
name: ${APP_NAME_DROOLS}-8001-tcp
spec:
port:
targetPort: 8001-tcp
to:
kind: Service
name: ${APP_NAME_DROOLS}-8080-tcp
- kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: drools-git
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
parameters:
- name: APP_NAME_DROOLS
displayName: Application Name
description: Type the application name
required: true
value: drools-wb
- name: APP_NAME_KIE
displayName: Application Name
description: Type the application name
required: true
value: kie-server
- name: APP_VERSION_DROOLS
displayName: Version of Application Image of Drools
description: Version of Application Image to be used (1.0.0, 1.0.0-SNAPSHOT or latest).
required: true
value: "drools-7.24.0"
- name: APP_VERSION_KIE
displayName: Version of Application Image of Drools
description: Version of Application Image to be used (1.0.0, 1.0.0-SNAPSHOT or latest).
required: true
value: "kie-server-7.24.0"