rhdm70-full.yaml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. ---
  2. kind: Template
  3. apiVersion: v1
  4. metadata:
  5. annotations:
  6. description: Application template for Red Hat Decision Manager 7.0 applications with persistent storage.
  7. iconClass: icon-decisionserver
  8. tags: rhdm,jboss,xpaas
  9. version: 1.4.8
  10. openshift.io/display-name: Red Hat Decision Manager 7.0 applications (Persistent with https)
  11. name: rhdm70-full-persistent
  12. labels:
  13. template: rhdm70-full-persistent
  14. xpaas: 1.4.8
  15. message: A new persistent Decision Manager applications have been created in your project.
  16. The username/password for accessing the KIE Server / Decision Central interface is ${KIE_ADMIN_USER}/${KIE_ADMIN_PWD}.
  17. Please be sure to create the "decisioncentral-service-account" and "kieserver-service-account" service accounts
  18. and the secrets named "${DECISION_CENTRAL_HTTPS_SECRET}" and "${KIE_SERVER_HTTPS_SECRET}" containing the
  19. ${DECISION_CENTRAL_HTTPS_KEYSTORE} and ${KIE_SERVER_HTTPS_KEYSTORE}files used for serving secure content.
  20. parameters:
  21. - displayName: Application Name
  22. description: The name for the application.
  23. name: APPLICATION_NAME
  24. value: myapp
  25. required: true
  26. - displayName: EAP Admin User
  27. description: EAP administrator username
  28. name: ADMIN_USERNAME
  29. value: eapadmin
  30. required: false
  31. - displayName: EAP Admin Password
  32. description: EAP administrator password
  33. name: ADMIN_PASSWORD
  34. from: "[a-zA-Z]{6}[0-9]{1}!"
  35. generate: expression
  36. required: false
  37. - displayName: KIE Admin User
  38. description: KIE administrator username
  39. name: KIE_ADMIN_USER
  40. value: adminUser
  41. required: false
  42. - displayName: KIE Admin Password
  43. description: KIE administrator password
  44. name: KIE_ADMIN_PWD
  45. from: "[a-zA-Z]{6}[0-9]{1}!"
  46. generate: expression
  47. required: false
  48. - displayName: KIE Server Controller User
  49. description: KIE server controller username (Sets the org.kie.server.controller.user system property)
  50. name: KIE_SERVER_CONTROLLER_USER
  51. value: controllerUser
  52. required: false
  53. - displayName: KIE Server Controller Password
  54. description: KIE server controller password (Sets the org.kie.server.controller.pwd system property)
  55. name: KIE_SERVER_CONTROLLER_PWD
  56. from: "[a-zA-Z]{6}[0-9]{1}!"
  57. generate: expression
  58. required: false
  59. - displayName: KIE Server User
  60. description: KIE execution server username (Sets the org.kie.server.user system property)
  61. name: KIE_SERVER_USER
  62. value: executionUser
  63. required: false
  64. - displayName: KIE Server Password
  65. description: KIE execution server password (Sets the org.kie.server.pwd system property)
  66. name: KIE_SERVER_PWD
  67. from: "[a-zA-Z]{6}[0-9]{1}!"
  68. generate: expression
  69. required: false
  70. - displayName: KIE Server ID
  71. description: Decision server identifier. Determines the template ID in Decision Central or controller. If this parameter is left blank, it is set using the $HOSTNAME environment variable or a random value. (Sets the org.kie.server.id system property).
  72. name: KIE_SERVER_ID
  73. value: ''
  74. required: false
  75. - displayName: KIE Server Bypass Auth User
  76. description: KIE execution server bypass auth user (Sets the org.kie.server.bypass.auth.user system property)
  77. name: KIE_SERVER_BYPASS_AUTH_USER
  78. value: 'false'
  79. required: false
  80. - displayName: KIE MBeans
  81. description: KIE execution server mbeans enabled/disabled (Sets the kie.mbeans and kie.scanner.mbeans system properties)
  82. name: KIE_MBEANS
  83. value: enabled
  84. required: false
  85. - displayName: Drools Server Filter Classes
  86. description: KIE execution server class filtering (Sets the org.drools.server.filter.classes system property)
  87. name: DROOLS_SERVER_FILTER_CLASSES
  88. value: 'true'
  89. required: false
  90. - displayName: Decision Central Custom http Route Hostname
  91. description: 'Custom hostname for http service route. Leave blank for default hostname,
  92. e.g.: <application-name>-rhdmcentr-<project>.<default-domain-suffix>'
  93. name: DECISION_CENTRAL_HOSTNAME_HTTP
  94. value: ''
  95. required: false
  96. - displayName: Decision Central Custom https Route Hostname
  97. description: 'Custom hostname for https service route. Leave blank for default
  98. hostname, e.g.: secure-<application-name>-rhdmcentr-<project>.<default-domain-suffix>'
  99. name: DECISION_CENTRAL_HOSTNAME_HTTPS
  100. value: ''
  101. required: false
  102. - displayName: Execution Server Custom http Route Hostname
  103. description: 'Custom hostname for http service route. Leave blank for default hostname,
  104. e.g.: <application-name>-kieserver-<project>.<default-domain-suffix>'
  105. name: EXECUTION_SERVER_HOSTNAME_HTTP
  106. value: ''
  107. required: false
  108. - displayName: Execution Server Custom https Route Hostname
  109. description: 'Custom hostname for https service route. Leave blank for default
  110. hostname, e.g.: secure-<application-name>-kieserver-<project>.<default-domain-suffix>'
  111. name: EXECUTION_SERVER_HOSTNAME_HTTPS
  112. value: ''
  113. required: false
  114. - displayName: Decision Central Server Keystore Secret Name
  115. description: The name of the secret containing the keystore file
  116. name: DECISION_CENTRAL_HTTPS_SECRET
  117. value: decisioncentral-app-secret
  118. required: false
  119. - displayName: Decision Central Server Keystore Filename
  120. description: The name of the keystore file within the secret
  121. name: DECISION_CENTRAL_HTTPS_KEYSTORE
  122. value: keystore.jks
  123. required: false
  124. - displayName: Decision Central Server Certificate Name
  125. description: The name associated with the server certificate
  126. name: DECISION_CENTRAL_HTTPS_NAME
  127. value: jboss
  128. required: false
  129. - displayName: Decision Central Server Keystore Password
  130. description: The password for the keystore and certificate
  131. name: DECISION_CENTRAL_HTTPS_PASSWORD
  132. value: mykeystorepass
  133. required: false
  134. - displayName: KIE Server Keystore Secret Name
  135. description: The name of the secret containing the keystore file
  136. name: KIE_SERVER_HTTPS_SECRET
  137. value: kieserver-app-secret
  138. required: false
  139. - displayName: KIE Server Keystore Filename
  140. description: The name of the keystore file within the secret
  141. name: KIE_SERVER_HTTPS_KEYSTORE
  142. value: keystore.jks
  143. required: false
  144. - displayName: KIE Server Certificate Name
  145. description: The name associated with the server certificate
  146. name: KIE_SERVER_HTTPS_NAME
  147. value: jboss
  148. required: false
  149. - displayName: KIE Server Keystore Password
  150. description: The password for the keystore and certificate
  151. name: KIE_SERVER_HTTPS_PASSWORD
  152. value: mykeystorepass
  153. required: false
  154. - displayName: ImageStream Namespace
  155. description: Namespace in which the ImageStreams for Red Hat Middleware images are
  156. installed. These ImageStreams are normally installed in the openshift namespace.
  157. You should only need to modify this if you've installed the ImageStreams in a
  158. different namespace/project.
  159. name: IMAGE_STREAM_NAMESPACE
  160. value: openshift
  161. required: true
  162. - displayName: Maven repository URL
  163. description: Fully qualified URL to a Maven repository. If unspecified, will fall back to Decision Central service.
  164. name: MAVEN_REPO_URL
  165. required: false
  166. - displayName: Maven repository username
  167. description: Username to access the Maven repository. If using Decision Central, will have to match KIE_ADMIN_USER.
  168. Default is "adminUser".
  169. name: MAVEN_REPO_USERNAME
  170. value: adminUser
  171. required: false
  172. - displayName: Maven repository password
  173. description: Password to access the Maven repository. If using Decision Central, will have to match KIE_ADMIN_PWD.
  174. No default specified.
  175. name: MAVEN_REPO_PASSWORD
  176. required: false
  177. - displayName: Decision Central Volume Capacity
  178. description: Size of the persistent storage for Decision Central's runtime data.
  179. name: DECISION_CENTRAL_VOLUME_CAPACITY
  180. value: 512Mi
  181. required: true
  182. objects:
  183. - kind: Service
  184. apiVersion: v1
  185. spec:
  186. ports:
  187. - port: 8080
  188. targetPort: 8080
  189. selector:
  190. deploymentConfig: "${APPLICATION_NAME}-rhdmcentr"
  191. metadata:
  192. name: "${APPLICATION_NAME}-rhdmcentr"
  193. labels:
  194. application: "${APPLICATION_NAME}"
  195. annotations:
  196. description: The Decision Central web server's http port.
  197. - kind: Service
  198. apiVersion: v1
  199. spec:
  200. ports:
  201. - port: 8443
  202. targetPort: 8443
  203. selector:
  204. deploymentConfig: "${APPLICATION_NAME}-rhdmcentr"
  205. metadata:
  206. name: secure-${APPLICATION_NAME}-rhdmcentr
  207. labels:
  208. application: "${APPLICATION_NAME}"
  209. annotations:
  210. description: The Decision Central web server's https port.
  211. - kind: Service
  212. apiVersion: v1
  213. spec:
  214. ports:
  215. - port: 8080
  216. targetPort: 8080
  217. selector:
  218. deploymentConfig: "${APPLICATION_NAME}-kieserver"
  219. metadata:
  220. name: "${APPLICATION_NAME}-kieserver"
  221. labels:
  222. application: "${APPLICATION_NAME}"
  223. annotations:
  224. description: The KIE server web server's http port.
  225. - kind: Service
  226. apiVersion: v1
  227. spec:
  228. ports:
  229. - port: 8443
  230. targetPort: 8443
  231. selector:
  232. deploymentConfig: "${APPLICATION_NAME}-kieserver"
  233. metadata:
  234. name: secure-${APPLICATION_NAME}-kieserver
  235. labels:
  236. application: "${APPLICATION_NAME}"
  237. annotations:
  238. description: The KIE server web server's https port.
  239. - kind: Route
  240. apiVersion: v1
  241. id: "${APPLICATION_NAME}-rhdmcentr-http"
  242. metadata:
  243. name: "${APPLICATION_NAME}-rhdmcentr"
  244. labels:
  245. application: "${APPLICATION_NAME}"
  246. annotations:
  247. description: Route for Decision Central's http service.
  248. spec:
  249. host: "${DECISION_CENTRAL_HOSTNAME_HTTP}"
  250. to:
  251. name: "${APPLICATION_NAME}-rhdmcentr"
  252. - kind: Route
  253. apiVersion: v1
  254. id: "${APPLICATION_NAME}-rhdmcentr-https"
  255. metadata:
  256. name: secure-${APPLICATION_NAME}-rhdmcentr
  257. labels:
  258. application: "${APPLICATION_NAME}"
  259. annotations:
  260. description: Route for Decision Central's https service.
  261. spec:
  262. host: "${DECISION_CENTRAL_HOSTNAME_HTTPS}"
  263. to:
  264. name: secure-${APPLICATION_NAME}-rhdmcentr
  265. tls:
  266. termination: passthrough
  267. - kind: Route
  268. apiVersion: v1
  269. id: "${APPLICATION_NAME}-kieserver-http"
  270. metadata:
  271. name: "${APPLICATION_NAME}-kieserver"
  272. labels:
  273. application: "${APPLICATION_NAME}"
  274. annotations:
  275. description: Route for KIE server's http service.
  276. spec:
  277. host: "${EXECUTION_SERVER_HOSTNAME_HTTP}"
  278. to:
  279. name: "${APPLICATION_NAME}-kieserver"
  280. - kind: Route
  281. apiVersion: v1
  282. id: "${APPLICATION_NAME}-kieserver-https"
  283. metadata:
  284. name: secure-${APPLICATION_NAME}-kieserver
  285. labels:
  286. application: "${APPLICATION_NAME}"
  287. annotations:
  288. description: Route for KIE server's https service.
  289. spec:
  290. host: "${EXECUTION_SERVER_HOSTNAME_HTTPS}"
  291. to:
  292. name: secure-${APPLICATION_NAME}-kieserver
  293. tls:
  294. termination: passthrough
  295. - kind: DeploymentConfig
  296. apiVersion: v1
  297. metadata:
  298. name: "${APPLICATION_NAME}-rhdmcentr"
  299. labels:
  300. application: "${APPLICATION_NAME}"
  301. spec:
  302. strategy:
  303. type: Recreate
  304. triggers:
  305. - type: ImageChange
  306. imageChangeParams:
  307. automatic: true
  308. containerNames:
  309. - "${APPLICATION_NAME}-rhdmcentr"
  310. from:
  311. kind: ImageStreamTag
  312. namespace: "${IMAGE_STREAM_NAMESPACE}"
  313. name: rhdm70-decisioncentral-openshift:1.0
  314. - type: ConfigChange
  315. replicas: 1
  316. selector:
  317. deploymentConfig: "${APPLICATION_NAME}-rhdmcentr"
  318. template:
  319. metadata:
  320. name: "${APPLICATION_NAME}-rhdmcentr"
  321. labels:
  322. deploymentConfig: "${APPLICATION_NAME}-rhdmcentr"
  323. application: "${APPLICATION_NAME}"
  324. spec:
  325. serviceAccountName: decisioncentral-service-account
  326. terminationGracePeriodSeconds: 60
  327. containers:
  328. - name: "${APPLICATION_NAME}-rhdmcentr"
  329. image: rhdm70-decisioncentral-openshift
  330. imagePullPolicy: Always
  331. volumeMounts:
  332. - name: decisioncentral-keystore-volume
  333. mountPath: "/etc/decisioncentral-secret-volume"
  334. readOnly: true
  335. - name: "${APPLICATION_NAME}-rhdmcentr-pvol"
  336. mountPath: "/opt/eap/standalone/data/bpmsuite"
  337. livenessProbe:
  338. exec:
  339. command:
  340. - "/bin/bash"
  341. - "-c"
  342. - "/opt/eap/bin/livenessProbe.sh"
  343. readinessProbe:
  344. exec:
  345. command:
  346. - "/bin/bash"
  347. - "-c"
  348. - "/opt/eap/bin/readinessProbe.sh"
  349. ports:
  350. - name: jolokia
  351. containerPort: 8778
  352. protocol: TCP
  353. - name: http
  354. containerPort: 8080
  355. protocol: TCP
  356. - name: https
  357. containerPort: 8443
  358. protocol: TCP
  359. env:
  360. - name: KIE_ADMIN_PWD
  361. value: "${KIE_ADMIN_PWD}"
  362. - name: KIE_ADMIN_USER
  363. value: "${KIE_ADMIN_USER}"
  364. - name: KIE_MBEANS
  365. value: "${KIE_MBEANS}"
  366. - name: KIE_SERVER_CONTROLLER_PWD
  367. value: "${KIE_SERVER_CONTROLLER_PWD}"
  368. - name: KIE_SERVER_CONTROLLER_USER
  369. value: "${KIE_SERVER_CONTROLLER_USER}"
  370. - name: KIE_SERVER_PWD
  371. value: "${KIE_SERVER_PWD}"
  372. - name: KIE_SERVER_USER
  373. value: "${KIE_SERVER_USER}"
  374. - name: HTTPS_KEYSTORE_DIR
  375. value: "/etc/decisioncentral-secret-volume"
  376. - name: HTTPS_KEYSTORE
  377. value: "${DECISION_CENTRAL_HTTPS_KEYSTORE}"
  378. - name: HTTPS_NAME
  379. value: "${DECISION_CENTRAL_HTTPS_NAME}"
  380. - name: HTTPS_PASSWORD
  381. value: "${DECISION_CENTRAL_HTTPS_PASSWORD}"
  382. - name: ADMIN_USERNAME
  383. value: "${ADMIN_USERNAME}"
  384. - name: ADMIN_PASSWORD
  385. value: "${ADMIN_PASSWORD}"
  386. - name: PROBE_IMPL
  387. value: probe.eap.jolokia.EapProbe
  388. - name: PROBE_DISABLE_BOOT_ERRORS_CHECK
  389. value: 'true'
  390. volumes:
  391. - name: decisioncentral-keystore-volume
  392. secret:
  393. secretName: "${DECISION_CENTRAL_HTTPS_SECRET}"
  394. - name: "${APPLICATION_NAME}-rhdmcentr-pvol"
  395. persistentVolumeClaim:
  396. claimName: "${APPLICATION_NAME}-rhdmcentr-claim"
  397. - kind: DeploymentConfig
  398. apiVersion: v1
  399. metadata:
  400. name: "${APPLICATION_NAME}-kieserver"
  401. labels:
  402. application: "${APPLICATION_NAME}"
  403. spec:
  404. strategy:
  405. type: Recreate
  406. triggers:
  407. - type: ImageChange
  408. imageChangeParams:
  409. automatic: true
  410. containerNames:
  411. - "${APPLICATION_NAME}-kieserver"
  412. from:
  413. kind: ImageStreamTag
  414. namespace: "${IMAGE_STREAM_NAMESPACE}"
  415. name: rhdm70-kieserver-openshift:1.0
  416. - type: ConfigChange
  417. replicas: 1
  418. selector:
  419. deploymentConfig: "${APPLICATION_NAME}-kieserver"
  420. template:
  421. metadata:
  422. name: "${APPLICATION_NAME}-kieserver"
  423. labels:
  424. deploymentConfig: "${APPLICATION_NAME}-kieserver"
  425. application: "${APPLICATION_NAME}"
  426. spec:
  427. serviceAccountName: kieserver-service-account
  428. terminationGracePeriodSeconds: 60
  429. containers:
  430. - name: "${APPLICATION_NAME}-kieserver"
  431. image: rhdm70-kieserver-openshift
  432. imagePullPolicy: Always
  433. volumeMounts:
  434. - name: kieserver-keystore-volume
  435. mountPath: "/etc/kieserver-secret-volume"
  436. readOnly: true
  437. livenessProbe:
  438. exec:
  439. command:
  440. - "/bin/bash"
  441. - "-c"
  442. - "/opt/eap/bin/livenessProbe.sh"
  443. readinessProbe:
  444. exec:
  445. command:
  446. - "/bin/bash"
  447. - "-c"
  448. - "/opt/eap/bin/readinessProbe.sh"
  449. ports:
  450. - name: jolokia
  451. containerPort: 8778
  452. protocol: TCP
  453. - name: http
  454. containerPort: 8080
  455. protocol: TCP
  456. - name: https
  457. containerPort: 8443
  458. protocol: TCP
  459. env:
  460. - name: DROOLS_SERVER_FILTER_CLASSES
  461. value: "${DROOLS_SERVER_FILTER_CLASSES}"
  462. - name: KIE_ADMIN_PWD
  463. value: "${KIE_ADMIN_PWD}"
  464. - name: KIE_ADMIN_USER
  465. value: "${KIE_ADMIN_USER}"
  466. - name: KIE_MBEANS
  467. value: "${KIE_MBEANS}"
  468. - name: KIE_SERVER_BYPASS_AUTH_USER
  469. value: "${KIE_SERVER_BYPASS_AUTH_USER}"
  470. - name: KIE_SERVER_CONTROLLER_PWD
  471. value: "${KIE_SERVER_CONTROLLER_PWD}"
  472. - name: KIE_SERVER_CONTROLLER_SERVICE
  473. value: "${APPLICATION_NAME}-rhdmcentr"
  474. - name: KIE_SERVER_CONTROLLER_USER
  475. value: "${KIE_SERVER_CONTROLLER_USER}"
  476. - name: KIE_SERVER_ID
  477. value: "${KIE_SERVER_ID}"
  478. - name: KIE_SERVER_HOST
  479. valueFrom:
  480. fieldRef:
  481. fieldPath: status.podIP
  482. - name: KIE_SERVER_PWD
  483. value: "${KIE_SERVER_PWD}"
  484. - name: KIE_SERVER_USER
  485. value: "${KIE_SERVER_USER}"
  486. - name: MAVEN_REPO_URL
  487. value: "${MAVEN_REPO_URL}"
  488. - name: MAVEN_REPO_SERVICE
  489. value: "${APPLICATION_NAME}-rhdmcentr"
  490. - name: MAVEN_REPO_PATH
  491. value: "/maven2/"
  492. - name: MAVEN_REPO_USERNAME
  493. value: "${MAVEN_REPO_USERNAME}"
  494. - name: MAVEN_REPO_PASSWORD
  495. value: "${MAVEN_REPO_PASSWORD}"
  496. - name: HTTPS_KEYSTORE_DIR
  497. value: "/etc/kieserver-secret-volume"
  498. - name: HTTPS_KEYSTORE
  499. value: "${KIE_SERVER_HTTPS_KEYSTORE}"
  500. - name: HTTPS_NAME
  501. value: "${KIE_SERVER_HTTPS_NAME}"
  502. - name: HTTPS_PASSWORD
  503. value: "${KIE_SERVER_HTTPS_PASSWORD}"
  504. volumes:
  505. - name: kieserver-keystore-volume
  506. secret:
  507. secretName: "${KIE_SERVER_HTTPS_SECRET}"
  508. - apiVersion: v1
  509. kind: PersistentVolumeClaim
  510. metadata:
  511. name: "${APPLICATION_NAME}-rhdmcentr-claim"
  512. labels:
  513. application: "${APPLICATION_NAME}"
  514. spec:
  515. accessModes:
  516. - ReadWriteOnce
  517. resources:
  518. requests:
  519. storage: "${DECISION_CENTRAL_VOLUME_CAPACITY}"