decisionserver62-amq-s2i.json 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "description": "Application template for BRMS Realtime Decision Server 6 A-MQ applications built using S2I.",
  7. "iconClass": "icon-jboss",
  8. "tags": "decisionserver,amq,java,messaging,jboss,xpaas",
  9. "version": "1.2.0"
  10. },
  11. "name": "decisionserver62-amq-s2i"
  12. },
  13. "labels": {
  14. "template": "decisionserver62-amq-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 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": "JAAS LoginContext domain that shall be used to authenticate users when using JMS.",
  39. "name": "KIE_SERVER_DOMAIN",
  40. "value": "other",
  41. "required": false
  42. },
  43. {
  44. "description": "JNDI name of response queue for JMS.",
  45. "name": "KIE_SERVER_JMS_QUEUES_RESPONSE",
  46. "value": "queue/KIE.SERVER.RESPONSE",
  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": "JNDI name for connection factory used by applications to connect to the broker, e.g. java:/JmsXA",
  87. "name": "MQ_JNDI",
  88. "value": "java:/JmsXA",
  89. "required": false
  90. },
  91. {
  92. "description": "Broker protocols to configure, separated by commas. Allowed values are: `openwire`, `amqp`, `stomp` and `mqtt`. Only `openwire` is supported by EAP.",
  93. "name": "MQ_PROTOCOL",
  94. "value": "openwire",
  95. "required": false
  96. },
  97. {
  98. "description": "Queue names, separated by commas. These queues will be automatically created when the broker starts. Also, they will be made accessible as JNDI resources in EAP.",
  99. "name": "MQ_QUEUES",
  100. "value": "KIE.SERVER.REQUEST,KIE.SERVER.RESPONSE",
  101. "required": false
  102. },
  103. {
  104. "description": "Topic names, separated by commas. These topics will be automatically created when the broker starts. Also, they will be made accessible as JNDI resources in EAP.",
  105. "name": "MQ_TOPICS",
  106. "value": "",
  107. "required": false
  108. },
  109. {
  110. "description": "The name of the secret containing the keystore file",
  111. "name": "HTTPS_SECRET",
  112. "value": "decisionserver-app-secret",
  113. "required": false
  114. },
  115. {
  116. "description": "The name of the keystore file within the secret",
  117. "name": "HTTPS_KEYSTORE",
  118. "value": "keystore.jks",
  119. "required": false
  120. },
  121. {
  122. "description": "The name associated with the server certificate",
  123. "name": "HTTPS_NAME",
  124. "value": "jboss",
  125. "required": false
  126. },
  127. {
  128. "description": "The password for the keystore and certificate",
  129. "name": "HTTPS_PASSWORD",
  130. "value": "mykeystorepass",
  131. "required": false
  132. },
  133. {
  134. "description": "User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
  135. "name": "MQ_USERNAME",
  136. "from": "user[a-zA-Z0-9]{3}",
  137. "generate": "expression",
  138. "required": false
  139. },
  140. {
  141. "description": "Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
  142. "name": "MQ_PASSWORD",
  143. "from": "[a-zA-Z0-9]{8}",
  144. "generate": "expression",
  145. "required": false
  146. },
  147. {
  148. "description": "User name for broker admin. If left empty, it will be generated.",
  149. "name": "AMQ_ADMIN_USERNAME",
  150. "from": "user[a-zA-Z0-9]{3}",
  151. "generate": "expression",
  152. "required": true
  153. },
  154. {
  155. "description": "Password for broker admin. If left empty, it will be generated.",
  156. "name": "AMQ_ADMIN_PASSWORD",
  157. "from": "[a-zA-Z0-9]{8}",
  158. "generate": "expression",
  159. "required": true
  160. },
  161. {
  162. "description": "GitHub trigger secret",
  163. "name": "GITHUB_WEBHOOK_SECRET",
  164. "from": "[a-zA-Z0-9]{8}",
  165. "generate": "expression",
  166. "required": true
  167. },
  168. {
  169. "description": "Generic build trigger secret",
  170. "name": "GENERIC_WEBHOOK_SECRET",
  171. "from": "[a-zA-Z0-9]{8}",
  172. "generate": "expression",
  173. "required": true
  174. },
  175. {
  176. "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.",
  177. "name": "IMAGE_STREAM_NAMESPACE",
  178. "value": "openshift",
  179. "required": true
  180. }
  181. ],
  182. "objects": [
  183. {
  184. "kind": "Service",
  185. "apiVersion": "v1",
  186. "spec": {
  187. "ports": [
  188. {
  189. "port": 8080,
  190. "targetPort": 8080
  191. }
  192. ],
  193. "selector": {
  194. "deploymentConfig": "${APPLICATION_NAME}"
  195. }
  196. },
  197. "metadata": {
  198. "name": "${APPLICATION_NAME}",
  199. "labels": {
  200. "application": "${APPLICATION_NAME}"
  201. },
  202. "annotations": {
  203. "description": "The web server's HTTP port."
  204. }
  205. }
  206. },
  207. {
  208. "kind": "Service",
  209. "apiVersion": "v1",
  210. "spec": {
  211. "ports": [
  212. {
  213. "port": 8443,
  214. "targetPort": 8443
  215. }
  216. ],
  217. "selector": {
  218. "deploymentConfig": "${APPLICATION_NAME}"
  219. }
  220. },
  221. "metadata": {
  222. "name": "secure-${APPLICATION_NAME}",
  223. "labels": {
  224. "application": "${APPLICATION_NAME}"
  225. },
  226. "annotations": {
  227. "description": "The web server's HTTPS port."
  228. }
  229. }
  230. },
  231. {
  232. "kind": "Service",
  233. "apiVersion": "v1",
  234. "spec": {
  235. "ports": [
  236. {
  237. "port": 61616,
  238. "targetPort": 61616
  239. }
  240. ],
  241. "selector": {
  242. "deploymentConfig": "${APPLICATION_NAME}-amq"
  243. }
  244. },
  245. "metadata": {
  246. "name": "${APPLICATION_NAME}-amq-tcp",
  247. "labels": {
  248. "application": "${APPLICATION_NAME}"
  249. },
  250. "annotations": {
  251. "description": "The broker's OpenWire port."
  252. }
  253. }
  254. },
  255. {
  256. "kind": "Route",
  257. "apiVersion": "v1",
  258. "id": "${APPLICATION_NAME}-http",
  259. "metadata": {
  260. "name": "${APPLICATION_NAME}",
  261. "labels": {
  262. "application": "${APPLICATION_NAME}"
  263. },
  264. "annotations": {
  265. "description": "Route for application's HTTP service."
  266. }
  267. },
  268. "spec": {
  269. "host": "${HOSTNAME_HTTP}",
  270. "to": {
  271. "name": "${APPLICATION_NAME}"
  272. }
  273. }
  274. },
  275. {
  276. "kind": "Route",
  277. "apiVersion": "v1",
  278. "id": "${APPLICATION_NAME}-https",
  279. "metadata": {
  280. "name": "secure-${APPLICATION_NAME}",
  281. "labels": {
  282. "application": "${APPLICATION_NAME}"
  283. },
  284. "annotations": {
  285. "description": "Route for application's HTTPS service."
  286. }
  287. },
  288. "spec": {
  289. "host": "${HOSTNAME_HTTPS}",
  290. "to": {
  291. "name": "secure-${APPLICATION_NAME}"
  292. },
  293. "tls": {
  294. "termination": "passthrough"
  295. }
  296. }
  297. },
  298. {
  299. "kind": "ImageStream",
  300. "apiVersion": "v1",
  301. "metadata": {
  302. "name": "${APPLICATION_NAME}",
  303. "labels": {
  304. "application": "${APPLICATION_NAME}"
  305. }
  306. }
  307. },
  308. {
  309. "kind": "BuildConfig",
  310. "apiVersion": "v1",
  311. "metadata": {
  312. "name": "${APPLICATION_NAME}",
  313. "labels": {
  314. "application": "${APPLICATION_NAME}"
  315. }
  316. },
  317. "spec": {
  318. "source": {
  319. "type": "Git",
  320. "git": {
  321. "uri": "${SOURCE_REPOSITORY_URL}",
  322. "ref": "${SOURCE_REPOSITORY_REF}"
  323. },
  324. "contextDir": "${CONTEXT_DIR}"
  325. },
  326. "strategy": {
  327. "type": "Source",
  328. "sourceStrategy": {
  329. "env": [
  330. {
  331. "name": "KIE_CONTAINER_DEPLOYMENT",
  332. "value": "${KIE_CONTAINER_DEPLOYMENT}"
  333. }
  334. ],
  335. "forcePull": true,
  336. "from": {
  337. "kind": "ImageStreamTag",
  338. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  339. "name": "jboss-decisionserver62-openshift:1.2"
  340. }
  341. }
  342. },
  343. "output": {
  344. "to": {
  345. "kind": "ImageStreamTag",
  346. "name": "${APPLICATION_NAME}:latest"
  347. }
  348. },
  349. "triggers": [
  350. {
  351. "type": "GitHub",
  352. "github": {
  353. "secret": "${GITHUB_WEBHOOK_SECRET}"
  354. }
  355. },
  356. {
  357. "type": "Generic",
  358. "generic": {
  359. "secret": "${GENERIC_WEBHOOK_SECRET}"
  360. }
  361. },
  362. {
  363. "type": "ImageChange",
  364. "imageChange": {}
  365. },
  366. {
  367. "type": "ConfigChange"
  368. }
  369. ]
  370. }
  371. },
  372. {
  373. "kind": "DeploymentConfig",
  374. "apiVersion": "v1",
  375. "metadata": {
  376. "name": "${APPLICATION_NAME}",
  377. "labels": {
  378. "application": "${APPLICATION_NAME}"
  379. }
  380. },
  381. "spec": {
  382. "strategy": {
  383. "type": "Recreate"
  384. },
  385. "triggers": [
  386. {
  387. "type": "ImageChange",
  388. "imageChangeParams": {
  389. "automatic": true,
  390. "containerNames": [
  391. "${APPLICATION_NAME}"
  392. ],
  393. "from": {
  394. "kind": "ImageStream",
  395. "name": "${APPLICATION_NAME}"
  396. }
  397. }
  398. },
  399. {
  400. "type": "ConfigChange"
  401. }
  402. ],
  403. "replicas": 1,
  404. "selector": {
  405. "deploymentConfig": "${APPLICATION_NAME}"
  406. },
  407. "template": {
  408. "metadata": {
  409. "name": "${APPLICATION_NAME}",
  410. "labels": {
  411. "deploymentConfig": "${APPLICATION_NAME}",
  412. "application": "${APPLICATION_NAME}"
  413. }
  414. },
  415. "spec": {
  416. "serviceAccountName": "decisionserver-service-account",
  417. "terminationGracePeriodSeconds": 60,
  418. "containers": [
  419. {
  420. "name": "${APPLICATION_NAME}",
  421. "image": "${APPLICATION_NAME}",
  422. "imagePullPolicy": "Always",
  423. "volumeMounts": [
  424. {
  425. "name": "decisionserver-keystore-volume",
  426. "mountPath": "/etc/decisionserver-secret-volume",
  427. "readOnly": true
  428. }
  429. ],
  430. "livenessProbe": {
  431. "exec": {
  432. "command": [
  433. "/bin/bash",
  434. "-c",
  435. "/opt/eap/bin/livenessProbe.sh"
  436. ]
  437. }
  438. },
  439. "readinessProbe": {
  440. "exec": {
  441. "command": [
  442. "/bin/bash",
  443. "-c",
  444. "/opt/eap/bin/readinessProbe.sh"
  445. ]
  446. }
  447. },
  448. "ports": [
  449. {
  450. "name": "jolokia",
  451. "containerPort": 8778,
  452. "protocol": "TCP"
  453. },
  454. {
  455. "name": "http",
  456. "containerPort": 8080,
  457. "protocol": "TCP"
  458. },
  459. {
  460. "name": "https",
  461. "containerPort": 8443,
  462. "protocol": "TCP"
  463. },
  464. {
  465. "name": "ping",
  466. "containerPort": 8888,
  467. "protocol": "TCP"
  468. }
  469. ],
  470. "env": [
  471. {
  472. "name": "KIE_CONTAINER_DEPLOYMENT",
  473. "value": "${KIE_CONTAINER_DEPLOYMENT}"
  474. },
  475. {
  476. "name": "KIE_SERVER_USER",
  477. "value": "${KIE_SERVER_USER}"
  478. },
  479. {
  480. "name": "KIE_SERVER_PASSWORD",
  481. "value": "${KIE_SERVER_PASSWORD}"
  482. },
  483. {
  484. "name": "KIE_SERVER_DOMAIN",
  485. "value": "${KIE_SERVER_DOMAIN}"
  486. },
  487. {
  488. "name": "KIE_SERVER_JMS_QUEUES_RESPONSE",
  489. "value": "${KIE_SERVER_JMS_QUEUES_RESPONSE}"
  490. },
  491. {
  492. "name": "MQ_SERVICE_PREFIX_MAPPING",
  493. "value": "${APPLICATION_NAME}-amq=MQ"
  494. },
  495. {
  496. "name": "MQ_JNDI",
  497. "value": "${MQ_JNDI}"
  498. },
  499. {
  500. "name": "MQ_USERNAME",
  501. "value": "${MQ_USERNAME}"
  502. },
  503. {
  504. "name": "MQ_PASSWORD",
  505. "value": "${MQ_PASSWORD}"
  506. },
  507. {
  508. "name": "MQ_PROTOCOL",
  509. "value": "tcp"
  510. },
  511. {
  512. "name": "MQ_QUEUES",
  513. "value": "${MQ_QUEUES}"
  514. },
  515. {
  516. "name": "MQ_TOPICS",
  517. "value": "${MQ_TOPICS}"
  518. },
  519. {
  520. "name": "HTTPS_KEYSTORE_DIR",
  521. "value": "/etc/decisionserver-secret-volume"
  522. },
  523. {
  524. "name": "HTTPS_KEYSTORE",
  525. "value": "${HTTPS_KEYSTORE}"
  526. },
  527. {
  528. "name": "HTTPS_NAME",
  529. "value": "${HTTPS_NAME}"
  530. },
  531. {
  532. "name": "HTTPS_PASSWORD",
  533. "value": "${HTTPS_PASSWORD}"
  534. }
  535. ]
  536. }
  537. ],
  538. "volumes": [
  539. {
  540. "name": "decisionserver-keystore-volume",
  541. "secret": {
  542. "secretName": "${HTTPS_SECRET}"
  543. }
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. },
  550. {
  551. "kind": "DeploymentConfig",
  552. "apiVersion": "v1",
  553. "metadata": {
  554. "name": "${APPLICATION_NAME}-amq",
  555. "labels": {
  556. "application": "${APPLICATION_NAME}"
  557. }
  558. },
  559. "spec": {
  560. "strategy": {
  561. "type": "Recreate"
  562. },
  563. "triggers": [
  564. {
  565. "type": "ImageChange",
  566. "imageChangeParams": {
  567. "automatic": true,
  568. "containerNames": [
  569. "${APPLICATION_NAME}-amq"
  570. ],
  571. "from": {
  572. "kind": "ImageStreamTag",
  573. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  574. "name": "jboss-amq-62:1.3"
  575. }
  576. }
  577. },
  578. {
  579. "type": "ConfigChange"
  580. }
  581. ],
  582. "replicas": 1,
  583. "selector": {
  584. "deploymentConfig": "${APPLICATION_NAME}-amq"
  585. },
  586. "template": {
  587. "metadata": {
  588. "name": "${APPLICATION_NAME}-amq",
  589. "labels": {
  590. "deploymentConfig": "${APPLICATION_NAME}-amq",
  591. "application": "${APPLICATION_NAME}"
  592. }
  593. },
  594. "spec": {
  595. "terminationGracePeriodSeconds": 60,
  596. "containers": [
  597. {
  598. "name": "${APPLICATION_NAME}-amq",
  599. "image": "jboss-amq-62",
  600. "imagePullPolicy": "Always",
  601. "readinessProbe": {
  602. "exec": {
  603. "command": [
  604. "/bin/bash",
  605. "-c",
  606. "/opt/amq/bin/readinessProbe.sh"
  607. ]
  608. }
  609. },
  610. "ports": [
  611. {
  612. "name": "amqp",
  613. "containerPort": 5672,
  614. "protocol": "TCP"
  615. },
  616. {
  617. "name": "amqp-ssl",
  618. "containerPort": 5671,
  619. "protocol": "TCP"
  620. },
  621. {
  622. "name": "mqtt",
  623. "containerPort": 1883,
  624. "protocol": "TCP"
  625. },
  626. {
  627. "name": "stomp",
  628. "containerPort": 61613,
  629. "protocol": "TCP"
  630. },
  631. {
  632. "name": "stomp-ssl",
  633. "containerPort": 61612,
  634. "protocol": "TCP"
  635. },
  636. {
  637. "name": "tcp",
  638. "containerPort": 61616,
  639. "protocol": "TCP"
  640. },
  641. {
  642. "name": "tcp-ssl",
  643. "containerPort": 61617,
  644. "protocol": "TCP"
  645. }
  646. ],
  647. "env": [
  648. {
  649. "name": "AMQ_USER",
  650. "value": "${MQ_USERNAME}"
  651. },
  652. {
  653. "name": "AMQ_PASSWORD",
  654. "value": "${MQ_PASSWORD}"
  655. },
  656. {
  657. "name": "AMQ_TRANSPORTS",
  658. "value": "${MQ_PROTOCOL}"
  659. },
  660. {
  661. "name": "AMQ_QUEUES",
  662. "value": "${MQ_QUEUES}"
  663. },
  664. {
  665. "name": "AMQ_TOPICS",
  666. "value": "${MQ_TOPICS}"
  667. },
  668. {
  669. "name": "AMQ_ADMIN_USERNAME",
  670. "value": "${AMQ_ADMIN_USERNAME}"
  671. },
  672. {
  673. "name": "AMQ_ADMIN_PASSWORD",
  674. "value": "${AMQ_ADMIN_PASSWORD}"
  675. }
  676. ]
  677. }
  678. ]
  679. }
  680. }
  681. }
  682. }
  683. ]
  684. }