Ricardo Jun
2018-11-26 2eade3b821a49e55999acb4b75b5a8cb614a8c93
commit | author | age
9e7a28 1 apiVersion: v1
RJ 2 kind: Template
3 labels:
4   template: rhdm7-no-bc-ng
5   xpaas: 1.4.0
6 message: A new persistent Decision Manager applications have been created in your project.
7   This template does not define any BCs.  Instead, the DCs in this template have a dependency on builds that are
8   kicked off and pushed to the openshift namespace prior to this template being invoked.
9 metadata:
10   annotations:
11     description: Application template for Red Hat JBoss Decision Management 7.0.
12     iconClass: icon-jboss
13     openshift.io/display-name: Red Hat Decision Manager 7.0 applications (Persistent with https)
14     tags: rhdm,jboss,xpaas
15     version: 1.4.0
16   name: rhdm7-no-bc-ng
17 objects:
18
19 # dtorresf: Adding the service account and secrets to the template.
20 # I like having a more centralized approach for all the required assets to
21 # instantiate the environment, instead of having to break into different
22 # execution steps.
23 - kind: ServiceAccount
24   apiVersion: v1
25   metadata:
26     name: decisioncentral-service-account
27     labels:
28       application: "${APPLICATION_NAME}"
29   secrets:
30   - name: decisioncentral-app-secret
31
32 - kind: Secret
33   apiVersion: v1
34   metadata:
35     annotations:
36       description: Default secret file with name 'jboss' and password 'mykeystorepass'
37     name: decisioncentral-app-secret
38     labels:
39       application: "${APPLICATION_NAME}"
40   data:
41     keystore.jks: "/u3+7QAAAAIAAAABAAAAAQAFamJvc3MAAAFNbVtLLAAABQMwggT/MA4GCisGAQQBKgIRAQEFAASCBOsxl4wqa+E+XP8+qMZY9XLhvKrRX8V1MHdwFZQaLTEVURCizqYXoMnbhtfV0oMAUFsE7013TTA9Q2l+pSs+cqz6HH/vwjEEIkqJx5wD8WcD/bu9e9F9EHQ+zrjZFmpMFvXsvj9+ux1o/YLBDGY3kd4MoDcJy0yJ/ZpzNYLkXanlrMhWqxC7MAliCBsdyVgNn5RFb4Nn+JZgJuNSIGo/K292+0IFaFv9vsXbX889W9HPCvfO0mQIzoy8In0NhzdKli/67y4kbDkWaI0fRONckZTxNpxn6rMc0nN9zKrGVToLxj1Ufcoj/tCvR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oyEwHzAdBgNVHQ4EFgQURLJKk/gaSrMjDyX8iYtCzPtTBqAwDQYJKoZIhvcNAQELBQADggEBAA4ESTKsWevv40hFv11t+lGNHT16u8Xk+WnvB4Ko5sZjVhvRWTTKOEBE5bDYfMhf0esn8gg0B4Qtm4Rb5t9PeaG/0d6xxD0BIV6eWihJVtEGOH47Wf/UzfC88fqoIxZ6MMBPik/WeafvOK+HIHfZSwAmqlXgl4nNVDdMNHtBhNAvikL3osxrSbqdi3eyI7rqSpb41Lm9v+PF+vZTOGRQf22Gq30/Ie85DlqugtRKimWHJYL2HeL4ywTtQKgde6JDRCOHwbDcsl6CbMjugt3yyI7Yo9EJdKb5p6YoVOpnCz7369W9Uim+Xrl2ELZWM5WTiQFxd6S36Ql2TUk+s8zj/GoN9ov0Y/yNNCxAibwyzo94N+Q4vA=="
42
43 - kind: ServiceAccount
44   apiVersion: v1
45   metadata:
46     name: kieserver-service-account
47     labels:
48       application: "${APPLICATION_NAME}"
49   secrets:
50   - name: kieserver-app-secret
51
52 - kind: Secret
53   apiVersion: v1
54   metadata:
55     annotations:
56       description: Default secret file with name 'jboss' and password 'mykeystorepass'
57     name: kieserver-app-secret
58     labels:
59       application: "${APPLICATION_NAME}"
60   data:
61     keystore.jks: "/u3+7QAAAAIAAAABAAAAAQAFamJvc3MAAAFNbVtLLAAABQMwggT/MA4GCisGAQQBKgIRAQEFAASCBOsxl4wqa+E+XP8+qMZY9XLhvKrRX8V1MHdwFZQaLTEVURCizqYXoMnbhtfV0oMAUFsE7013TTA9Q2l+pSs+cqz6HH/vwjEEIkqJx5wD8WcD/bu9e9F9EHQ+zrjZFmpMFvXsvj9+ux1o/YLBDGY3kd4MoDcJy0yJ/ZpzNYLkXanlrMhWqxC7MAliCBsdyVgNn5RFb4Nn+JZgJuNSIGo/K292+0IFaFv9vsXbX889W9HPCvfO0mQIzoy8In0NhzdKli/67y4kbDkWaI0fRONckZTxNpxn6rMc0nN9zKrGVToLxj1Ufcoj/tCvR8agtPp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zAdBgNVHQ4EFgQURLJKk/gaSrMjDyX8iYtCzPtTBqAwDQYJKoZIhvcNAQELBQADggEBAA4ESTKsWevv40hFv11t+lGNHT16u8Xk+WnvB4Ko5sZjVhvRWTTKOEBE5bDYfMhf0esn8gg0B4Qtm4Rb5t9PeaG/0d6xxD0BIV6eWihJVtEGOH47Wf/UzfC88fqoIxZ6MMBPik/WeafvOK+HIHfZSwAmqlXgl4nNVDdMNHtBhNAvikL3osxrSbqdi3eyI7rqSpb41Lm9v+PF+vZTOGRQf22Gq30/Ie85DlqugtRKimWHJYL2HeL4ywTtQKgde6JDRCOHwbDcsl6CbMjugt3yyI7Yo9EJdKb5p6YoVOpnCz7369W9Uim+Xrl2ELZWM5WTiQFxd6S36Ql2TUk+s8zj/GoN9ov0Y/yNNCxAibwyzo94N+Q4vA=="
62
63 - kind: Service
64   apiVersion: v1
65   spec:
66     ports:
67     - port: 8080
68       targetPort: 8080
69     selector:
70       deploymentConfig: "${APPLICATION_NAME}-rhdmcentr"
71   metadata:
72     name: "${APPLICATION_NAME}-rhdmcentr"
73     labels:
74       application: "${APPLICATION_NAME}"
75     annotations:
76       description: The Decision Central web server's http port.
77
78 - kind: Service
79   apiVersion: v1
80   spec:
81     ports:
82     - port: 8443
83       targetPort: 8443
84     selector:
85       deploymentConfig: "${APPLICATION_NAME}-rhdmcentr"
86   metadata:
87     name: secure-${APPLICATION_NAME}-rhdmcentr
88     labels:
89       application: "${APPLICATION_NAME}"
90     annotations:
91       description: The Decision Central web server's https port.
92 - kind: Service
93   apiVersion: v1
94   spec:
95     ports:
96     - port: 8080
97       targetPort: 8080
98     selector:
99       deploymentConfig: "${APPLICATION_NAME}-kieserver"
100   metadata:
101     name: "${APPLICATION_NAME}-kieserver"
102     labels:
103       application: "${APPLICATION_NAME}"
104     annotations:
105       description: The KIE server web server's http port.
106 - kind: Service
107   apiVersion: v1
108   spec:
109     ports:
110     - port: 8443
111       targetPort: 8443
112     selector:
113       deploymentConfig: "${APPLICATION_NAME}-kieserver"
114   metadata:
115     name: secure-${APPLICATION_NAME}-kieserver
116     labels:
117       application: "${APPLICATION_NAME}"
118     annotations:
119       description: The KIE server web server's https port.
120
121 - apiVersion: v1
122   kind: Service
123   metadata:
124     annotations:
125       description: The nodejs web server's http port for the angular application demo.
126     labels:
127       application: ${APPLICATION_NAME}
128 # dtorresf: Now the angular2 application does not only is integrated with the
129 # mortgages kie container, but also with the other kie containers:
130 # customer-greeting, mortgages and policy-quote
131     name: ${APPLICATION_NAME}-ng-dmf
132   spec:
133     ports:
134     - port: 8080
135       targetPort: 8080
136     selector:
137       deploymentConfig: ${APPLICATION_NAME}-ng-dmf
138
139 - kind: Route
140   apiVersion: v1
141   id: "${APPLICATION_NAME}-rhdmcentr-http"
142   metadata:
143     name: "${APPLICATION_NAME}-rhdmcentr"
144     labels:
145       application: "${APPLICATION_NAME}"
146     annotations:
147       description: Route for Decision Central's http service.
148       haproxy.router.openshift.io/timeout: 60s
149   spec:
150     host: "${DECISION_CENTRAL_HOSTNAME_HTTP}"
151     to:
152       name: "${APPLICATION_NAME}-rhdmcentr"
153
154 - kind: Route
155   apiVersion: v1
156   id: "${APPLICATION_NAME}-rhdmcentr-https"
157   metadata:
158     name: secure-${APPLICATION_NAME}-rhdmcentr
159     labels:
160       application: "${APPLICATION_NAME}"
161     annotations:
162       description: Route for Decision Central's https service.
163       haproxy.router.openshift.io/timeout: 60s
164   spec:
165     host: "${DECISION_CENTRAL_HOSTNAME_HTTPS}"
166     to:
167       name: secure-${APPLICATION_NAME}-rhdmcentr
168     tls:
169       termination: passthrough
170
171 - kind: Route
172   apiVersion: v1
173   id: "${APPLICATION_NAME}-kieserver-http"
174   metadata:
175     name: "${APPLICATION_NAME}-kieserver"
176     labels:
177       application: "${APPLICATION_NAME}"
178     annotations:
179       description: Route for KIE server's http service.
180   spec:
181     host: "${EXECUTION_SERVER_HOSTNAME_HTTP}"
182     to:
183       name: "${APPLICATION_NAME}-kieserver"
184
185 - kind: Route
186   apiVersion: v1
187   id: "${APPLICATION_NAME}-kieserver-https"
188   metadata:
189     name: secure-${APPLICATION_NAME}-kieserver
190     labels:
191       application: "${APPLICATION_NAME}"
192     annotations:
193       description: Route for KIE server's https service.
194   spec:
195     host: "${EXECUTION_SERVER_HOSTNAME_HTTPS}"
196     to:
197       name: secure-${APPLICATION_NAME}-kieserver
198     tls:
199       termination: passthrough
200
201 - apiVersion: v1
202   kind: Route
203   id: ${APPLICATION_NAME}-ng-dmf-http
204   metadata:
205     annotations:
206       description: Route for nodejs mortgages http service.
207     labels:
208       application: ${APPLICATION_NAME}
209     name: ${APPLICATION_NAME}-ng-dmf
210   spec:
211     host: ${DECISION_CENTRAL_HOSTNAME_HTTP}
212     to:
213       name: ${APPLICATION_NAME}-ng-dmf
214
215 - apiVersion: v1
216   kind: DeploymentConfig
217   metadata:
218     labels:
219       application: ${APPLICATION_NAME}
220     name: ${APPLICATION_NAME}-rhdmcentr
221   spec:
222     # JA Bride:  setting all BCs and DCs to paused.  Will then start each one via ansible
223     paused: true
224     replicas: 1
225     selector:
226       deploymentConfig: ${APPLICATION_NAME}-rhdmcentr
227     strategy:
228       # https://github.com/redhat-gpe/bxms_decision_mgmt_foundations/issues/39
229       type: Rolling
230     template:
231       metadata:
232         labels:
233           application: ${APPLICATION_NAME}
234           deploymentConfig: ${APPLICATION_NAME}-rhdmcentr
235         name: ${APPLICATION_NAME}-rhdmcentr
236       spec:
237         containers:
238         - env:
239           # Can expect -Xmx of 2458MB based on 3Gi memory limit
240           - name: JAVA_MAX_MEM_RATIO
241             value: "80"
242           - name: JAVA_INITIAL_MEM_RATIO
243             value: "0"
244           - name: GC_MAX_METASPACE_SIZE
245             value: "500"
246           - name: KIE_ADMIN_PWD
247             value: "${KIE_ADMIN_PWD}"
248           - name: KIE_ADMIN_USER
249             value: "${KIE_ADMIN_USER}"
250           - name: KIE_MBEANS
251             value: "${KIE_MBEANS}"
252           - name: KIE_SERVER_CONTROLLER_PWD
253             value: "${KIE_SERVER_CONTROLLER_PWD}"
254           - name: KIE_SERVER_CONTROLLER_USER
255             value: "${KIE_SERVER_CONTROLLER_USER}"
256           - name: KIE_SERVER_PWD
257             value: "${KIE_SERVER_PWD}"
258           - name: KIE_SERVER_USER
259             value: "${KIE_SERVER_USER}"
260           - name: HTTPS_KEYSTORE_DIR
261             value: "/etc/decisioncentral-secret-volume"
262           - name: HTTPS_KEYSTORE
263             value: "${DECISION_CENTRAL_HTTPS_KEYSTORE}"
264           - name: HTTPS_NAME
265             value: "${DECISION_CENTRAL_HTTPS_NAME}"
266           - name: HTTPS_PASSWORD
267             value: "${DECISION_CENTRAL_HTTPS_PASSWORD}"
268           - name: ADMIN_USERNAME
269             value: "${ADMIN_USERNAME}"
270           - name: ADMIN_PASSWORD
271             value: "${ADMIN_PASSWORD}"
272           - name: PROBE_IMPL
273             value: probe.eap.jolokia.EapProbe
274           - name: PROBE_DISABLE_BOOT_ERRORS_CHECK
275             value: 'true'
276           # dtorresf: Enable ssh access through external tools like JBDS
277           - name: JAVA_OPTS_APPEND
278             value: '-Dorg.uberfire.nio.git.ssh.algorithm=RSA -Dorg.uberfire.nio.git.ssh.host=0.0.0.0'
279           image: rhdm70-decisioncentral-openshift:1.0
280           imagePullPolicy: Always
281           livenessProbe:
282             exec:
283               command:
284               - /bin/bash
285               - -c
286               - /opt/eap/bin/livenessProbe.sh
287
288 # JA Bride: Bumping up resources
289           resources:
290             limits:
291               cpu: "1"
292               # Utilized when determining -XmX
293               memory: 3Gi
294             requests:
295               cpu: "1"
296               memory: 2Gi
297
298           name: ${APPLICATION_NAME}-rhdmcentr
299           ports:
300           - containerPort: 8778
301             name: jolokia
302             protocol: TCP
303           - containerPort: 8080
304             name: http
305             protocol: TCP
306           - containerPort: 8443
307             name: https
308             protocol: TCP
309           readinessProbe:
310             exec:
311               command:
312               - /bin/bash
313               - -c
314               - /opt/eap/bin/readinessProbe.sh
315           volumeMounts:
316           - mountPath: /etc/decisioncentral-secret-volume
317             name: decisioncentral-keystore-volume
318             readOnly: true
319           - name: "${APPLICATION_NAME}-rhdmcentr-pvol"
320             mountPath: "/opt/eap/standalone/data/bpmsuite"
321         serviceAccountName: decisioncentral-service-account
322         terminationGracePeriodSeconds: 60
323         volumes:
324         - name: decisioncentral-keystore-volume
325           secret:
326             secretName: ${DECISION_CENTRAL_HTTPS_SECRET}
327         - name: "${APPLICATION_NAME}-rhdmcentr-pvol"
328           persistentVolumeClaim:
329             claimName: "${APPLICATION_NAME}-rhdmcentr-claim"
330     triggers:
331     - imageChangeParams:
332         automatic: true
333         containerNames:
334         - ${APPLICATION_NAME}-rhdmcentr
335         from:
336           kind: ImageStreamTag
337           name: rhdm70-decisioncentral-openshift:1.0
338           namespace: ${RHT_IMAGE_STREAM_NAMESPACE}
339       type: ImageChange
340     - type: ConfigChange
341
342 # dtorresf: Having the ConfigMap in the same template to reduce instantiation steps
343 - apiVersion: v1
344   kind: ConfigMap
345   data:
346     undertow-cors.cli: >
347       batch
348
349       /subsystem=undertow/configuration=filter/response-header=Access-Control-Allow-Origin:add(header-name="Access-Control-Allow-Origin",
350       header-value="*")
351
352       /subsystem=undertow/server=default-server/host=default-host/filter-ref=Access-Control-Allow-Origin/:add()
353
354       /subsystem=undertow/configuration=filter/response-header=Access-Control-Allow-Methods:add(header-name="Access-Control-Allow-Methods",
355       header-value="GET, POST, OPTIONS, PUT, DELETE")
356
357       /subsystem=undertow/server=default-server/host=default-host/filter-ref=Access-Control-Allow-Methods/:add()
358
359       /subsystem=undertow/configuration=filter/response-header=Access-Control-Allow-Headers:add(header-name="Access-Control-Allow-Headers",
360       header-value="accept, authorization,  content-type, x-requested-with")
361
362       /subsystem=undertow/server=default-server/host=default-host/filter-ref=Access-Control-Allow-Headers/:add()
363
364       /subsystem=undertow/configuration=filter/response-header=Access-Control-Allow-Credentials:add(header-name="Access-Control-Allow-Credentials",
365       header-value="true")
366
367       /subsystem=undertow/server=default-server/host=default-host/filter-ref=Access-Control-Allow-Credentials/:add()
368
369       /subsystem=undertow/configuration=filter/response-header=Access-Control-Max-Age:add(header-name="Access-Control-Max-Age",
370       header-value="2")
371
372       /subsystem=undertow/server=default-server/host=default-host/filter-ref=Access-Control-Max-Age/:add()
373
374       run-batch
375   metadata:
376     labels:
377       application: ${APPLICATION_NAME}
378     name: undertow-cors
379 # dtorresf: This configmap enables configuration for the angular2 application
380 # It is a typescript file that is inserted in the execution context of the
381 # nodejs application, defining global variables that can be used accross the
382 # angular2 execution.
383 - apiVersion: v1
384   kind: ConfigMap
385   data:
386     environment.prod.ts: >
387       export const environment = {
388         production: true,
389         dmApiUrl: 'http://${APPLICATION_NAME}-kieserver-${PROJECT}.${CLUSTER}/',
390         dmUserName: '${KIE_ADMIN_USER}',
391         dmCredentials: '${KIE_ADMIN_PWD}',
392       };
393
394   metadata:
395     labels:
396       application: ${APPLICATION_NAME}
397     name: ng-environment
398
399 - apiVersion: v1
400   kind: DeploymentConfig
401   metadata:
402     labels:
403       application: ${APPLICATION_NAME}
404     name: ${APPLICATION_NAME}-kieserver
405   spec:
406     # JA Bride:  setting all BCs and DCs to paused.  Will then start each one via ansible
407     paused: true
408     replicas: 1
409     selector:
410       deploymentConfig: ${APPLICATION_NAME}-kieserver
411     strategy:
412       # https://github.com/redhat-gpe/bxms_decision_mgmt_foundations/issues/39
413       type: Rolling
414     template:
415       metadata:
416         labels:
417           application: ${APPLICATION_NAME}
418           deploymentConfig: ${APPLICATION_NAME}-kieserver
419         name: ${APPLICATION_NAME}-kieserver
420       spec:
421         containers:
422         - image: custom-kieserver:latest
423           imagePullPolicy: Always
424           name: ${APPLICATION_NAME}-kieserv
425           livenessProbe:
426             exec:
427               command:
428               - /bin/bash
429               - -c
430               - /opt/eap/bin/livenessProbe.sh
431           env:
432           - name: DROOLS_SERVER_FILTER_CLASSES
433             value: "${DROOLS_SERVER_FILTER_CLASSES}"
434           - name: KIE_ADMIN_PWD
435             value: "${KIE_ADMIN_PWD}"
436           - name: KIE_ADMIN_USER
437             value: "${KIE_ADMIN_USER}"
438           - name: KIE_MBEANS
439             value: "${KIE_MBEANS}"
440           - name: KIE_SERVER_BYPASS_AUTH_USER
441             value: "${KIE_SERVER_BYPASS_AUTH_USER}"
442           - name: KIE_SERVER_CONTROLLER_PWD
443             value: "${KIE_SERVER_CONTROLLER_PWD}"
444           - name: KIE_SERVER_CONTROLLER_SERVICE
445             value: "${APPLICATION_NAME}-rhdmcentr"
446           - name: KIE_SERVER_CONTROLLER_USER
447             value: "${KIE_SERVER_CONTROLLER_USER}"
448           - name: KIE_SERVER_HOST
449             valueFrom:
450               fieldRef:
451                 fieldPath: status.podIP
452           - name: KIE_SERVER_PWD
453             value: "${KIE_SERVER_PWD}"
454           - name: KIE_SERVER_USER
455             value: "${KIE_SERVER_USER}"
456           - name: MAVEN_REPO_URL
457             value: "${MAVEN_REPO_URL}"
458           - name: MAVEN_REPO_SERVICE
459             value: "${APPLICATION_NAME}-rhdmcentr"
460           - name: MAVEN_REPO_PATH
461             value: "/maven2/"
462           - name: MAVEN_REPO_USERNAME
463             value: "${MAVEN_REPO_USERNAME}"
464           - name: MAVEN_REPO_PASSWORD
465             value: "${MAVEN_REPO_PASSWORD}"
466           - name: HTTPS_KEYSTORE_DIR
467             value: "/etc/kieserver-secret-volume"
468           - name: HTTPS_KEYSTORE
469             value: "${KIE_SERVER_HTTPS_KEYSTORE}"
470           - name: HTTPS_NAME
471             value: "${KIE_SERVER_HTTPS_NAME}"
472           - name: HTTPS_PASSWORD
473             value: "${KIE_SERVER_HTTPS_PASSWORD}"
474           resources:
475             limits:
476               cpu: "1"
477               memory: 2Gi
478             requests:
479               cpu: "1"
480               memory: 1Gi
481           ports:
482           - containerPort: 8778
483             name: jolokia
484             protocol: TCP
485           - containerPort: 8080
486             name: http
487             protocol: TCP
488           - containerPort: 8443
489             name: https
490             protocol: TCP
491           readinessProbe:
492             exec:
493               command:
494               - /bin/bash
495               - -c
496               - /opt/eap/bin/readinessProbe.sh
497           volumeMounts:
498           - mountPath: /etc/kieserver-secret-volume
499             name: kieserver-keystore-volume
500             readOnly: true
501           - mountPath: /data
502             name: cors-volume
503         serviceAccountName: decisioncentral-service-account
504         terminationGracePeriodSeconds: 60
505         volumes:
506         - name: kieserver-keystore-volume
507           secret:
508             secretName: ${KIE_SERVER_HTTPS_SECRET}
509         - configMap:
510             name: undertow-cors
511           name: cors-volume
512     triggers:
513     - imageChangeParams:
514         automatic: true
515         containerNames:
516         - ${APPLICATION_NAME}-kieserver
517         from:
518           kind: ImageStreamTag
519           name: custom-kieserver:latest
520           namespace: ${GPTE_IMAGE_STREAM_NAMESPACE}
521       type: ImageChange
522     - type: ConfigChange
523
524 - apiVersion: v1
525   kind: PersistentVolumeClaim
526   metadata:
527     name: "${APPLICATION_NAME}-rhdmcentr-claim"
528     labels:
529       application: ${APPLICATION_NAME}
530   spec:
531     accessModes:
532     - ReadWriteOnce
533     resources:
534       requests:
535         storage: "${DECISION_CENTRAL_VOLUME_CAPACITY}"
536
537 - apiVersion: v1
538   kind: DeploymentConfig
539   metadata:
540     labels:
541       application: ${APPLICATION_NAME}
542     name: ${APPLICATION_NAME}-ng-dmf
543   spec:
544     # JA Bride:  setting all BCs and DCs to paused.  Will then start each one via ansible
545     paused: true
546     replicas: 1
547     selector:
548       deploymentConfig: ${APPLICATION_NAME}-ng-dmf
549     strategy:
550       # https://github.com/redhat-gpe/bxms_decision_mgmt_foundations/issues/39
551       type: Rolling
552     template:
553       metadata:
554         labels:
555           application: ${APPLICATION_NAME}
556           deploymentConfig: ${APPLICATION_NAME}-ng-dmf
557         name: ${APPLICATION_NAME}-ng-dmf
558       spec:
559         containers:
560         - image: ng-dmf:latest
561           imagePullPolicy: Always
562           livenessProbe:
563             failureThreshold: 10
564             initialDelaySeconds: 50
565             periodSeconds: 10
566             tcpSocket:
567               port: 8080
568             timeoutSeconds: 1
569           name: ${APPLICATION_NAME}-ng-dmf
570           ports:
571           - containerPort: 8080
572             name: http
573             protocol: TCP
574           readinessProbe:
575             initialDelaySeconds: 50
576             failureThreshold: 30
577             periodSeconds: 10
578             tcpSocket:
579               port: 8080
580             timeoutSeconds: 1
581           resources:
582             limits:
583               cpu: "1"
584               memory: 2Gi
585             requests:
586               cpu: "1"
587               memory: 256Mi
588 # dtorresf: mapping the configmap into the /data volume mount enables the
589 # environment configuration for the angular2 nodejs application
590 # note the coincidence with:
591 # https://github.com/gpe-mw-training/gpte-ng-dmf/blob/master/.angular-cli.json#L50
592           volumeMounts:
593           - mountPath: /data
594             name: environment-volume
595             readOnly: true
596         volumes:
597         - configMap:
598             name: ng-environment
599           name: environment-volume
600     triggers:
601     - imageChangeParams:
602         automatic: true
603         containerNames:
604         - ${APPLICATION_NAME}-ng-dmf
605         from:
606           kind: ImageStreamTag
607           name: ng-dmf:latest
608           namespace: ${GPTE_IMAGE_STREAM_NAMESPACE}
609       type: ImageChange
610     - type: ConfigChange
611
612 parameters:
613 - displayName: Application Name
614   description: The name for the application.
615   name: APPLICATION_NAME
616   value: myapp
617   required: true
618 - displayName: EAP Admin User
619   description: EAP administrator username
620   name: ADMIN_USERNAME
621   value: eapadmin
622   required: false
623 - displayName: EAP Admin Password
624   description: EAP administrator password
625   name: ADMIN_PASSWORD
626   from: "[a-zA-Z]{6}[0-9]{1}!"
627   generate: expression
628   required: false
629 - displayName: KIE Admin User
630   description: KIE administrator username
631   name: KIE_ADMIN_USER
632   value: adminUser
633   required: false
634 - displayName: KIE Admin Password
635   description: KIE administrator password
636   name: KIE_ADMIN_PWD
637   from: "[a-zA-Z]{6}[0-9]{1}!"
638   generate: expression
639   required: false
640 - displayName: KIE Server Controller User
641   description: KIE server controller username (Sets the org.kie.server.controller.user system property)
642   name: KIE_SERVER_CONTROLLER_USER
643   value: controllerUser
644   required: false
645 - displayName: KIE Server Controller Password
646   description: KIE server controller password (Sets the org.kie.server.controller.pwd system property)
647   name: KIE_SERVER_CONTROLLER_PWD
648   from: "[a-zA-Z]{6}[0-9]{1}!"
649   generate: expression
650   required: false
651 - displayName: KIE Server User
652   description: KIE execution server username (Sets the org.kie.server.user system property)
653   name: KIE_SERVER_USER
654   value: executionUser
655   required: false
656 - displayName: KIE Server Password
657   description: KIE execution server password (Sets the org.kie.server.pwd system property)
658   name: KIE_SERVER_PWD
659   from: "[a-zA-Z]{6}[0-9]{1}!"
660   generate: expression
661   required: false
662 - displayName: KIE Server Bypass Auth User
663   description: KIE execution server bypass auth user (Sets the org.kie.server.bypass.auth.user system property)
664   name: KIE_SERVER_BYPASS_AUTH_USER
665   value: 'false'
666   required: false
667 - displayName: KIE MBeans
668   description: KIE execution server mbeans enabled/disabled (Sets the kie.mbeans and kie.scanner.mbeans system properties)
669   name: KIE_MBEANS
670   value: enabled
671   required: false
672 - displayName: Drools Server Filter Classes
673   description: KIE execution server class filtering (Sets the org.drools.server.filter.classes system property)
674   name: DROOLS_SERVER_FILTER_CLASSES
675   value: 'true'
676   required: false
677 - displayName: Decision Central Custom http Route Hostname
678   description: 'Custom hostname for http service route.  Leave blank for default hostname,
679     e.g.: <application-name>-rhdmcentr-<project>.<default-domain-suffix>'
680   name: DECISION_CENTRAL_HOSTNAME_HTTP
681   value: ''
682   required: false
683 - displayName: Decision Central Custom https Route Hostname
684   description: 'Custom hostname for https service route.  Leave blank for default
685     hostname, e.g.: secure-<application-name>-rhdmcentr-<project>.<default-domain-suffix>'
686   name: DECISION_CENTRAL_HOSTNAME_HTTPS
687   value: ''
688   required: false
689 - displayName: Execution Server Custom http Route Hostname
690   description: 'Custom hostname for http service route.  Leave blank for default hostname,
691     e.g.: <application-name>-kieserver-<project>.<default-domain-suffix>'
692   name: EXECUTION_SERVER_HOSTNAME_HTTP
693   value: ''
694   required: false
695 - displayName: Execution Server Custom https Route Hostname
696   description: 'Custom hostname for https service route.  Leave blank for default
697     hostname, e.g.: secure-<application-name>-kieserver-<project>.<default-domain-suffix>'
698   name: EXECUTION_SERVER_HOSTNAME_HTTPS
699   value: ''
700   required: false
701 - displayName: Decision Central Server Keystore Secret Name
702   description: The name of the secret containing the keystore file
703   name: DECISION_CENTRAL_HTTPS_SECRET
704   value: decisioncentral-app-secret
705   required: false
706 - displayName: Decision Central Server Keystore Filename
707   description: The name of the keystore file within the secret
708   name: DECISION_CENTRAL_HTTPS_KEYSTORE
709   value: keystore.jks
710   required: false
711 - displayName: Decision Central Server Certificate Name
712   description: The name associated with the server certificate
713   name: DECISION_CENTRAL_HTTPS_NAME
714   value: jboss
715   required: false
716 - displayName: Decision Central Server Keystore Password
717   description: The password for the keystore and certificate
718   name: DECISION_CENTRAL_HTTPS_PASSWORD
719   value: mykeystorepass
720   required: false
721 - displayName: KIE Server Keystore Secret Name
722   description: The name of the secret containing the keystore file
723   name: KIE_SERVER_HTTPS_SECRET
724   value: kieserver-app-secret
725   required: false
726 - displayName: KIE Server Keystore Filename
727   description: The name of the keystore file within the secret
728   name: KIE_SERVER_HTTPS_KEYSTORE
729   value: keystore.jks
730   required: false
731 - displayName: KIE Server Certificate Name
732   description: The name associated with the server certificate
733   name: KIE_SERVER_HTTPS_NAME
734   value: jboss
735   required: false
736 - displayName: KIE Server Keystore Password
737   description: The password for the keystore and certificate
738   name: KIE_SERVER_HTTPS_PASSWORD
739   value: mykeystorepass
740   required: false
741 - displayName: RHT ImageStream Namespace
742   description: Namespace in which the ImageStreams for Red Hat Middleware images are
743     installed. These ImageStreams are normally installed in the openshift namespace.
744     You should only need to modify this if you've installed the ImageStreams in a
745     different namespace/project.
746   name: RHT_IMAGE_STREAM_NAMESPACE
747   value: openshift
748   required: true
749 - displayName: GPTE ImageStream Namespace
750   description: Namespace in which the ImageStreams for RHT GPTE images are installed.
751   name: GPTE_IMAGE_STREAM_NAMESPACE
752   value: openshift
753   required: true
754 - displayName: Maven repository URL
755   description: Fully qualified URL to a Maven repository. If unspecified, will fall back to Decision Central service.
756   name: MAVEN_REPO_URL
757   required: false
758 - displayName: Maven repository username
759   description: Username to access the Maven repository. If using Decision Central, will have to match KIE_ADMIN_USER.
760     Default is "adminUser".
761   name: MAVEN_REPO_USERNAME
762   value: adminUser
763   required: false
764 - displayName: Maven repository password
765   description: Password to access the Maven repository. If using Decision Central, will have to match KIE_ADMIN_PWD.
766     No default specified.
767   name: MAVEN_REPO_PASSWORD
768   required: false
769 - displayName: Decision Central Volume Capacity
770   description: Size of the persistent storage for Decision Central's runtime data.
771   name: DECISION_CENTRAL_VOLUME_CAPACITY
772   value: 512Mi
773   required: true
774 # dtorresf: These parameters enable the setup of project and cluster properties for the angular2
775 - displayName: Project name
776   name: PROJECT
777   required: true
778   value: dm-dtf
779 - displayName: Cluster name
780   name: CLUSTER
781   value: apps.dev37.openshift.opentlc.com
782   required: true