processserver63-postgresql-s2i.json 27 KB

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