processserver62-amq-postgresql-s2i.json 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "description": "Application template for BPMS Intelligent Process Server 6 AMQ and PostgreSQL applications built using S2I.",
  7. "iconClass": "icon-jboss",
  8. "tags": "processserver,amq,postgresql,javaee,java,database,jboss,xpaas",
  9. "version": "1.3.0"
  10. },
  11. "name": "processserver62-amq-postgresql-s2i"
  12. },
  13. "labels": {
  14. "template": "processserver62-amq-postgresql-s2i",
  15. "xpaas": "1.3.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": "LibraryContainer=org.openshift.quickstarts:processserver-library:1.3.0-SNAPSHOT",
  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": "JAAS LoginContext domain that shall be used to authenticate users when using JMS.",
  51. "name": "KIE_SERVER_DOMAIN",
  52. "value": "other",
  53. "required": false
  54. },
  55. {
  56. "description": "JNDI name of executor queue for JMS.",
  57. "name": "KIE_SERVER_EXECUTOR_JMS_QUEUE",
  58. "value": "queue/KIE.EXECUTOR",
  59. "required": false
  60. },
  61. {
  62. "description": "JNDI name of response queue for JMS.",
  63. "name": "KIE_SERVER_JMS_QUEUES_RESPONSE",
  64. "value": "queue/KIE.SERVER.RESPONSE",
  65. "required": false
  66. },
  67. {
  68. "description": "Hibernate persistence dialect.",
  69. "name": "KIE_SERVER_PERSISTENCE_DIALECT",
  70. "value": "org.hibernate.dialect.PostgreSQL82Dialect",
  71. "required": false
  72. },
  73. {
  74. "description": "The name for the application.",
  75. "name": "APPLICATION_NAME",
  76. "value": "kie-app",
  77. "required": true
  78. },
  79. {
  80. "description": "Custom hostname for http service route. Leave blank for default hostname, e.g.: <application-name>-<project>.<default-domain-suffix>",
  81. "name": "HOSTNAME_HTTP",
  82. "value": "",
  83. "required": false
  84. },
  85. {
  86. "description": "Custom hostname for https service route. Leave blank for default hostname, e.g.: secure-<application-name>-<project>.<default-domain-suffix>",
  87. "name": "HOSTNAME_HTTPS",
  88. "value": "",
  89. "required": false
  90. },
  91. {
  92. "description": "Git source URI for application",
  93. "name": "SOURCE_REPOSITORY_URL",
  94. "value": "https://github.com/jboss-openshift/openshift-quickstarts",
  95. "required": true
  96. },
  97. {
  98. "description": "Git branch/tag reference",
  99. "name": "SOURCE_REPOSITORY_REF",
  100. "value": "master",
  101. "required": false
  102. },
  103. {
  104. "description": "Path within Git project to build; empty for root project directory.",
  105. "name": "CONTEXT_DIR",
  106. "value": "processserver/library",
  107. "required": false
  108. },
  109. {
  110. "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/ExampleDS",
  111. "name": "DB_JNDI",
  112. "value": "java:jboss/datasources/ExampleDS",
  113. "required": false
  114. },
  115. {
  116. "description": "Database name",
  117. "name": "DB_DATABASE",
  118. "value": "root",
  119. "required": true
  120. },
  121. {
  122. "description": "JNDI name for connection factory used by applications to connect to the broker, e.g. java:/JmsXA",
  123. "name": "MQ_JNDI",
  124. "value": "java:/JmsXA",
  125. "required": false
  126. },
  127. {
  128. "description": "Broker protocols to configure, separated by commas. Allowed values are: `openwire`, `amqp`, `stomp` and `mqtt`. Only `openwire` is supported by EAP.",
  129. "name": "MQ_PROTOCOL",
  130. "value": "openwire",
  131. "required": false
  132. },
  133. {
  134. "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.",
  135. "name": "MQ_QUEUES",
  136. "value": "KIE.SERVER.REQUEST,KIE.SERVER.RESPONSE,KIE.EXECUTOR",
  137. "required": false
  138. },
  139. {
  140. "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.",
  141. "name": "MQ_TOPICS",
  142. "value": "",
  143. "required": false
  144. },
  145. {
  146. "description": "The name of the secret containing the keystore file",
  147. "name": "HTTPS_SECRET",
  148. "value": "processserver-app-secret",
  149. "required": false
  150. },
  151. {
  152. "description": "The name of the keystore file within the secret",
  153. "name": "HTTPS_KEYSTORE",
  154. "value": "keystore.jks",
  155. "required": false
  156. },
  157. {
  158. "description": "The name associated with the server certificate",
  159. "name": "HTTPS_NAME",
  160. "value": "jboss",
  161. "required": false
  162. },
  163. {
  164. "description": "The password for the keystore and certificate",
  165. "name": "HTTPS_PASSWORD",
  166. "value": "mykeystorepass",
  167. "required": false
  168. },
  169. {
  170. "description": "Database user name",
  171. "name": "DB_USERNAME",
  172. "from": "user[a-zA-Z0-9]{3}",
  173. "generate": "expression",
  174. "required": true
  175. },
  176. {
  177. "description": "Database user password",
  178. "name": "DB_PASSWORD",
  179. "from": "[a-zA-Z0-9]{8}",
  180. "generate": "expression",
  181. "required": true
  182. },
  183. {
  184. "description": "Sets xa-pool/min-pool-size for the configured datasource.",
  185. "name": "DB_MIN_POOL_SIZE",
  186. "required": false
  187. },
  188. {
  189. "description": "Sets xa-pool/max-pool-size for the configured datasource.",
  190. "name": "DB_MAX_POOL_SIZE",
  191. "required": false
  192. },
  193. {
  194. "description": "Sets transaction-isolation for the configured datasource.",
  195. "name": "DB_TX_ISOLATION",
  196. "required": false
  197. },
  198. {
  199. "description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.",
  200. "name": "POSTGRESQL_MAX_CONNECTIONS",
  201. "required": false
  202. },
  203. {
  204. "description": "Configures how much memory is dedicated to PostgreSQL for caching data.",
  205. "name": "POSTGRESQL_SHARED_BUFFERS",
  206. "required": false
  207. },
  208. {
  209. "description": "User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
  210. "name": "MQ_USERNAME",
  211. "from": "user[a-zA-Z0-9]{3}",
  212. "generate": "expression",
  213. "required": false
  214. },
  215. {
  216. "description": "Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
  217. "name": "MQ_PASSWORD",
  218. "from": "[a-zA-Z0-9]{8}",
  219. "generate": "expression",
  220. "required": false
  221. },
  222. {
  223. "description": "User name for broker admin. If left empty, it will be generated.",
  224. "name": "AMQ_ADMIN_USERNAME",
  225. "from": "user[a-zA-Z0-9]{3}",
  226. "generate": "expression",
  227. "required": true
  228. },
  229. {
  230. "description": "Password for broker admin. If left empty, it will be generated.",
  231. "name": "AMQ_ADMIN_PASSWORD",
  232. "from": "[a-zA-Z0-9]{8}",
  233. "generate": "expression",
  234. "required": true
  235. },
  236. {
  237. "description": "GitHub trigger secret",
  238. "name": "GITHUB_WEBHOOK_SECRET",
  239. "from": "[a-zA-Z0-9]{8}",
  240. "generate": "expression",
  241. "required": true
  242. },
  243. {
  244. "description": "Generic build trigger secret",
  245. "name": "GENERIC_WEBHOOK_SECRET",
  246. "from": "[a-zA-Z0-9]{8}",
  247. "generate": "expression",
  248. "required": true
  249. },
  250. {
  251. "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.",
  252. "name": "IMAGE_STREAM_NAMESPACE",
  253. "value": "openshift",
  254. "required": true
  255. }
  256. ],
  257. "objects": [
  258. {
  259. "kind": "Service",
  260. "apiVersion": "v1",
  261. "spec": {
  262. "ports": [
  263. {
  264. "port": 8080,
  265. "targetPort": 8080
  266. }
  267. ],
  268. "selector": {
  269. "deploymentConfig": "${APPLICATION_NAME}"
  270. }
  271. },
  272. "metadata": {
  273. "name": "${APPLICATION_NAME}",
  274. "labels": {
  275. "application": "${APPLICATION_NAME}"
  276. },
  277. "annotations": {
  278. "description": "The web server's http port."
  279. }
  280. }
  281. },
  282. {
  283. "kind": "Service",
  284. "apiVersion": "v1",
  285. "spec": {
  286. "ports": [
  287. {
  288. "port": 8443,
  289. "targetPort": 8443
  290. }
  291. ],
  292. "selector": {
  293. "deploymentConfig": "${APPLICATION_NAME}"
  294. }
  295. },
  296. "metadata": {
  297. "name": "secure-${APPLICATION_NAME}",
  298. "labels": {
  299. "application": "${APPLICATION_NAME}"
  300. },
  301. "annotations": {
  302. "description": "The web server's https port."
  303. }
  304. }
  305. },
  306. {
  307. "kind": "Service",
  308. "apiVersion": "v1",
  309. "spec": {
  310. "ports": [
  311. {
  312. "port": 5432,
  313. "targetPort": 5432
  314. }
  315. ],
  316. "selector": {
  317. "deploymentConfig": "${APPLICATION_NAME}-postgresql"
  318. }
  319. },
  320. "metadata": {
  321. "name": "${APPLICATION_NAME}-postgresql",
  322. "labels": {
  323. "application": "${APPLICATION_NAME}"
  324. },
  325. "annotations": {
  326. "description": "The database server's port."
  327. }
  328. }
  329. },
  330. {
  331. "kind": "Service",
  332. "apiVersion": "v1",
  333. "spec": {
  334. "ports": [
  335. {
  336. "port": 61616,
  337. "targetPort": 61616
  338. }
  339. ],
  340. "selector": {
  341. "deploymentConfig": "${APPLICATION_NAME}-amq"
  342. }
  343. },
  344. "metadata": {
  345. "name": "${APPLICATION_NAME}-amq-tcp",
  346. "labels": {
  347. "application": "${APPLICATION_NAME}"
  348. },
  349. "annotations": {
  350. "description": "The broker's OpenWire port."
  351. }
  352. }
  353. },
  354. {
  355. "kind": "Route",
  356. "apiVersion": "v1",
  357. "id": "${APPLICATION_NAME}-http",
  358. "metadata": {
  359. "name": "${APPLICATION_NAME}",
  360. "labels": {
  361. "application": "${APPLICATION_NAME}"
  362. },
  363. "annotations": {
  364. "description": "Route for application's http service."
  365. }
  366. },
  367. "spec": {
  368. "host": "${HOSTNAME_HTTP}",
  369. "to": {
  370. "name": "${APPLICATION_NAME}"
  371. }
  372. }
  373. },
  374. {
  375. "kind": "Route",
  376. "apiVersion": "v1",
  377. "id": "${APPLICATION_NAME}-https",
  378. "metadata": {
  379. "name": "secure-${APPLICATION_NAME}",
  380. "labels": {
  381. "application": "${APPLICATION_NAME}"
  382. },
  383. "annotations": {
  384. "description": "Route for application's https service."
  385. }
  386. },
  387. "spec": {
  388. "host": "${HOSTNAME_HTTPS}",
  389. "to": {
  390. "name": "secure-${APPLICATION_NAME}"
  391. },
  392. "tls": {
  393. "termination": "passthrough"
  394. }
  395. }
  396. },
  397. {
  398. "kind": "ImageStream",
  399. "apiVersion": "v1",
  400. "metadata": {
  401. "name": "${APPLICATION_NAME}",
  402. "labels": {
  403. "application": "${APPLICATION_NAME}"
  404. }
  405. }
  406. },
  407. {
  408. "kind": "BuildConfig",
  409. "apiVersion": "v1",
  410. "metadata": {
  411. "name": "${APPLICATION_NAME}",
  412. "labels": {
  413. "application": "${APPLICATION_NAME}"
  414. }
  415. },
  416. "spec": {
  417. "source": {
  418. "type": "Git",
  419. "git": {
  420. "uri": "${SOURCE_REPOSITORY_URL}",
  421. "ref": "${SOURCE_REPOSITORY_REF}"
  422. },
  423. "contextDir": "${CONTEXT_DIR}"
  424. },
  425. "strategy": {
  426. "type": "Source",
  427. "sourceStrategy": {
  428. "env": [
  429. {
  430. "name": "KIE_CONTAINER_DEPLOYMENT",
  431. "value": "${KIE_CONTAINER_DEPLOYMENT}"
  432. }
  433. ],
  434. "forcePull": true,
  435. "from": {
  436. "kind": "ImageStreamTag",
  437. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  438. "name": "jboss-processserver62-openshift:1.3"
  439. }
  440. }
  441. },
  442. "output": {
  443. "to": {
  444. "kind": "ImageStreamTag",
  445. "name": "${APPLICATION_NAME}:latest"
  446. }
  447. },
  448. "triggers": [
  449. {
  450. "type": "GitHub",
  451. "github": {
  452. "secret": "${GITHUB_WEBHOOK_SECRET}"
  453. }
  454. },
  455. {
  456. "type": "Generic",
  457. "generic": {
  458. "secret": "${GENERIC_WEBHOOK_SECRET}"
  459. }
  460. },
  461. {
  462. "type": "ImageChange",
  463. "imageChange": {}
  464. },
  465. {
  466. "type": "ConfigChange"
  467. }
  468. ]
  469. }
  470. },
  471. {
  472. "kind": "DeploymentConfig",
  473. "apiVersion": "v1",
  474. "metadata": {
  475. "name": "${APPLICATION_NAME}",
  476. "labels": {
  477. "application": "${APPLICATION_NAME}"
  478. }
  479. },
  480. "spec": {
  481. "strategy": {
  482. "type": "Recreate"
  483. },
  484. "triggers": [
  485. {
  486. "type": "ImageChange",
  487. "imageChangeParams": {
  488. "automatic": true,
  489. "containerNames": [
  490. "${APPLICATION_NAME}"
  491. ],
  492. "from": {
  493. "kind": "ImageStream",
  494. "name": "${APPLICATION_NAME}"
  495. }
  496. }
  497. },
  498. {
  499. "type": "ConfigChange"
  500. }
  501. ],
  502. "replicas": 1,
  503. "selector": {
  504. "deploymentConfig": "${APPLICATION_NAME}"
  505. },
  506. "template": {
  507. "metadata": {
  508. "name": "${APPLICATION_NAME}",
  509. "labels": {
  510. "deploymentConfig": "${APPLICATION_NAME}",
  511. "application": "${APPLICATION_NAME}"
  512. }
  513. },
  514. "spec": {
  515. "serviceAccount": "processserver-service-account",
  516. "terminationGracePeriodSeconds": 60,
  517. "containers": [
  518. {
  519. "name": "${APPLICATION_NAME}",
  520. "image": "${APPLICATION_NAME}",
  521. "imagePullPolicy": "Always",
  522. "volumeMounts": [
  523. {
  524. "name": "processserver-keystore-volume",
  525. "mountPath": "/etc/processserver-secret-volume",
  526. "readOnly": true
  527. }
  528. ],
  529. "livenessProbe": {
  530. "exec": {
  531. "command": [
  532. "/bin/bash",
  533. "-c",
  534. "/opt/eap/bin/livenessProbe.sh"
  535. ]
  536. }
  537. },
  538. "readinessProbe": {
  539. "exec": {
  540. "command": [
  541. "/bin/bash",
  542. "-c",
  543. "/opt/eap/bin/readinessProbe.sh"
  544. ]
  545. }
  546. },
  547. "ports": [
  548. {
  549. "name": "jolokia",
  550. "containerPort": 8778,
  551. "protocol": "TCP"
  552. },
  553. {
  554. "name": "http",
  555. "containerPort": 8080,
  556. "protocol": "TCP"
  557. },
  558. {
  559. "name": "https",
  560. "containerPort": 8443,
  561. "protocol": "TCP"
  562. }
  563. ],
  564. "env": [
  565. {
  566. "name": "KIE_CONTAINER_DEPLOYMENT",
  567. "value": "${KIE_CONTAINER_DEPLOYMENT}"
  568. },
  569. {
  570. "name": "KIE_SERVER_PROTOCOL",
  571. "value": "${KIE_SERVER_PROTOCOL}"
  572. },
  573. {
  574. "name": "KIE_SERVER_PORT",
  575. "value": "${KIE_SERVER_PORT}"
  576. },
  577. {
  578. "name": "KIE_SERVER_USER",
  579. "value": "${KIE_SERVER_USER}"
  580. },
  581. {
  582. "name": "KIE_SERVER_PASSWORD",
  583. "value": "${KIE_SERVER_PASSWORD}"
  584. },
  585. {
  586. "name": "KIE_SERVER_DOMAIN",
  587. "value": "${KIE_SERVER_DOMAIN}"
  588. },
  589. {
  590. "name": "KIE_SERVER_EXECUTOR_JMS_QUEUE",
  591. "value": "${KIE_SERVER_EXECUTOR_JMS_QUEUE}"
  592. },
  593. {
  594. "name": "KIE_SERVER_JMS_QUEUES_RESPONSE",
  595. "value": "${KIE_SERVER_JMS_QUEUES_RESPONSE}"
  596. },
  597. {
  598. "name": "MQ_SERVICE_PREFIX_MAPPING",
  599. "value": "${APPLICATION_NAME}-amq=MQ"
  600. },
  601. {
  602. "name": "MQ_JNDI",
  603. "value": "${MQ_JNDI}"
  604. },
  605. {
  606. "name": "MQ_USERNAME",
  607. "value": "${MQ_USERNAME}"
  608. },
  609. {
  610. "name": "MQ_PASSWORD",
  611. "value": "${MQ_PASSWORD}"
  612. },
  613. {
  614. "name": "MQ_PROTOCOL",
  615. "value": "tcp"
  616. },
  617. {
  618. "name": "MQ_QUEUES",
  619. "value": "${MQ_QUEUES}"
  620. },
  621. {
  622. "name": "MQ_TOPICS",
  623. "value": "${MQ_TOPICS}"
  624. },
  625. {
  626. "name": "KIE_SERVER_PERSISTENCE_DIALECT",
  627. "value": "${KIE_SERVER_PERSISTENCE_DIALECT}"
  628. },
  629. {
  630. "name": "DB_SERVICE_PREFIX_MAPPING",
  631. "value": "${APPLICATION_NAME}-postgresql=DB"
  632. },
  633. {
  634. "name": "DB_JNDI",
  635. "value": "${DB_JNDI}"
  636. },
  637. {
  638. "name": "DB_USERNAME",
  639. "value": "${DB_USERNAME}"
  640. },
  641. {
  642. "name": "DB_PASSWORD",
  643. "value": "${DB_PASSWORD}"
  644. },
  645. {
  646. "name": "DB_DATABASE",
  647. "value": "${DB_DATABASE}"
  648. },
  649. {
  650. "name": "TX_DATABASE_PREFIX_MAPPING",
  651. "value": "${APPLICATION_NAME}-postgresql=DB"
  652. },
  653. {
  654. "name": "DB_MIN_POOL_SIZE",
  655. "value": "${DB_MIN_POOL_SIZE}"
  656. },
  657. {
  658. "name": "DB_MAX_POOL_SIZE",
  659. "value": "${DB_MAX_POOL_SIZE}"
  660. },
  661. {
  662. "name": "DB_TX_ISOLATION",
  663. "value": "${DB_TX_ISOLATION}"
  664. },
  665. {
  666. "name": "HTTPS_KEYSTORE_DIR",
  667. "value": "/etc/processserver-secret-volume"
  668. },
  669. {
  670. "name": "HTTPS_KEYSTORE",
  671. "value": "${HTTPS_KEYSTORE}"
  672. },
  673. {
  674. "name": "HTTPS_NAME",
  675. "value": "${HTTPS_NAME}"
  676. },
  677. {
  678. "name": "HTTPS_PASSWORD",
  679. "value": "${HTTPS_PASSWORD}"
  680. }
  681. ]
  682. }
  683. ],
  684. "volumes": [
  685. {
  686. "name": "processserver-keystore-volume",
  687. "secret": {
  688. "secretName": "${HTTPS_SECRET}"
  689. }
  690. }
  691. ]
  692. }
  693. }
  694. }
  695. },
  696. {
  697. "kind": "DeploymentConfig",
  698. "apiVersion": "v1",
  699. "metadata": {
  700. "name": "${APPLICATION_NAME}-postgresql",
  701. "labels": {
  702. "application": "${APPLICATION_NAME}"
  703. }
  704. },
  705. "spec": {
  706. "strategy": {
  707. "type": "Recreate"
  708. },
  709. "triggers": [
  710. {
  711. "type": "ImageChange",
  712. "imageChangeParams": {
  713. "automatic": true,
  714. "containerNames": [
  715. "${APPLICATION_NAME}-postgresql"
  716. ],
  717. "from": {
  718. "kind": "ImageStreamTag",
  719. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  720. "name": "postgresql:latest"
  721. }
  722. }
  723. },
  724. {
  725. "type": "ConfigChange"
  726. }
  727. ],
  728. "replicas": 1,
  729. "selector": {
  730. "deploymentConfig": "${APPLICATION_NAME}-postgresql"
  731. },
  732. "template": {
  733. "metadata": {
  734. "name": "${APPLICATION_NAME}-postgresql",
  735. "labels": {
  736. "deploymentConfig": "${APPLICATION_NAME}-postgresql",
  737. "application": "${APPLICATION_NAME}"
  738. }
  739. },
  740. "spec": {
  741. "terminationGracePeriodSeconds": 60,
  742. "containers": [
  743. {
  744. "name": "${APPLICATION_NAME}-postgresql",
  745. "image": "postgresql",
  746. "imagePullPolicy": "Always",
  747. "ports": [
  748. {
  749. "containerPort": 5432,
  750. "protocol": "TCP"
  751. }
  752. ],
  753. "env": [
  754. {
  755. "name": "POSTGRESQL_USER",
  756. "value": "${DB_USERNAME}"
  757. },
  758. {
  759. "name": "POSTGRESQL_PASSWORD",
  760. "value": "${DB_PASSWORD}"
  761. },
  762. {
  763. "name": "POSTGRESQL_DATABASE",
  764. "value": "${DB_DATABASE}"
  765. },
  766. {
  767. "name": "POSTGRESQL_MAX_CONNECTIONS",
  768. "value": "${POSTGRESQL_MAX_CONNECTIONS}"
  769. },
  770. {
  771. "name": "POSTGRESQL_SHARED_BUFFERS",
  772. "value": "${POSTGRESQL_SHARED_BUFFERS}"
  773. }
  774. ]
  775. }
  776. ]
  777. }
  778. }
  779. }
  780. },
  781. {
  782. "kind": "DeploymentConfig",
  783. "apiVersion": "v1",
  784. "metadata": {
  785. "name": "${APPLICATION_NAME}-amq",
  786. "labels": {
  787. "application": "${APPLICATION_NAME}"
  788. }
  789. },
  790. "spec": {
  791. "strategy": {
  792. "type": "Recreate"
  793. },
  794. "triggers": [
  795. {
  796. "type": "ImageChange",
  797. "imageChangeParams": {
  798. "automatic": true,
  799. "containerNames": [
  800. "${APPLICATION_NAME}-amq"
  801. ],
  802. "from": {
  803. "kind": "ImageStreamTag",
  804. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  805. "name": "jboss-amq-62:1.2"
  806. }
  807. }
  808. },
  809. {
  810. "type": "ConfigChange"
  811. }
  812. ],
  813. "replicas": 1,
  814. "selector": {
  815. "deploymentConfig": "${APPLICATION_NAME}-amq"
  816. },
  817. "template": {
  818. "metadata": {
  819. "name": "${APPLICATION_NAME}-amq",
  820. "labels": {
  821. "deploymentConfig": "${APPLICATION_NAME}-amq",
  822. "application": "${APPLICATION_NAME}"
  823. }
  824. },
  825. "spec": {
  826. "terminationGracePeriodSeconds": 60,
  827. "containers": [
  828. {
  829. "name": "${APPLICATION_NAME}-amq",
  830. "image": "jboss-amq-62",
  831. "imagePullPolicy": "Always",
  832. "readinessProbe": {
  833. "exec": {
  834. "command": [
  835. "/bin/bash",
  836. "-c",
  837. "/opt/amq/bin/readinessProbe.sh"
  838. ]
  839. }
  840. },
  841. "ports": [
  842. {
  843. "name": "amqp",
  844. "containerPort": 5672,
  845. "protocol": "TCP"
  846. },
  847. {
  848. "name": "amqp-ssl",
  849. "containerPort": 5671,
  850. "protocol": "TCP"
  851. },
  852. {
  853. "name": "mqtt",
  854. "containerPort": 1883,
  855. "protocol": "TCP"
  856. },
  857. {
  858. "name": "stomp",
  859. "containerPort": 61613,
  860. "protocol": "TCP"
  861. },
  862. {
  863. "name": "stomp-ssl",
  864. "containerPort": 61612,
  865. "protocol": "TCP"
  866. },
  867. {
  868. "name": "tcp",
  869. "containerPort": 61616,
  870. "protocol": "TCP"
  871. },
  872. {
  873. "name": "tcp-ssl",
  874. "containerPort": 61617,
  875. "protocol": "TCP"
  876. }
  877. ],
  878. "env": [
  879. {
  880. "name": "AMQ_USER",
  881. "value": "${MQ_USERNAME}"
  882. },
  883. {
  884. "name": "AMQ_PASSWORD",
  885. "value": "${MQ_PASSWORD}"
  886. },
  887. {
  888. "name": "AMQ_TRANSPORTS",
  889. "value": "${MQ_PROTOCOL}"
  890. },
  891. {
  892. "name": "AMQ_QUEUES",
  893. "value": "${MQ_QUEUES}"
  894. },
  895. {
  896. "name": "AMQ_TOPICS",
  897. "value": "${MQ_TOPICS}"
  898. },
  899. {
  900. "name": "AMQ_ADMIN_USERNAME",
  901. "value": "${AMQ_ADMIN_USERNAME}"
  902. },
  903. {
  904. "name": "AMQ_ADMIN_PASSWORD",
  905. "value": "${AMQ_ADMIN_PASSWORD}"
  906. }
  907. ]
  908. }
  909. ]
  910. }
  911. }
  912. }
  913. }
  914. ]
  915. }