rhdm70-kieserver-basic-s2i.yaml 12 KB

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