rhdm70-kieserver-https-s2i.yaml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  1. kind: Template
  2. apiVersion: v1
  3. metadata:
  4. annotations:
  5. description: Application template for Red Hat Decision Manager Execution Server 7.0 application built using S2I.
  6. iconClass: icon-jboss
  7. tags: rhdm,jboss,xpaas
  8. version: 1.4.0
  9. openshift.io/display-name: Red Hat Decision Manager Execution Server 7.0 S2I (Ephemeral with https)
  10. name: rhdm70-kieserver-https-s2i
  11. labels:
  12. template: rhdm70-kieserver-https-s2i
  13. xpaas: 1.4.0
  14. message: A new Decision Manager Decision Server application has been created in your
  15. project. The user name/password for calls to the Decision Server is ${KIE_SERVER_USER}/${KIE_SERVER_PWD}.
  16. Please be sure to create the "kieserver-service-account" service account and
  17. the secret named "${HTTPS_SECRET}" containing the ${HTTPS_KEYSTORE} file used for
  18. serving secure content. The username/password for accessing the KIE Server REST interface is ${KIE_SERVER_USER}/${KIE_SERVER_PWD}. Only stateless API calls to the Decision Server are supported.
  19. parameters:
  20. - displayName: Application Name
  21. description: The name for the application.
  22. name: APPLICATION_NAME
  23. value: myapp
  24. required: true
  25. - displayName: EAP Admin User
  26. description: EAP administrator user name. Use this user account if you need use JBoss EAP command line management.
  27. You can use rsh to access the command line on the pods.
  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. Use this user account to manage the Decision Server using administrative
  39. API calls.
  40. name: KIE_ADMIN_USER
  41. value: adminUser
  42. required: false
  43. - displayName: KIE Admin Password
  44. description: KIE administrator password.
  45. name: KIE_ADMIN_PWD
  46. from: "[a-zA-Z]{6}[0-9]{1}!"
  47. generate: expression
  48. required: false
  49. - displayName: KIE Server User
  50. description: KIE execution server user name. Use this user account for API calls to the Decision Server.
  51. (Sets the org.kie.server.user system property).
  52. name: KIE_SERVER_USER
  53. value: executionUser
  54. required: false
  55. - displayName: KIE Server Password
  56. description: KIE execution server password (sets the org.kie.server.pwd system property).
  57. name: KIE_SERVER_PWD
  58. from: "[a-zA-Z]{6}[0-9]{1}!"
  59. generate: expression
  60. required: false
  61. - displayName: KIE Server ID
  62. 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).
  63. name: KIE_SERVER_ID
  64. value: ''
  65. required: false
  66. - displayName: KIE Server Bypass Auth User
  67. description: KIE execution server bypass auth user. If this parameter is set to true, the Decision Server accepts
  68. API calls without user account authorization. (Sets the org.kie.server.bypass.auth.user system property).
  69. name: KIE_SERVER_BYPASS_AUTH_USER
  70. value: 'false'
  71. required: false
  72. - displayName: KIE MBeans
  73. description: KIE execution server MBeans enabled/disabled. These MBeans provide monitoring information. (Sets the
  74. kie.mbeans and kie.scanner.mbeans system properties).
  75. name: KIE_MBEANS
  76. value: enabled
  77. required: false
  78. - displayName: Drools Server Filter Classes
  79. description: KIE execution server class filtering. When this parameter is set to true, the Decision Server extension
  80. accepts custom classes annotated by the XmlRootElement or Remotable annotations only. Setting to true is preferable
  81. for performance, but some custom decision services might require false. (Sets the org.drools.server.filter.classes
  82. system property).
  83. name: DROOLS_SERVER_FILTER_CLASSES
  84. value: 'true'
  85. required: false
  86. - displayName: Decision Server Custom http Route Hostname
  87. description: 'Custom hostname for http service route. Leave blank for default hostname,
  88. example: <application-name>-execserv-<project>.<default-domain-suffix>'
  89. name: EXECUTION_SERVER_HOSTNAME_HTTP
  90. value: ''
  91. required: false
  92. - displayName: Decision Server Custom https Route Hostname
  93. description: 'Custom hostname for https service route. Leave blank for default hostname,
  94. example: secure-<application-name>-execserv-<project>.<default-domain-suffix>'
  95. name: EXECUTION_SERVER_HOSTNAME_HTTPS
  96. value: ''
  97. required: false
  98. - displayName: Server Keystore Secret Name
  99. description: The name of the secret containing the keystore file for Decision Server.
  100. name: HTTPS_SECRET
  101. value: kieserver-app-secret
  102. required: false
  103. - displayName: Server Keystore Filename
  104. description: The name of the keystore file within the secret.
  105. name: HTTPS_KEYSTORE
  106. value: keystore.jks
  107. required: false
  108. - displayName: Server Certificate Name
  109. description: The name associated with the server certificate.
  110. name: HTTPS_NAME
  111. value: jboss
  112. required: false
  113. - displayName: Server Keystore Password
  114. description: The password for the keystore and certificate.
  115. name: HTTPS_PASSWORD
  116. value: mykeystorepass
  117. required: false
  118. - displayName: KIE Server Container Deployment
  119. description: 'KIE Server Container deployment configuration in format: containerId=groupId:artifactId:version|c2=g2:a2:v2.
  120. This information identifies the decision service (KJAR file) that is built from your source. You can provide two
  121. or more KJAR files using the `|` separator, for example: `containerId=groupId:artifactId:version|c2=g2:a2:v2`.
  122. The Maven build process must produce all these files from the source in the Git repository.'
  123. name: KIE_SERVER_CONTAINER_DEPLOYMENT
  124. value: rhdm-kieserver-hellorules=org.openshift.quickstarts:rhdm-kieserver-hellorules:1.4.0-SNAPSHOT
  125. required: false
  126. - displayName: Git Repository URL
  127. description: The URI for the Git repository containing the source for your decision service.
  128. name: SOURCE_REPOSITORY_URL
  129. value: https://github.com/jboss-container-images/rhdm-7-openshift-image.git
  130. required: true
  131. - displayName: Git Reference
  132. description: Git branch/tag reference for the source of your decision service.
  133. name: SOURCE_REPOSITORY_REF
  134. value: rhdm70-dev
  135. required: false
  136. - displayName: Context Directory
  137. description: Location of the module to build (pom.xml file) in the Git project. Empty for root project directory.
  138. name: CONTEXT_DIR
  139. value: quickstarts/hello-rules/hellorules
  140. required: false
  141. - displayName: Github Webhook Secret
  142. description: GitHub trigger secret.
  143. name: GITHUB_WEBHOOK_SECRET
  144. from: "[a-zA-Z0-9]{8}"
  145. generate: expression
  146. required: true
  147. - displayName: Generic Webhook Secret
  148. description: Generic build trigger secret.
  149. name: GENERIC_WEBHOOK_SECRET
  150. from: "[a-zA-Z0-9]{8}"
  151. generate: expression
  152. required: true
  153. - displayName: ImageStream Namespace
  154. description: Namespace in which the ImageStreams for Red Hat Middleware images are
  155. installed. These ImageStreams are normally installed in the openshift namespace.
  156. Modify this setting only if you have installed the ImageStreams in a different
  157. namespace/project.
  158. name: IMAGE_STREAM_NAMESPACE
  159. value: openshift
  160. required: true
  161. - displayName: ImageStream Tag
  162. description: A named pointer to an image in an image stream. Default is "1.1".
  163. name: IMAGE_STREAM_TAG
  164. value: "1.1"
  165. required: false
  166. - displayName: Maven mirror URL
  167. description: Maven mirror to use for S2I builds. If the Maven build of your decision service pulls packages
  168. from a Maven repository, you can set this parameter. In this case, the build process will pull packages
  169. from the mirror repository instead of the configured original repository.
  170. name: MAVEN_MIRROR_URL
  171. value: ''
  172. required: false
  173. - displayName: Maven repository URL
  174. description: Fully qualified URL to a Maven repository.
  175. name: MAVEN_REPO_URL
  176. required: false
  177. - displayName: Maven repository username
  178. description: Username to access the Maven repository, if required.
  179. name: MAVEN_REPO_USERNAME
  180. required: false
  181. - displayName: Maven repository password
  182. description: Password to access the Maven repository, if required.
  183. name: MAVEN_REPO_PASSWORD
  184. required: false
  185. - description: The directory or several directories within the project that contains the required binary files (KJAR files
  186. and any other necessary files) after a successful Maven build. Files from the artefact directory are copied
  187. into the deployment folder. Use a comma (,) to separate multiple directories. If this parameter is not specified, all
  188. archives in /target are copied.
  189. name: ARTIFACT_DIR
  190. displayName: Artifact Directory
  191. value: ''
  192. required: false
  193. - displayName: Execution Server Container Memory Limit
  194. description: Execution Server Container memory limit
  195. name: EXCECUTION_SERVER_MEMORY_LIMIT
  196. value: 1Gi
  197. required: false
  198. objects:
  199. - kind: Service
  200. apiVersion: v1
  201. spec:
  202. ports:
  203. - port: 8080
  204. targetPort: 8080
  205. selector:
  206. deploymentConfig: "${APPLICATION_NAME}-kieserver"
  207. metadata:
  208. name: "${APPLICATION_NAME}-kieserver"
  209. labels:
  210. application: "${APPLICATION_NAME}"
  211. annotations:
  212. description: The execution server web server's http port.
  213. - kind: Service
  214. apiVersion: v1
  215. spec:
  216. ports:
  217. - port: 8443
  218. targetPort: 8443
  219. selector:
  220. deploymentConfig: "${APPLICATION_NAME}-kieserver"
  221. metadata:
  222. name: secure-${APPLICATION_NAME}-kieserver
  223. labels:
  224. application: "${APPLICATION_NAME}"
  225. annotations:
  226. description: The execution server web server's https port.
  227. - kind: Route
  228. apiVersion: v1
  229. id: "${APPLICATION_NAME}-kieserver-http"
  230. metadata:
  231. name: "${APPLICATION_NAME}-kieserver"
  232. labels:
  233. application: "${APPLICATION_NAME}"
  234. annotations:
  235. description: Route for execution server's http service.
  236. spec:
  237. host: "${EXECUTION_SERVER_HOSTNAME_HTTP}"
  238. to:
  239. name: "${APPLICATION_NAME}-kieserver"
  240. - kind: Route
  241. apiVersion: v1
  242. id: "${APPLICATION_NAME}-kieserver-https"
  243. metadata:
  244. name: secure-${APPLICATION_NAME}-kieserver
  245. labels:
  246. application: "${APPLICATION_NAME}"
  247. annotations:
  248. description: Route for execution server's https service.
  249. spec:
  250. host: "${EXECUTION_SERVER_HOSTNAME_HTTPS}"
  251. to:
  252. name: secure-${APPLICATION_NAME}-kieserver
  253. tls:
  254. termination: passthrough
  255. - kind: ImageStream
  256. apiVersion: v1
  257. metadata:
  258. name: "${APPLICATION_NAME}-kieserver"
  259. labels:
  260. application: "${APPLICATION_NAME}"
  261. - kind: BuildConfig
  262. apiVersion: v1
  263. metadata:
  264. name: "${APPLICATION_NAME}-kieserver"
  265. labels:
  266. application: "${APPLICATION_NAME}"
  267. spec:
  268. source:
  269. type: Git
  270. git:
  271. uri: "${SOURCE_REPOSITORY_URL}"
  272. ref: "${SOURCE_REPOSITORY_REF}"
  273. contextDir: "${CONTEXT_DIR}"
  274. strategy:
  275. type: Source
  276. sourceStrategy:
  277. env:
  278. - name: KIE_SERVER_CONTAINER_DEPLOYMENT
  279. value: "${KIE_SERVER_CONTAINER_DEPLOYMENT}"
  280. - name: MAVEN_MIRROR_URL
  281. value: "${MAVEN_MIRROR_URL}"
  282. - name: ARTIFACT_DIR
  283. value: "${ARTIFACT_DIR}"
  284. forcePull: true
  285. from:
  286. kind: ImageStreamTag
  287. namespace: "${IMAGE_STREAM_NAMESPACE}"
  288. name: "rhdm70-kieserver-openshift:${IMAGE_STREAM_TAG}"
  289. output:
  290. to:
  291. kind: ImageStreamTag
  292. name: "${APPLICATION_NAME}-kieserver:latest"
  293. triggers:
  294. - type: GitHub
  295. github:
  296. secret: "${GITHUB_WEBHOOK_SECRET}"
  297. - type: Generic
  298. generic:
  299. secret: "${GENERIC_WEBHOOK_SECRET}"
  300. - type: ImageChange
  301. imageChange: {}
  302. - type: ConfigChange
  303. - kind: DeploymentConfig
  304. apiVersion: v1
  305. metadata:
  306. name: "${APPLICATION_NAME}-kieserver"
  307. labels:
  308. application: "${APPLICATION_NAME}"
  309. spec:
  310. strategy:
  311. type: Recreate
  312. triggers:
  313. - type: ImageChange
  314. imageChangeParams:
  315. automatic: true
  316. containerNames:
  317. - "${APPLICATION_NAME}-kieserver"
  318. from:
  319. kind: ImageStream
  320. name: "${APPLICATION_NAME}-kieserver"
  321. - type: ConfigChange
  322. replicas: 1
  323. selector:
  324. deploymentConfig: "${APPLICATION_NAME}-kieserver"
  325. template:
  326. metadata:
  327. name: "${APPLICATION_NAME}-kieserver"
  328. labels:
  329. deploymentConfig: "${APPLICATION_NAME}-kieserver"
  330. application: "${APPLICATION_NAME}"
  331. spec:
  332. terminationGracePeriodSeconds: 60
  333. containers:
  334. - name: "${APPLICATION_NAME}-kieserver"
  335. image: "${APPLICATION_NAME}-kieserver"
  336. imagePullPolicy: Always
  337. resources:
  338. limits:
  339. memory: "${EXCECUTION_SERVER_MEMORY_LIMIT}"
  340. volumeMounts:
  341. - name: kieserver-keystore-volume
  342. mountPath: "/etc/kieserver-secret-volume"
  343. readOnly: true
  344. livenessProbe:
  345. exec:
  346. command:
  347. - "/bin/bash"
  348. - "-c"
  349. - "/opt/eap/bin/livenessProbe.sh"
  350. readinessProbe:
  351. exec:
  352. command:
  353. - "/bin/bash"
  354. - "-c"
  355. - "/opt/eap/bin/readinessProbe.sh"
  356. ports:
  357. - name: jolokia
  358. containerPort: 8778
  359. protocol: TCP
  360. - name: http
  361. containerPort: 8080
  362. protocol: TCP
  363. - name: https
  364. containerPort: 8443
  365. protocol: TCP
  366. env:
  367. - name: DROOLS_SERVER_FILTER_CLASSES
  368. value: "${DROOLS_SERVER_FILTER_CLASSES}"
  369. - name: KIE_ADMIN_PWD
  370. value: "${KIE_ADMIN_PWD}"
  371. - name: KIE_ADMIN_USER
  372. value: "${KIE_ADMIN_USER}"
  373. - name: KIE_MBEANS
  374. value: "${KIE_MBEANS}"
  375. - name: KIE_SERVER_BYPASS_AUTH_USER
  376. value: "${KIE_SERVER_BYPASS_AUTH_USER}"
  377. - name: KIE_SERVER_ID
  378. value: "${KIE_SERVER_ID}"
  379. - name: KIE_SERVER_HOST
  380. valueFrom:
  381. fieldRef:
  382. fieldPath: status.podIP
  383. - name: KIE_SERVER_CONTAINER_DEPLOYMENT
  384. value: "${KIE_SERVER_CONTAINER_DEPLOYMENT}"
  385. - name: KIE_SERVER_PWD
  386. value: "${KIE_SERVER_PWD}"
  387. - name: KIE_SERVER_USER
  388. value: "${KIE_SERVER_USER}"
  389. - name: MAVEN_REPO_URL
  390. value: "${MAVEN_REPO_URL}"
  391. - name: MAVEN_REPO_USERNAME
  392. value: "${MAVEN_REPO_USERNAME}"
  393. - name: MAVEN_REPO_PASSWORD
  394. value: "${MAVEN_REPO_PASSWORD}"
  395. - name: HTTPS_KEYSTORE_DIR
  396. value: "/etc/kieserver-secret-volume"
  397. - name: HTTPS_KEYSTORE
  398. value: "${HTTPS_KEYSTORE}"
  399. - name: HTTPS_NAME
  400. value: "${HTTPS_NAME}"
  401. - name: HTTPS_PASSWORD
  402. value: "${HTTPS_PASSWORD}"
  403. volumes:
  404. - name: kieserver-keystore-volume
  405. secret:
  406. secretName: "${HTTPS_SECRET}"