processserver63-mysql-s2i.json 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  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 MySQL applications built using S2I.",
  7. "iconClass": "icon-jboss",
  8. "tags": "processserver,mysql,javaee,java,database,jboss,xpaas",
  9. "version": "1.3.3"
  10. },
  11. "name": "processserver63-mysql-s2i"
  12. },
  13. "labels": {
  14. "template": "processserver63-mysql-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.MySQL5Dialect",
  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": "Sets how the table names are stored and compared.",
  176. "name": "MYSQL_LOWER_CASE_TABLE_NAMES",
  177. "required": false
  178. },
  179. {
  180. "description": "The maximum permitted number of simultaneous client connections.",
  181. "name": "MYSQL_MAX_CONNECTIONS",
  182. "required": false
  183. },
  184. {
  185. "description": "The minimum length of the word to be included in a FULLTEXT index.",
  186. "name": "MYSQL_FT_MIN_WORD_LEN",
  187. "required": false
  188. },
  189. {
  190. "description": "The maximum length of the word to be included in a FULLTEXT index.",
  191. "name": "MYSQL_FT_MAX_WORD_LEN",
  192. "required": false
  193. },
  194. {
  195. "description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.",
  196. "name": "MYSQL_AIO",
  197. "required": false
  198. },
  199. {
  200. "description": "HornetQ cluster admin password",
  201. "name": "HORNETQ_CLUSTER_PASSWORD",
  202. "from": "[a-zA-Z0-9]{8}",
  203. "generate": "expression",
  204. "required": true
  205. },
  206. {
  207. "description": "GitHub trigger secret",
  208. "name": "GITHUB_WEBHOOK_SECRET",
  209. "from": "[a-zA-Z0-9]{8}",
  210. "generate": "expression",
  211. "required": true
  212. },
  213. {
  214. "description": "Generic build trigger secret",
  215. "name": "GENERIC_WEBHOOK_SECRET",
  216. "from": "[a-zA-Z0-9]{8}",
  217. "generate": "expression",
  218. "required": true
  219. },
  220. {
  221. "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.",
  222. "name": "IMAGE_STREAM_NAMESPACE",
  223. "value": "openshift",
  224. "required": true
  225. }
  226. ],
  227. "objects": [
  228. {
  229. "kind": "Service",
  230. "apiVersion": "v1",
  231. "spec": {
  232. "ports": [
  233. {
  234. "port": 8080,
  235. "targetPort": 8080
  236. }
  237. ],
  238. "selector": {
  239. "deploymentConfig": "${APPLICATION_NAME}"
  240. }
  241. },
  242. "metadata": {
  243. "name": "${APPLICATION_NAME}",
  244. "labels": {
  245. "application": "${APPLICATION_NAME}"
  246. },
  247. "annotations": {
  248. "description": "The web server's http port."
  249. }
  250. }
  251. },
  252. {
  253. "kind": "Service",
  254. "apiVersion": "v1",
  255. "spec": {
  256. "ports": [
  257. {
  258. "port": 8443,
  259. "targetPort": 8443
  260. }
  261. ],
  262. "selector": {
  263. "deploymentConfig": "${APPLICATION_NAME}"
  264. }
  265. },
  266. "metadata": {
  267. "name": "secure-${APPLICATION_NAME}",
  268. "labels": {
  269. "application": "${APPLICATION_NAME}"
  270. },
  271. "annotations": {
  272. "description": "The web server's https port."
  273. }
  274. }
  275. },
  276. {
  277. "kind": "Service",
  278. "apiVersion": "v1",
  279. "spec": {
  280. "ports": [
  281. {
  282. "port": 3306,
  283. "targetPort": 3306
  284. }
  285. ],
  286. "selector": {
  287. "deploymentConfig": "${APPLICATION_NAME}-mysql"
  288. }
  289. },
  290. "metadata": {
  291. "name": "${APPLICATION_NAME}-mysql",
  292. "labels": {
  293. "application": "${APPLICATION_NAME}"
  294. },
  295. "annotations": {
  296. "description": "The database server's port."
  297. }
  298. }
  299. },
  300. {
  301. "kind": "Route",
  302. "apiVersion": "v1",
  303. "id": "${APPLICATION_NAME}-http",
  304. "metadata": {
  305. "name": "${APPLICATION_NAME}",
  306. "labels": {
  307. "application": "${APPLICATION_NAME}"
  308. },
  309. "annotations": {
  310. "description": "Route for application's http service."
  311. }
  312. },
  313. "spec": {
  314. "host": "${HOSTNAME_HTTP}",
  315. "to": {
  316. "name": "${APPLICATION_NAME}"
  317. }
  318. }
  319. },
  320. {
  321. "kind": "Route",
  322. "apiVersion": "v1",
  323. "id": "${APPLICATION_NAME}-https",
  324. "metadata": {
  325. "name": "secure-${APPLICATION_NAME}",
  326. "labels": {
  327. "application": "${APPLICATION_NAME}"
  328. },
  329. "annotations": {
  330. "description": "Route for application's https service."
  331. }
  332. },
  333. "spec": {
  334. "host": "${HOSTNAME_HTTPS}",
  335. "to": {
  336. "name": "secure-${APPLICATION_NAME}"
  337. },
  338. "tls": {
  339. "termination": "passthrough"
  340. }
  341. }
  342. },
  343. {
  344. "kind": "ImageStream",
  345. "apiVersion": "v1",
  346. "metadata": {
  347. "name": "${APPLICATION_NAME}",
  348. "labels": {
  349. "application": "${APPLICATION_NAME}"
  350. }
  351. }
  352. },
  353. {
  354. "kind": "BuildConfig",
  355. "apiVersion": "v1",
  356. "metadata": {
  357. "name": "${APPLICATION_NAME}",
  358. "labels": {
  359. "application": "${APPLICATION_NAME}"
  360. }
  361. },
  362. "spec": {
  363. "source": {
  364. "type": "Git",
  365. "git": {
  366. "uri": "${SOURCE_REPOSITORY_URL}",
  367. "ref": "${SOURCE_REPOSITORY_REF}"
  368. },
  369. "contextDir": "${CONTEXT_DIR}"
  370. },
  371. "strategy": {
  372. "type": "Source",
  373. "sourceStrategy": {
  374. "env": [
  375. {
  376. "name": "KIE_CONTAINER_DEPLOYMENT",
  377. "value": "${KIE_CONTAINER_DEPLOYMENT}"
  378. }
  379. ],
  380. "forcePull": true,
  381. "from": {
  382. "kind": "ImageStreamTag",
  383. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  384. "name": "jboss-processserver63-openshift:1.3"
  385. }
  386. }
  387. },
  388. "output": {
  389. "to": {
  390. "kind": "ImageStreamTag",
  391. "name": "${APPLICATION_NAME}:latest"
  392. }
  393. },
  394. "triggers": [
  395. {
  396. "type": "GitHub",
  397. "github": {
  398. "secret": "${GITHUB_WEBHOOK_SECRET}"
  399. }
  400. },
  401. {
  402. "type": "Generic",
  403. "generic": {
  404. "secret": "${GENERIC_WEBHOOK_SECRET}"
  405. }
  406. },
  407. {
  408. "type": "ImageChange",
  409. "imageChange": {}
  410. },
  411. {
  412. "type": "ConfigChange"
  413. }
  414. ]
  415. }
  416. },
  417. {
  418. "kind": "DeploymentConfig",
  419. "apiVersion": "v1",
  420. "metadata": {
  421. "name": "${APPLICATION_NAME}",
  422. "labels": {
  423. "application": "${APPLICATION_NAME}"
  424. }
  425. },
  426. "spec": {
  427. "strategy": {
  428. "type": "Recreate"
  429. },
  430. "triggers": [
  431. {
  432. "type": "ImageChange",
  433. "imageChangeParams": {
  434. "automatic": true,
  435. "containerNames": [
  436. "${APPLICATION_NAME}"
  437. ],
  438. "from": {
  439. "kind": "ImageStream",
  440. "name": "${APPLICATION_NAME}"
  441. }
  442. }
  443. },
  444. {
  445. "type": "ConfigChange"
  446. }
  447. ],
  448. "replicas": 1,
  449. "selector": {
  450. "deploymentConfig": "${APPLICATION_NAME}"
  451. },
  452. "template": {
  453. "metadata": {
  454. "name": "${APPLICATION_NAME}",
  455. "labels": {
  456. "deploymentConfig": "${APPLICATION_NAME}",
  457. "application": "${APPLICATION_NAME}"
  458. }
  459. },
  460. "spec": {
  461. "serviceAccountName": "processserver-service-account",
  462. "terminationGracePeriodSeconds": 60,
  463. "containers": [
  464. {
  465. "name": "${APPLICATION_NAME}",
  466. "image": "${APPLICATION_NAME}",
  467. "imagePullPolicy": "Always",
  468. "volumeMounts": [
  469. {
  470. "name": "processserver-keystore-volume",
  471. "mountPath": "/etc/processserver-secret-volume",
  472. "readOnly": true
  473. }
  474. ],
  475. "livenessProbe": {
  476. "exec": {
  477. "command": [
  478. "/bin/bash",
  479. "-c",
  480. "/opt/eap/bin/livenessProbe.sh"
  481. ]
  482. }
  483. },
  484. "readinessProbe": {
  485. "exec": {
  486. "command": [
  487. "/bin/bash",
  488. "-c",
  489. "/opt/eap/bin/readinessProbe.sh"
  490. ]
  491. }
  492. },
  493. "ports": [
  494. {
  495. "name": "jolokia",
  496. "containerPort": 8778,
  497. "protocol": "TCP"
  498. },
  499. {
  500. "name": "http",
  501. "containerPort": 8080,
  502. "protocol": "TCP"
  503. },
  504. {
  505. "name": "https",
  506. "containerPort": 8443,
  507. "protocol": "TCP"
  508. }
  509. ],
  510. "env": [
  511. {
  512. "name": "KIE_CONTAINER_DEPLOYMENT",
  513. "value": "${KIE_CONTAINER_DEPLOYMENT}"
  514. },
  515. {
  516. "name": "KIE_SERVER_PROTOCOL",
  517. "value": "${KIE_SERVER_PROTOCOL}"
  518. },
  519. {
  520. "name": "KIE_SERVER_PORT",
  521. "value": "${KIE_SERVER_PORT}"
  522. },
  523. {
  524. "name": "KIE_SERVER_USER",
  525. "value": "${KIE_SERVER_USER}"
  526. },
  527. {
  528. "name": "KIE_SERVER_PASSWORD",
  529. "value": "${KIE_SERVER_PASSWORD}"
  530. },
  531. {
  532. "name": "KIE_SERVER_DOMAIN",
  533. "value": "${KIE_SERVER_DOMAIN}"
  534. },
  535. {
  536. "name": "KIE_SERVER_PERSISTENCE_DIALECT",
  537. "value": "${KIE_SERVER_PERSISTENCE_DIALECT}"
  538. },
  539. {
  540. "name": "DB_SERVICE_PREFIX_MAPPING",
  541. "value": "${APPLICATION_NAME}-mysql=DB"
  542. },
  543. {
  544. "name": "DB_JNDI",
  545. "value": "${DB_JNDI}"
  546. },
  547. {
  548. "name": "DB_USERNAME",
  549. "value": "${DB_USERNAME}"
  550. },
  551. {
  552. "name": "DB_PASSWORD",
  553. "value": "${DB_PASSWORD}"
  554. },
  555. {
  556. "name": "DB_DATABASE",
  557. "value": "${DB_DATABASE}"
  558. },
  559. {
  560. "name": "TX_DATABASE_PREFIX_MAPPING",
  561. "value": "${APPLICATION_NAME}-mysql=DB"
  562. },
  563. {
  564. "name": "DB_MIN_POOL_SIZE",
  565. "value": "${DB_MIN_POOL_SIZE}"
  566. },
  567. {
  568. "name": "DB_MAX_POOL_SIZE",
  569. "value": "${DB_MAX_POOL_SIZE}"
  570. },
  571. {
  572. "name": "DB_TX_ISOLATION",
  573. "value": "${DB_TX_ISOLATION}"
  574. },
  575. {
  576. "name": "HTTPS_KEYSTORE_DIR",
  577. "value": "/etc/processserver-secret-volume"
  578. },
  579. {
  580. "name": "HTTPS_KEYSTORE",
  581. "value": "${HTTPS_KEYSTORE}"
  582. },
  583. {
  584. "name": "HTTPS_NAME",
  585. "value": "${HTTPS_NAME}"
  586. },
  587. {
  588. "name": "HTTPS_PASSWORD",
  589. "value": "${HTTPS_PASSWORD}"
  590. },
  591. {
  592. "name": "HORNETQ_CLUSTER_PASSWORD",
  593. "value": "${HORNETQ_CLUSTER_PASSWORD}"
  594. },
  595. {
  596. "name": "HORNETQ_QUEUES",
  597. "value": "${HORNETQ_QUEUES}"
  598. },
  599. {
  600. "name": "HORNETQ_TOPICS",
  601. "value": "${HORNETQ_TOPICS}"
  602. }
  603. ]
  604. }
  605. ],
  606. "volumes": [
  607. {
  608. "name": "processserver-keystore-volume",
  609. "secret": {
  610. "secretName": "${HTTPS_SECRET}"
  611. }
  612. }
  613. ]
  614. }
  615. }
  616. }
  617. },
  618. {
  619. "kind": "DeploymentConfig",
  620. "apiVersion": "v1",
  621. "metadata": {
  622. "name": "${APPLICATION_NAME}-mysql",
  623. "labels": {
  624. "application": "${APPLICATION_NAME}"
  625. }
  626. },
  627. "spec": {
  628. "strategy": {
  629. "type": "Recreate"
  630. },
  631. "triggers": [
  632. {
  633. "type": "ImageChange",
  634. "imageChangeParams": {
  635. "automatic": true,
  636. "containerNames": [
  637. "${APPLICATION_NAME}-mysql"
  638. ],
  639. "from": {
  640. "kind": "ImageStreamTag",
  641. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  642. "name": "mysql:latest"
  643. }
  644. }
  645. },
  646. {
  647. "type": "ConfigChange"
  648. }
  649. ],
  650. "replicas": 1,
  651. "selector": {
  652. "deploymentConfig": "${APPLICATION_NAME}-mysql"
  653. },
  654. "template": {
  655. "metadata": {
  656. "name": "${APPLICATION_NAME}-mysql",
  657. "labels": {
  658. "deploymentConfig": "${APPLICATION_NAME}-mysql",
  659. "application": "${APPLICATION_NAME}"
  660. }
  661. },
  662. "spec": {
  663. "terminationGracePeriodSeconds": 60,
  664. "containers": [
  665. {
  666. "name": "${APPLICATION_NAME}-mysql",
  667. "image": "mysql",
  668. "imagePullPolicy": "Always",
  669. "ports": [
  670. {
  671. "containerPort": 3306,
  672. "protocol": "TCP"
  673. }
  674. ],
  675. "env": [
  676. {
  677. "name": "MYSQL_USER",
  678. "value": "${DB_USERNAME}"
  679. },
  680. {
  681. "name": "MYSQL_PASSWORD",
  682. "value": "${DB_PASSWORD}"
  683. },
  684. {
  685. "name": "MYSQL_DATABASE",
  686. "value": "${DB_DATABASE}"
  687. },
  688. {
  689. "name": "MYSQL_LOWER_CASE_TABLE_NAMES",
  690. "value": "${MYSQL_LOWER_CASE_TABLE_NAMES}"
  691. },
  692. {
  693. "name": "MYSQL_MAX_CONNECTIONS",
  694. "value": "${MYSQL_MAX_CONNECTIONS}"
  695. },
  696. {
  697. "name": "MYSQL_FT_MIN_WORD_LEN",
  698. "value": "${MYSQL_FT_MIN_WORD_LEN}"
  699. },
  700. {
  701. "name": "MYSQL_FT_MAX_WORD_LEN",
  702. "value": "${MYSQL_FT_MAX_WORD_LEN}"
  703. },
  704. {
  705. "name": "MYSQL_AIO",
  706. "value": "${MYSQL_AIO}"
  707. }
  708. ]
  709. }
  710. ]
  711. }
  712. }
  713. }
  714. }
  715. ]
  716. }