decisionserver62-basic-s2i.json 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "description": "Application template for Red Hat JBoss BRMS 6.2 decision server applications built using S2I.",
  7. "iconClass": "icon-jboss",
  8. "tags": "decisionserver,java,jboss,xpaas",
  9. "version": "1.3.3"
  10. },
  11. "name": "decisionserver62-basic-s2i"
  12. },
  13. "labels": {
  14. "template": "decisionserver62-basic-s2i",
  15. "xpaas": "1.3.3"
  16. },
  17. "parameters": [
  18. {
  19. "description": "The KIE Container deployment configuration in format: containerId=groupId:artifactId:version|c2=g2:a2:v2",
  20. "name": "KIE_CONTAINER_DEPLOYMENT",
  21. "value": "HelloRulesContainer=org.openshift.quickstarts:decisionserver-hellorules:1.2.0.Final",
  22. "required": false
  23. },
  24. {
  25. "description": "The user name to access the KIE Server REST or JMS interface.",
  26. "name": "KIE_SERVER_USER",
  27. "value": "kieserver",
  28. "required": false
  29. },
  30. {
  31. "description": "The password to access the KIE Server REST or JMS interface. Must be different than username; must not be root, admin, or administrator; must contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), and 1 non-alphanumeric symbol(s).",
  32. "name": "KIE_SERVER_PASSWORD",
  33. "from": "[a-zA-Z]{6}[0-9]{1}!",
  34. "generate": "expression",
  35. "required": false
  36. },
  37. {
  38. "description": "The name for the application.",
  39. "name": "APPLICATION_NAME",
  40. "value": "kie-app",
  41. "required": true
  42. },
  43. {
  44. "description": "Custom hostname for http service route. Leave blank for default hostname, e.g.: <application-name>-<project>.<default-domain-suffix>",
  45. "name": "HOSTNAME_HTTP",
  46. "value": "",
  47. "required": false
  48. },
  49. {
  50. "description": "Git source URI for application",
  51. "name": "SOURCE_REPOSITORY_URL",
  52. "value": "https://github.com/jboss-openshift/openshift-quickstarts.git",
  53. "required": true
  54. },
  55. {
  56. "description": "Git branch/tag reference",
  57. "name": "SOURCE_REPOSITORY_REF",
  58. "value": "1.2",
  59. "required": false
  60. },
  61. {
  62. "description": "Path within Git project to build; empty for root project directory.",
  63. "name": "CONTEXT_DIR",
  64. "value": "decisionserver/hellorules",
  65. "required": false
  66. },
  67. {
  68. "description": "Queue names",
  69. "name": "HORNETQ_QUEUES",
  70. "value": "",
  71. "required": false
  72. },
  73. {
  74. "description": "Topic names",
  75. "name": "HORNETQ_TOPICS",
  76. "value": "",
  77. "required": false
  78. },
  79. {
  80. "description": "HornetQ cluster admin password",
  81. "name": "HORNETQ_CLUSTER_PASSWORD",
  82. "from": "[a-zA-Z0-9]{8}",
  83. "generate": "expression",
  84. "required": true
  85. },
  86. {
  87. "description": "GitHub trigger secret",
  88. "name": "GITHUB_WEBHOOK_SECRET",
  89. "from": "[a-zA-Z0-9]{8}",
  90. "generate": "expression",
  91. "required": true
  92. },
  93. {
  94. "description": "Generic build trigger secret",
  95. "name": "GENERIC_WEBHOOK_SECRET",
  96. "from": "[a-zA-Z0-9]{8}",
  97. "generate": "expression",
  98. "required": true
  99. },
  100. {
  101. "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
  102. "name": "IMAGE_STREAM_NAMESPACE",
  103. "value": "openshift",
  104. "required": true
  105. }
  106. ],
  107. "objects": [
  108. {
  109. "kind": "Service",
  110. "apiVersion": "v1",
  111. "spec": {
  112. "ports": [
  113. {
  114. "port": 8080,
  115. "targetPort": 8080
  116. }
  117. ],
  118. "selector": {
  119. "deploymentConfig": "${APPLICATION_NAME}"
  120. }
  121. },
  122. "metadata": {
  123. "name": "${APPLICATION_NAME}",
  124. "labels": {
  125. "application": "${APPLICATION_NAME}"
  126. },
  127. "annotations": {
  128. "description": "The web server's http port."
  129. }
  130. }
  131. },
  132. {
  133. "kind": "Route",
  134. "apiVersion": "v1",
  135. "id": "${APPLICATION_NAME}-http",
  136. "metadata": {
  137. "name": "${APPLICATION_NAME}",
  138. "labels": {
  139. "application": "${APPLICATION_NAME}"
  140. },
  141. "annotations": {
  142. "description": "Route for application's http service."
  143. }
  144. },
  145. "spec": {
  146. "host": "${HOSTNAME_HTTP}",
  147. "to": {
  148. "name": "${APPLICATION_NAME}"
  149. }
  150. }
  151. },
  152. {
  153. "kind": "ImageStream",
  154. "apiVersion": "v1",
  155. "metadata": {
  156. "name": "${APPLICATION_NAME}",
  157. "labels": {
  158. "application": "${APPLICATION_NAME}"
  159. }
  160. }
  161. },
  162. {
  163. "kind": "BuildConfig",
  164. "apiVersion": "v1",
  165. "metadata": {
  166. "name": "${APPLICATION_NAME}",
  167. "labels": {
  168. "application": "${APPLICATION_NAME}"
  169. }
  170. },
  171. "spec": {
  172. "source": {
  173. "type": "Git",
  174. "git": {
  175. "uri": "${SOURCE_REPOSITORY_URL}",
  176. "ref": "${SOURCE_REPOSITORY_REF}"
  177. },
  178. "contextDir": "${CONTEXT_DIR}"
  179. },
  180. "strategy": {
  181. "type": "Source",
  182. "sourceStrategy": {
  183. "env": [
  184. {
  185. "name": "KIE_CONTAINER_DEPLOYMENT",
  186. "value": "${KIE_CONTAINER_DEPLOYMENT}"
  187. }
  188. ],
  189. "forcePull": true,
  190. "from": {
  191. "kind": "ImageStreamTag",
  192. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  193. "name": "jboss-decisionserver62-openshift:1.2"
  194. }
  195. }
  196. },
  197. "output": {
  198. "to": {
  199. "kind": "ImageStreamTag",
  200. "name": "${APPLICATION_NAME}:latest"
  201. }
  202. },
  203. "triggers": [
  204. {
  205. "type": "GitHub",
  206. "github": {
  207. "secret": "${GITHUB_WEBHOOK_SECRET}"
  208. }
  209. },
  210. {
  211. "type": "Generic",
  212. "generic": {
  213. "secret": "${GENERIC_WEBHOOK_SECRET}"
  214. }
  215. },
  216. {
  217. "type": "ImageChange",
  218. "imageChange": {}
  219. },
  220. {
  221. "type": "ConfigChange"
  222. }
  223. ]
  224. }
  225. },
  226. {
  227. "kind": "DeploymentConfig",
  228. "apiVersion": "v1",
  229. "metadata": {
  230. "name": "${APPLICATION_NAME}",
  231. "labels": {
  232. "application": "${APPLICATION_NAME}"
  233. }
  234. },
  235. "spec": {
  236. "strategy": {
  237. "type": "Recreate"
  238. },
  239. "triggers": [
  240. {
  241. "type": "ImageChange",
  242. "imageChangeParams": {
  243. "automatic": true,
  244. "containerNames": [
  245. "${APPLICATION_NAME}"
  246. ],
  247. "from": {
  248. "kind": "ImageStreamTag",
  249. "name": "${APPLICATION_NAME}:latest"
  250. }
  251. }
  252. },
  253. {
  254. "type": "ConfigChange"
  255. }
  256. ],
  257. "replicas": 1,
  258. "selector": {
  259. "deploymentConfig": "${APPLICATION_NAME}"
  260. },
  261. "template": {
  262. "metadata": {
  263. "name": "${APPLICATION_NAME}",
  264. "labels": {
  265. "deploymentConfig": "${APPLICATION_NAME}",
  266. "application": "${APPLICATION_NAME}"
  267. }
  268. },
  269. "spec": {
  270. "terminationGracePeriodSeconds": 60,
  271. "containers": [
  272. {
  273. "name": "${APPLICATION_NAME}",
  274. "image": "${APPLICATION_NAME}",
  275. "imagePullPolicy": "Always",
  276. "livenessProbe": {
  277. "exec": {
  278. "command": [
  279. "/bin/bash",
  280. "-c",
  281. "/opt/eap/bin/livenessProbe.sh"
  282. ]
  283. }
  284. },
  285. "readinessProbe": {
  286. "exec": {
  287. "command": [
  288. "/bin/bash",
  289. "-c",
  290. "/opt/eap/bin/readinessProbe.sh"
  291. ]
  292. }
  293. },
  294. "ports": [
  295. {
  296. "name": "jolokia",
  297. "containerPort": 8778,
  298. "protocol": "TCP"
  299. },
  300. {
  301. "name": "http",
  302. "containerPort": 8080,
  303. "protocol": "TCP"
  304. }
  305. ],
  306. "env": [
  307. {
  308. "name": "KIE_CONTAINER_DEPLOYMENT",
  309. "value": "${KIE_CONTAINER_DEPLOYMENT}"
  310. },
  311. {
  312. "name": "KIE_SERVER_USER",
  313. "value": "${KIE_SERVER_USER}"
  314. },
  315. {
  316. "name": "KIE_SERVER_PASSWORD",
  317. "value": "${KIE_SERVER_PASSWORD}"
  318. },
  319. {
  320. "name": "HORNETQ_CLUSTER_PASSWORD",
  321. "value": "${HORNETQ_CLUSTER_PASSWORD}"
  322. },
  323. {
  324. "name": "HORNETQ_QUEUES",
  325. "value": "${HORNETQ_QUEUES}"
  326. },
  327. {
  328. "name": "HORNETQ_TOPICS",
  329. "value": "${HORNETQ_TOPICS}"
  330. }
  331. ]
  332. }
  333. ]
  334. }
  335. }
  336. }
  337. }
  338. ]
  339. }