decisionserver62-https-s2i.json 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "description": "Application template for BRMS Realtime Decision Server 6 HTTPS applications built using S2I.",
  7. "iconClass": "icon-jboss",
  8. "tags": "decisionserver,java,jboss,xpaas",
  9. "version": "1.2.0"
  10. },
  11. "name": "decisionserver62-https-s2i"
  12. },
  13. "labels": {
  14. "template": "decisionserver62-https-s2i",
  15. "xpaas": "1.2.0"
  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 protocol to access the KIE Server REST interface.",
  26. "name": "KIE_SERVER_PROTOCOL",
  27. "value": "https",
  28. "required": false
  29. },
  30. {
  31. "description": "The port to access the KIE Server REST interface.",
  32. "name": "KIE_SERVER_PORT",
  33. "value": "8443",
  34. "required": false
  35. },
  36. {
  37. "description": "The user name to access the KIE Server REST or JMS interface.",
  38. "name": "KIE_SERVER_USER",
  39. "value": "kieserver",
  40. "required": false
  41. },
  42. {
  43. "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).",
  44. "name": "KIE_SERVER_PASSWORD",
  45. "from": "[a-zA-Z]{6}[0-9]{1}!",
  46. "generate": "expression",
  47. "required": false
  48. },
  49. {
  50. "description": "The name for the application.",
  51. "name": "APPLICATION_NAME",
  52. "value": "kie-app",
  53. "required": true
  54. },
  55. {
  56. "description": "Custom hostname for http service route. Leave blank for default hostname, e.g.: <application-name>-<project>.<default-domain-suffix>",
  57. "name": "HOSTNAME_HTTP",
  58. "value": "",
  59. "required": false
  60. },
  61. {
  62. "description": "Custom hostname for https service route. Leave blank for default hostname, e.g.: secure-<application-name>-<project>.<default-domain-suffix>",
  63. "name": "HOSTNAME_HTTPS",
  64. "value": "",
  65. "required": false
  66. },
  67. {
  68. "description": "Git source URI for application",
  69. "name": "SOURCE_REPOSITORY_URL",
  70. "value": "https://github.com/jboss-openshift/openshift-quickstarts.git",
  71. "required": true
  72. },
  73. {
  74. "description": "Git branch/tag reference",
  75. "name": "SOURCE_REPOSITORY_REF",
  76. "value": "1.2",
  77. "required": false
  78. },
  79. {
  80. "description": "Path within Git project to build; empty for root project directory.",
  81. "name": "CONTEXT_DIR",
  82. "value": "decisionserver/hellorules",
  83. "required": false
  84. },
  85. {
  86. "description": "Queue names",
  87. "name": "HORNETQ_QUEUES",
  88. "value": "",
  89. "required": false
  90. },
  91. {
  92. "description": "Topic names",
  93. "name": "HORNETQ_TOPICS",
  94. "value": "",
  95. "required": false
  96. },
  97. {
  98. "description": "The name of the secret containing the keystore file",
  99. "name": "HTTPS_SECRET",
  100. "value": "decisionserver-app-secret",
  101. "required": true
  102. },
  103. {
  104. "description": "The name of the keystore file within the secret",
  105. "name": "HTTPS_KEYSTORE",
  106. "value": "keystore.jks",
  107. "required": false
  108. },
  109. {
  110. "description": "The name associated with the server certificate",
  111. "name": "HTTPS_NAME",
  112. "value": "jboss",
  113. "required": false
  114. },
  115. {
  116. "description": "The password for the keystore and certificate",
  117. "name": "HTTPS_PASSWORD",
  118. "value": "mykeystorepass",
  119. "required": false
  120. },
  121. {
  122. "description": "HornetQ cluster admin password",
  123. "name": "HORNETQ_CLUSTER_PASSWORD",
  124. "from": "[a-zA-Z0-9]{8}",
  125. "generate": "expression",
  126. "required": true
  127. },
  128. {
  129. "description": "GitHub trigger secret",
  130. "name": "GITHUB_WEBHOOK_SECRET",
  131. "from": "[a-zA-Z0-9]{8}",
  132. "generate": "expression",
  133. "required": true
  134. },
  135. {
  136. "description": "Generic build trigger secret",
  137. "name": "GENERIC_WEBHOOK_SECRET",
  138. "from": "[a-zA-Z0-9]{8}",
  139. "generate": "expression",
  140. "required": true
  141. },
  142. {
  143. "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.",
  144. "name": "IMAGE_STREAM_NAMESPACE",
  145. "value": "openshift",
  146. "required": true
  147. }
  148. ],
  149. "objects": [
  150. {
  151. "kind": "Service",
  152. "apiVersion": "v1",
  153. "spec": {
  154. "ports": [
  155. {
  156. "port": 8080,
  157. "targetPort": 8080
  158. }
  159. ],
  160. "selector": {
  161. "deploymentConfig": "${APPLICATION_NAME}"
  162. }
  163. },
  164. "metadata": {
  165. "name": "${APPLICATION_NAME}",
  166. "labels": {
  167. "application": "${APPLICATION_NAME}"
  168. },
  169. "annotations": {
  170. "description": "The web server's http port."
  171. }
  172. }
  173. },
  174. {
  175. "kind": "Service",
  176. "apiVersion": "v1",
  177. "spec": {
  178. "ports": [
  179. {
  180. "port": 8443,
  181. "targetPort": 8443
  182. }
  183. ],
  184. "selector": {
  185. "deploymentConfig": "${APPLICATION_NAME}"
  186. }
  187. },
  188. "metadata": {
  189. "name": "secure-${APPLICATION_NAME}",
  190. "labels": {
  191. "application": "${APPLICATION_NAME}"
  192. },
  193. "annotations": {
  194. "description": "The web server's https port."
  195. }
  196. }
  197. },
  198. {
  199. "kind": "Route",
  200. "apiVersion": "v1",
  201. "id": "${APPLICATION_NAME}-http",
  202. "metadata": {
  203. "name": "${APPLICATION_NAME}",
  204. "labels": {
  205. "application": "${APPLICATION_NAME}"
  206. },
  207. "annotations": {
  208. "description": "Route for application's http service."
  209. }
  210. },
  211. "spec": {
  212. "host": "${HOSTNAME_HTTP}",
  213. "to": {
  214. "name": "${APPLICATION_NAME}"
  215. }
  216. }
  217. },
  218. {
  219. "kind": "Route",
  220. "apiVersion": "v1",
  221. "id": "${APPLICATION_NAME}-https",
  222. "metadata": {
  223. "name": "secure-${APPLICATION_NAME}",
  224. "labels": {
  225. "application": "${APPLICATION_NAME}"
  226. },
  227. "annotations": {
  228. "description": "Route for application's https service."
  229. }
  230. },
  231. "spec": {
  232. "host": "${HOSTNAME_HTTPS}",
  233. "to": {
  234. "name": "secure-${APPLICATION_NAME}"
  235. },
  236. "tls": {
  237. "termination": "passthrough"
  238. }
  239. }
  240. },
  241. {
  242. "kind": "ImageStream",
  243. "apiVersion": "v1",
  244. "metadata": {
  245. "name": "${APPLICATION_NAME}",
  246. "labels": {
  247. "application": "${APPLICATION_NAME}"
  248. }
  249. }
  250. },
  251. {
  252. "kind": "BuildConfig",
  253. "apiVersion": "v1",
  254. "metadata": {
  255. "name": "${APPLICATION_NAME}",
  256. "labels": {
  257. "application": "${APPLICATION_NAME}"
  258. }
  259. },
  260. "spec": {
  261. "source": {
  262. "type": "Git",
  263. "git": {
  264. "uri": "${SOURCE_REPOSITORY_URL}",
  265. "ref": "${SOURCE_REPOSITORY_REF}"
  266. },
  267. "contextDir": "${CONTEXT_DIR}"
  268. },
  269. "strategy": {
  270. "type": "Source",
  271. "sourceStrategy": {
  272. "env": [
  273. {
  274. "name": "KIE_CONTAINER_DEPLOYMENT",
  275. "value": "${KIE_CONTAINER_DEPLOYMENT}"
  276. }
  277. ],
  278. "forcePull": true,
  279. "from": {
  280. "kind": "ImageStreamTag",
  281. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  282. "name": "jboss-decisionserver62-openshift:1.2"
  283. }
  284. }
  285. },
  286. "output": {
  287. "to": {
  288. "kind": "ImageStreamTag",
  289. "name": "${APPLICATION_NAME}:latest"
  290. }
  291. },
  292. "triggers": [
  293. {
  294. "type": "GitHub",
  295. "github": {
  296. "secret": "${GITHUB_WEBHOOK_SECRET}"
  297. }
  298. },
  299. {
  300. "type": "Generic",
  301. "generic": {
  302. "secret": "${GENERIC_WEBHOOK_SECRET}"
  303. }
  304. },
  305. {
  306. "type": "ImageChange",
  307. "imageChange": {}
  308. },
  309. {
  310. "type": "ConfigChange"
  311. }
  312. ]
  313. }
  314. },
  315. {
  316. "kind": "DeploymentConfig",
  317. "apiVersion": "v1",
  318. "metadata": {
  319. "name": "${APPLICATION_NAME}",
  320. "labels": {
  321. "application": "${APPLICATION_NAME}"
  322. }
  323. },
  324. "spec": {
  325. "strategy": {
  326. "type": "Recreate"
  327. },
  328. "triggers": [
  329. {
  330. "type": "ImageChange",
  331. "imageChangeParams": {
  332. "automatic": true,
  333. "containerNames": [
  334. "${APPLICATION_NAME}"
  335. ],
  336. "from": {
  337. "kind": "ImageStream",
  338. "name": "${APPLICATION_NAME}"
  339. }
  340. }
  341. },
  342. {
  343. "type": "ConfigChange"
  344. }
  345. ],
  346. "replicas": 1,
  347. "selector": {
  348. "deploymentConfig": "${APPLICATION_NAME}"
  349. },
  350. "template": {
  351. "metadata": {
  352. "name": "${APPLICATION_NAME}",
  353. "labels": {
  354. "deploymentConfig": "${APPLICATION_NAME}",
  355. "application": "${APPLICATION_NAME}"
  356. }
  357. },
  358. "spec": {
  359. "serviceAccountName": "decisionserver-service-account",
  360. "terminationGracePeriodSeconds": 60,
  361. "containers": [
  362. {
  363. "name": "${APPLICATION_NAME}",
  364. "image": "${APPLICATION_NAME}",
  365. "imagePullPolicy": "Always",
  366. "volumeMounts": [
  367. {
  368. "name": "decisionserver-keystore-volume",
  369. "mountPath": "/etc/decisionserver-secret-volume",
  370. "readOnly": true
  371. }
  372. ],
  373. "livenessProbe": {
  374. "exec": {
  375. "command": [
  376. "/bin/bash",
  377. "-c",
  378. "/opt/eap/bin/livenessProbe.sh"
  379. ]
  380. }
  381. },
  382. "readinessProbe": {
  383. "exec": {
  384. "command": [
  385. "/bin/bash",
  386. "-c",
  387. "/opt/eap/bin/readinessProbe.sh"
  388. ]
  389. }
  390. },
  391. "ports": [
  392. {
  393. "name": "jolokia",
  394. "containerPort": 8778,
  395. "protocol": "TCP"
  396. },
  397. {
  398. "name": "http",
  399. "containerPort": 8080,
  400. "protocol": "TCP"
  401. },
  402. {
  403. "name": "https",
  404. "containerPort": 8443,
  405. "protocol": "TCP"
  406. },
  407. {
  408. "name": "ping",
  409. "containerPort": 8888,
  410. "protocol": "TCP"
  411. }
  412. ],
  413. "env": [
  414. {
  415. "name": "KIE_CONTAINER_DEPLOYMENT",
  416. "value": "${KIE_CONTAINER_DEPLOYMENT}"
  417. },
  418. {
  419. "name": "KIE_SERVER_PROTOCOL",
  420. "value": "${KIE_SERVER_PROTOCOL}"
  421. },
  422. {
  423. "name": "KIE_SERVER_PORT",
  424. "value": "${KIE_SERVER_PORT}"
  425. },
  426. {
  427. "name": "KIE_SERVER_USER",
  428. "value": "${KIE_SERVER_USER}"
  429. },
  430. {
  431. "name": "KIE_SERVER_PASSWORD",
  432. "value": "${KIE_SERVER_PASSWORD}"
  433. },
  434. {
  435. "name": "HTTPS_KEYSTORE_DIR",
  436. "value": "/etc/decisionserver-secret-volume"
  437. },
  438. {
  439. "name": "HTTPS_KEYSTORE",
  440. "value": "${HTTPS_KEYSTORE}"
  441. },
  442. {
  443. "name": "HTTPS_NAME",
  444. "value": "${HTTPS_NAME}"
  445. },
  446. {
  447. "name": "HTTPS_PASSWORD",
  448. "value": "${HTTPS_PASSWORD}"
  449. },
  450. {
  451. "name": "HORNETQ_CLUSTER_PASSWORD",
  452. "value": "${HORNETQ_CLUSTER_PASSWORD}"
  453. },
  454. {
  455. "name": "HORNETQ_QUEUES",
  456. "value": "${HORNETQ_QUEUES}"
  457. },
  458. {
  459. "name": "HORNETQ_TOPICS",
  460. "value": "${HORNETQ_TOPICS}"
  461. }
  462. ]
  463. }
  464. ],
  465. "volumes": [
  466. {
  467. "name": "decisionserver-keystore-volume",
  468. "secret": {
  469. "secretName": "${HTTPS_SECRET}"
  470. }
  471. }
  472. ]
  473. }
  474. }
  475. }
  476. }
  477. ]
  478. }