decisionserver63-amq-s2i.json 28 KB

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