rhpam70-kieserver-externaldb.yaml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. ---
  2. kind: Template
  3. apiVersion: v1
  4. metadata:
  5. annotations:
  6. description: Application template for a managed KIE server with an external database, for Red Hat Process Automation Manager 7.0
  7. iconClass: icon-jboss
  8. tags: rhpam,jboss,xpaas
  9. version: 1.4.0
  10. openshift.io/display-name: Red Hat Process Automation Manager 7.0 managed KIE server with an external database
  11. name: rhpam70-kieserver-externaldb
  12. labels:
  13. template: rhpam70-kieserver-externaldb
  14. xpaas: 1.4.0
  15. message: A new environment has been set up for Red Hat Process Automation Manager 7. The username/password for accessing the KIE server is ${KIE_SERVER_USER}/${KIE_SERVER_PWD}.
  16. parameters:
  17. - displayName: Application Name
  18. description: The name for the application.
  19. name: APPLICATION_NAME
  20. value: myapp
  21. required: true
  22. - displayName: Maven repository URL
  23. description: Fully qualified URL to a Maven repository or service.
  24. name: MAVEN_REPO_URL
  25. example: http://nexus.nexus-project.svc.cluster.local:8081/nexus/content/groups/public/
  26. required: true
  27. - displayName: Maven repository username
  28. description: Username to access the Maven repository, if required.
  29. name: MAVEN_REPO_USERNAME
  30. required: false
  31. - displayName: Maven repository password
  32. description: Password to access the Maven repository, if required.
  33. name: MAVEN_REPO_PASSWORD
  34. required: false
  35. - displayName: EAP Admin User
  36. description: EAP administrator username
  37. name: ADMIN_USERNAME
  38. value: eapadmin
  39. required: false
  40. - displayName: EAP Admin Password
  41. description: EAP administrator password
  42. name: ADMIN_PASSWORD
  43. from: "[a-zA-Z]{6}[0-9]{1}!"
  44. generate: expression
  45. required: false
  46. - displayName: KIE Admin User
  47. description: KIE administrator username
  48. name: KIE_ADMIN_USER
  49. value: adminUser
  50. required: false
  51. - displayName: KIE Admin Password
  52. description: KIE administrator password
  53. name: KIE_ADMIN_PWD
  54. from: "[a-zA-Z]{6}[0-9]{1}!"
  55. generate: expression
  56. required: false
  57. - displayName: KIE Server ID
  58. description: The KIE server ID to use, which defaults to ${APPLICATION_NAME}-kieserver if not specified (Sets the org.kie.server.id system property).
  59. name: KIE_SERVER_ID
  60. required: false
  61. - displayName: KIE Server User
  62. description: KIE execution server username (Sets the org.kie.server.user system property)
  63. name: KIE_SERVER_USER
  64. value: executionUser
  65. required: false
  66. - displayName: KIE Server Password
  67. description: KIE execution server password (Sets the org.kie.server.pwd system property)
  68. name: KIE_SERVER_PWD
  69. from: "[a-zA-Z]{6}[0-9]{1}!"
  70. generate: expression
  71. required: false
  72. - displayName: ImageStream Namespace
  73. description: Namespace in which the ImageStreams for Red Hat Middleware images are
  74. installed. These ImageStreams are normally installed in the openshift namespace.
  75. You should only need to modify this if you've installed the ImageStreams in a
  76. different namespace/project.
  77. name: IMAGE_STREAM_NAMESPACE
  78. value: openshift
  79. required: true
  80. - displayName: ImageStream Tag
  81. description: A named pointer to an image in an image stream. Default is "1.0".
  82. name: IMAGE_STREAM_TAG
  83. value: "1.0"
  84. required: false
  85. - displayName: Smart Router Service
  86. description: The service name for the optional smart router, where it can be reached, to allow smart routing
  87. name: KIE_SERVER_ROUTER_SERVICE
  88. required: false
  89. - displayName: Smart Router Host
  90. description: "The host name of the smart router, which could be the service name resolved by OpenShift or a globally resolvable domain name"
  91. name: KIE_SERVER_ROUTER_HOST
  92. example: "myapp-smartrouter"
  93. required: false
  94. - displayName: Smart Router listening port
  95. description: Port in which the smart router server listens (router property org.kie.server.router.port)
  96. name: KIE_SERVER_ROUTER_PORT
  97. example: "9000"
  98. required: false
  99. - displayName: Smart Router protocol
  100. description: KIE server router protocol (Used to build the org.kie.server.router.url.external property)
  101. name: KIE_SERVER_ROUTER_PROTOCOL
  102. example: "http"
  103. required: false
  104. - displayName: KIE Server Controller Service
  105. description: The service name for the optional business-central-monitor, where it can be reached and registered with, to allow monitoring console functionality
  106. name: KIE_SERVER_CONTROLLER_SERVICE
  107. required: false
  108. - displayName: KIE Server Controller User
  109. description: KIE server controller username (Sets the org.kie.server.controller.user system property)
  110. name: KIE_SERVER_CONTROLLER_USER
  111. value: controllerUser
  112. required: false
  113. - displayName: KIE Server Controller Password
  114. description: KIE server controller password (Sets the org.kie.server.controller.pwd system property)
  115. name: KIE_SERVER_CONTROLLER_PWD
  116. required: false
  117. - displayName: KIE server controller host
  118. description: KIE server controller host (Used to set the org.kie.server.controller system property)
  119. name: KIE_SERVER_CONTROLLER_HOST
  120. example: my-app-controller-ocpuser.os.example.com
  121. required: false
  122. - displayName: KIE server controller port
  123. description: KIE server controller port (Used to set the org.kie.server.controller system property)
  124. name: KIE_SERVER_CONTROLLER_PORT
  125. example: '8080'
  126. required: false
  127. - displayName: KIE server controller protocol
  128. description: KIE server controller protocol (Used to set the org.kie.server.controller system property)
  129. name: KIE_SERVER_CONTROLLER_PROTOCOL
  130. example: http
  131. required: false
  132. - displayName: KIE Server controller token
  133. description: KIE server controller token for bearer authentication (Sets the org.kie.server.controller.token system property)
  134. name: KIE_SERVER_CONTROLLER_TOKEN
  135. required: false
  136. - displayName: KIE Server Persistence DS
  137. description: KIE execution server persistence datasource (Sets the org.kie.server.persistence.ds system property)
  138. name: KIE_SERVER_PERSISTENCE_DS
  139. value: java:/jboss/datasources/rhpam
  140. required: false
  141. ## External database parameters BEGIN
  142. - displayName: KIE Server External Database Driver
  143. description: KIE execution server external database driver
  144. name: KIE_SERVER_EXTERNALDB_DRIVER
  145. example: "mysql"
  146. required: true
  147. - displayName: KIE Server External Database User
  148. description: KIE execution server external database username
  149. name: KIE_SERVER_EXTERNALDB_USER
  150. example: rhpam
  151. required: true
  152. - displayName: KIE Server External Database Password
  153. description: KIE execution server external database password
  154. name: KIE_SERVER_EXTERNALDB_PWD
  155. required: true
  156. - displayName: KIE Server External Database URL
  157. description: KIE execution server external database JDBC URL
  158. name: KIE_SERVER_EXTERNALDB_URL
  159. example: "jdbc:mysql://127.0.0.1:3306/rhpam"
  160. required: true
  161. - displayName: KIE Server External Database Dialect
  162. description: KIE execution server external database Hibernate dialect
  163. name: KIE_SERVER_EXTERNALDB_DIALECT
  164. example: "org.hibernate.dialect.MySQL5Dialect"
  165. required: true
  166. - displayName: KIE Server External Database Host
  167. description: KIE execution server external database host, for ejb_timer datasource configuration
  168. name: KIE_SERVER_EXTERNALDB_HOST
  169. required: true
  170. - displayName: KIE Server External Database name
  171. description: KIE execution server external database name, for ejb_timer datasource configuration
  172. name: KIE_SERVER_EXTERNALDB_DB
  173. value: rhpam
  174. required: false
  175. ## External database parameters END
  176. - displayName: Drools Server Filter Classes
  177. description: KIE execution server class filtering (Sets the org.drools.server.filter.classes system property)
  178. name: DROOLS_SERVER_FILTER_CLASSES
  179. value: 'true'
  180. required: false
  181. - displayName: KIE MBeans
  182. description: KIE execution server mbeans enabled/disabled (Sets the kie.mbeans and kie.scanner.mbeans system properties)
  183. name: KIE_MBEANS
  184. value: enabled
  185. required: false
  186. - displayName: Execution Server Custom http Route Hostname
  187. description: 'Custom hostname for http service route. Leave blank for default hostname,
  188. e.g.: <application-name>-kieserver-<project>.<default-domain-suffix>'
  189. name: EXECUTION_SERVER_HOSTNAME_HTTP
  190. value: ''
  191. required: false
  192. - displayName: Execution Server Custom https Route Hostname
  193. description: 'Custom hostname for https service route. Leave blank for default
  194. hostname, e.g.: secure-<application-name>-kieserver-<project>.<default-domain-suffix>'
  195. name: EXECUTION_SERVER_HOSTNAME_HTTPS
  196. value: ''
  197. required: false
  198. - displayName: KIE Server Keystore Secret Name
  199. description: The name of the secret containing the keystore file
  200. name: KIE_SERVER_HTTPS_SECRET
  201. example: kieserver-app-secret
  202. required: true
  203. - displayName: KIE Server Keystore Filename
  204. description: The name of the keystore file within the secret
  205. name: KIE_SERVER_HTTPS_KEYSTORE
  206. value: keystore.jks
  207. required: false
  208. - displayName: KIE Server Certificate Name
  209. description: The name associated with the server certificate
  210. name: KIE_SERVER_HTTPS_NAME
  211. value: jboss
  212. required: false
  213. - displayName: KIE Server Keystore Password
  214. description: The password for the keystore and certificate
  215. name: KIE_SERVER_HTTPS_PASSWORD
  216. value: mykeystorepass
  217. required: false
  218. - displayName: KIE Server Bypass Auth User
  219. description: KIE execution server bypass auth user (Sets the org.kie.server.bypass.auth.user system property)
  220. name: KIE_SERVER_BYPASS_AUTH_USER
  221. value: 'false'
  222. required: false
  223. - displayName: "Timer service data store refresh interval (in milliseconds)"
  224. description: "Sets refresh-interval for the EJB timer database data-store service."
  225. name: TIMER_SERVICE_DATA_STORE_REFRESH_INTERVAL
  226. value: '30000'
  227. required: false
  228. - displayName: Execution Server Container Memory Limit
  229. description: Execution Server Container memory limit
  230. name: EXECUTION_SERVER_MEMORY_LIMIT
  231. value: 1Gi
  232. required: false
  233. - displayName: KIE Server Container Deployment
  234. description: 'KIE Server Container deployment configuration in format: containerId=groupId:artifactId:version|c2=g2:a2:v2'
  235. name: KIE_SERVER_CONTAINER_DEPLOYMENT
  236. example: rhpam-kieserver-library=org.openshift.quickstarts:rhpam-kieserver-library:1.4.0-SNAPSHOT
  237. required: false
  238. - displayName: Disable KIE Server Management
  239. description: "Disable management api and don't allow KIE containers to be deployed/undeployed or started/stopped sets the property org.kie.server.mgmt.api.disabled to true and org.kie.server.startup.strategy to LocalContainersStartupStrategy."
  240. name: KIE_SERVER_MGMT_DISABLED
  241. example: "true"
  242. required: false
  243. - displayName: KIE Server Startup Strategy
  244. description: "When set to LocalContainersStartupStrategy, allows KIE server to start up and function with local config, even when a controller is configured and unavailable."
  245. name: KIE_SERVER_STARTUP_STRATEGY
  246. example: "LocalContainersStartupStrategy"
  247. required: false
  248. objects:
  249. - kind: Service
  250. apiVersion: v1
  251. spec:
  252. ports:
  253. - name: http
  254. port: 8080
  255. targetPort: 8080
  256. - name: https
  257. port: 8443
  258. targetPort: 8443
  259. selector:
  260. deploymentConfig: "${APPLICATION_NAME}-kieserver"
  261. metadata:
  262. name: "${APPLICATION_NAME}-kieserver"
  263. labels:
  264. application: "${APPLICATION_NAME}"
  265. service: "${APPLICATION_NAME}-kieserver"
  266. annotations:
  267. description: All the KIE server web server's ports.
  268. - kind: Service
  269. apiVersion: v1
  270. spec:
  271. clusterIP: "None"
  272. ports:
  273. - name: "ping"
  274. port: 8888
  275. selector:
  276. deploymentConfig: "${APPLICATION_NAME}-kieserver"
  277. metadata:
  278. name: "${APPLICATION_NAME}-kieserver-ping"
  279. labels:
  280. application: "${APPLICATION_NAME}"
  281. service: "${APPLICATION_NAME}-kieserver"
  282. annotations:
  283. service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
  284. description: "The JGroups ping port for clustering."
  285. - kind: Route
  286. apiVersion: v1
  287. id: "${APPLICATION_NAME}-kieserver-http"
  288. metadata:
  289. name: "${APPLICATION_NAME}-kieserver"
  290. labels:
  291. application: "${APPLICATION_NAME}"
  292. service: "${APPLICATION_NAME}-kieserver"
  293. annotations:
  294. description: Route for KIE server's http service.
  295. spec:
  296. host: "${EXECUTION_SERVER_HOSTNAME_HTTP}"
  297. to:
  298. name: "${APPLICATION_NAME}-kieserver"
  299. port:
  300. targetPort: http
  301. - kind: Route
  302. apiVersion: v1
  303. id: "${APPLICATION_NAME}-kieserver-https"
  304. metadata:
  305. name: "secure-${APPLICATION_NAME}-kieserver"
  306. labels:
  307. application: "${APPLICATION_NAME}"
  308. service: "${APPLICATION_NAME}-kieserver"
  309. annotations:
  310. description: Route for KIE server's https service.
  311. spec:
  312. host: "${EXECUTION_SERVER_HOSTNAME_HTTPS}"
  313. to:
  314. name: "${APPLICATION_NAME}-kieserver"
  315. port:
  316. targetPort: https
  317. tls:
  318. termination: passthrough
  319. - kind: DeploymentConfig
  320. apiVersion: v1
  321. metadata:
  322. name: "${APPLICATION_NAME}-kieserver"
  323. labels:
  324. application: "${APPLICATION_NAME}"
  325. service: "${APPLICATION_NAME}-kieserver"
  326. spec:
  327. strategy:
  328. type: Recreate
  329. triggers:
  330. - type: ImageChange
  331. imageChangeParams:
  332. automatic: true
  333. containerNames:
  334. - "${APPLICATION_NAME}-kieserver"
  335. from:
  336. kind: ImageStreamTag
  337. namespace: "${IMAGE_STREAM_NAMESPACE}"
  338. name: "rhpam70-kieserver-openshift:${IMAGE_STREAM_TAG}"
  339. - type: ConfigChange
  340. replicas: 1
  341. selector:
  342. deploymentConfig: "${APPLICATION_NAME}-kieserver"
  343. template:
  344. metadata:
  345. name: "${APPLICATION_NAME}-kieserver"
  346. labels:
  347. deploymentConfig: "${APPLICATION_NAME}-kieserver"
  348. application: "${APPLICATION_NAME}"
  349. service: "${APPLICATION_NAME}-kieserver"
  350. spec:
  351. terminationGracePeriodSeconds: 60
  352. containers:
  353. - name: "${APPLICATION_NAME}-kieserver"
  354. image: rhpam70-kieserver-openshift
  355. imagePullPolicy: Always
  356. resources:
  357. limits:
  358. memory: "${EXECUTION_SERVER_MEMORY_LIMIT}"
  359. volumeMounts:
  360. - name: kieserver-keystore-volume
  361. mountPath: "/etc/kieserver-secret-volume"
  362. readOnly: true
  363. livenessProbe:
  364. exec:
  365. command:
  366. - "/bin/bash"
  367. - "-c"
  368. - "curl --fail --silent -u '${KIE_ADMIN_USER}:${KIE_ADMIN_PWD}' http://localhost:8080/services/rest/server/healthcheck"
  369. initialDelaySeconds: 180
  370. timeoutSeconds: 2
  371. periodSeconds: 15
  372. failureThreshold: 3
  373. readinessProbe:
  374. exec:
  375. command:
  376. - "/bin/bash"
  377. - "-c"
  378. - "curl --fail --silent -u '${KIE_ADMIN_USER}:${KIE_ADMIN_PWD}' http://localhost:8080/services/rest/server/readycheck"
  379. initialDelaySeconds: 60
  380. timeoutSeconds: 2
  381. periodSeconds: 30
  382. failureThreshold: 6
  383. ports:
  384. - name: jolokia
  385. containerPort: 8778
  386. protocol: TCP
  387. - name: http
  388. containerPort: 8080
  389. protocol: TCP
  390. - name: https
  391. containerPort: 8443
  392. protocol: TCP
  393. - name: ping
  394. containerPort: 8888
  395. protocol: TCP
  396. env:
  397. - name: DROOLS_SERVER_FILTER_CLASSES
  398. value: "${DROOLS_SERVER_FILTER_CLASSES}"
  399. - name: KIE_ADMIN_USER
  400. value: "${KIE_ADMIN_USER}"
  401. - name: KIE_ADMIN_PWD
  402. value: "${KIE_ADMIN_PWD}"
  403. - name: KIE_MBEANS
  404. value: "${KIE_MBEANS}"
  405. - name: KIE_SERVER_BYPASS_AUTH_USER
  406. value: "${KIE_SERVER_BYPASS_AUTH_USER}"
  407. - name: KIE_SERVER_CONTROLLER_USER
  408. value: "${KIE_SERVER_CONTROLLER_USER}"
  409. - name: KIE_SERVER_CONTROLLER_PWD
  410. value: "${KIE_SERVER_CONTROLLER_PWD}"
  411. - name: KIE_SERVER_CONTROLLER_SERVICE
  412. value: "${KIE_SERVER_CONTROLLER_SERVICE}"
  413. - name: KIE_SERVER_CONTROLLER_HOST
  414. value: "${KIE_SERVER_CONTROLLER_HOST}"
  415. - name: KIE_SERVER_CONTROLLER_PORT
  416. value: "${KIE_SERVER_CONTROLLER_PORT}"
  417. - name: KIE_SERVER_CONTROLLER_PROTOCOL
  418. value: "${KIE_SERVER_CONTROLLER_PROTOCOL}"
  419. - name: KIE_SERVER_CONTROLLER_TOKEN
  420. value: "${KIE_SERVER_CONTROLLER_TOKEN}"
  421. - name: KIE_SERVER_ID
  422. value: "${KIE_SERVER_ID}"
  423. - name: KIE_SERVER_HOST
  424. valueFrom:
  425. fieldRef:
  426. fieldPath: status.podIP
  427. - name: KIE_SERVER_USER
  428. value: "${KIE_SERVER_USER}"
  429. - name: KIE_SERVER_PWD
  430. value: "${KIE_SERVER_PWD}"
  431. - name: KIE_SERVER_CONTAINER_DEPLOYMENT
  432. value: "${KIE_SERVER_CONTAINER_DEPLOYMENT}"
  433. - name: MAVEN_REPO_URL
  434. value: "${MAVEN_REPO_URL}"
  435. - name: MAVEN_REPO_USERNAME
  436. value: "${MAVEN_REPO_USERNAME}"
  437. - name: MAVEN_REPO_PASSWORD
  438. value: "${MAVEN_REPO_PASSWORD}"
  439. - name: MAVEN_REPO_PATH
  440. value: "/maven2/"
  441. - name: KIE_SERVER_ROUTER_SERVICE
  442. value: "${KIE_SERVER_ROUTER_SERVICE}"
  443. - name: KIE_SERVER_ROUTER_HOST
  444. value: "${KIE_SERVER_ROUTER_HOST}"
  445. - name: KIE_SERVER_ROUTER_PORT
  446. value: "${KIE_SERVER_ROUTER_PORT}"
  447. - name: KIE_SERVER_ROUTER_PROTOCOL
  448. value: "${KIE_SERVER_ROUTER_PROTOCOL}"
  449. - name: KIE_SERVER_MGMT_DISABLED
  450. value: "${KIE_SERVER_MGMT_DISABLED}"
  451. - name: KIE_SERVER_STARTUP_STRATEGY
  452. value: "${KIE_SERVER_STARTUP_STRATEGY}"
  453. - name: KIE_SERVER_PERSISTENCE_DS
  454. value: "${KIE_SERVER_PERSISTENCE_DS}"
  455. - name: DATASOURCES
  456. value: "RHPAM"
  457. - name: RHPAM_JNDI
  458. value: "${KIE_SERVER_PERSISTENCE_DS}"
  459. ## External database driver settings BEGIN
  460. - name: KIE_SERVER_PERSISTENCE_DIALECT
  461. value: "${KIE_SERVER_EXTERNALDB_DIALECT}"
  462. - name: RHPAM_DRIVER
  463. value: "${KIE_SERVER_EXTERNALDB_DRIVER}"
  464. - name: RHPAM_USERNAME
  465. value: "${KIE_SERVER_EXTERNALDB_USER}"
  466. - name: RHPAM_PASSWORD
  467. value: "${KIE_SERVER_EXTERNALDB_PWD}"
  468. - name: RHPAM_XA_CONNECTION_PROPERTY_URL
  469. value: "${KIE_SERVER_EXTERNALDB_URL}"
  470. - name: RHPAM_SERVICE_HOST
  471. value: "${KIE_SERVER_EXTERNALDB_HOST}"
  472. - name: RHPAM_DATABASE
  473. value: "${KIE_SERVER_EXTERNALDB_DB}"
  474. ## External database driver settings END
  475. - name: RHPAM_JTA
  476. value: "true"
  477. - name: RHPAM_TX_ISOLATION
  478. value: "TRANSACTION_READ_COMMITTED"
  479. - name: TIMER_SERVICE_DATA_STORE_REFRESH_INTERVAL
  480. value: "${TIMER_SERVICE_DATA_STORE_REFRESH_INTERVAL}"
  481. - name: HTTPS_KEYSTORE_DIR
  482. value: "/etc/kieserver-secret-volume"
  483. - name: HTTPS_KEYSTORE
  484. value: "${KIE_SERVER_HTTPS_KEYSTORE}"
  485. - name: HTTPS_NAME
  486. value: "${KIE_SERVER_HTTPS_NAME}"
  487. - name: HTTPS_PASSWORD
  488. value: "${KIE_SERVER_HTTPS_PASSWORD}"
  489. - name: ADMIN_USERNAME
  490. value: "${ADMIN_USERNAME}"
  491. - name: ADMIN_PASSWORD
  492. value: "${ADMIN_PASSWORD}"
  493. - name: JGROUPS_PING_PROTOCOL
  494. value: "openshift.DNS_PING"
  495. - name: OPENSHIFT_DNS_PING_SERVICE_NAME
  496. value: "${APPLICATION_NAME}-kieserver-ping"
  497. - name: OPENSHIFT_DNS_PING_SERVICE_PORT
  498. value: "8888"
  499. volumes:
  500. - name: kieserver-keystore-volume
  501. secret:
  502. secretName: "${KIE_SERVER_HTTPS_SECRET}"