eap64-mysql-persistent-s2i.json 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "iconClass": "icon-eap",
  7. "tags": "eap,javaee,java,jboss",
  8. "version": "1.4.14",
  9. "openshift.io/display-name": "JBoss EAP 6.4 + MySQL (with https)",
  10. "openshift.io/provider-display-name": "Red Hat, Inc.",
  11. "description": "An example EAP 6 application with a MySQL database. For more information about using this template, see https://github.com/jboss-openshift/application-templates.",
  12. "template.openshift.io/long-description": "This template defines resources needed to develop Red Hat Enterprise Application Server 6.4 based application, including a build configuration, application deployment configuration, database deployment configuration for MySQL using persistence and secure communication using https.",
  13. "template.openshift.io/documentation-url": "https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/",
  14. "template.openshift.io/support-url": "https://access.redhat.com"
  15. },
  16. "name": "eap64-mysql-persistent-s2i"
  17. },
  18. "labels": {
  19. "template": "eap64-mysql-persistent-s2i",
  20. "xpaas": "1.4.14"
  21. },
  22. "message": "A new EAP 6 and MySQL persistent based application with SSL support has been created in your project. The username/password for accessing the MySQL database \"${DB_DATABASE}\" is ${DB_USERNAME}/${DB_PASSWORD}. Please be sure to create the following secrets: \"${HTTPS_SECRET}\" containing the ${HTTPS_KEYSTORE} file used for serving secure content; \"${JGROUPS_ENCRYPT_SECRET}\" containing the ${JGROUPS_ENCRYPT_KEYSTORE} file used for securing JGroups communications.",
  23. "parameters": [
  24. {
  25. "displayName": "Application Name",
  26. "description": "The name for the application.",
  27. "name": "APPLICATION_NAME",
  28. "value": "eap-app",
  29. "required": true
  30. },
  31. {
  32. "displayName": "Custom http Route Hostname",
  33. "description": "Custom hostname for http service route. Leave blank for default hostname, e.g.: <application-name>-<project>.<default-domain-suffix>",
  34. "name": "HOSTNAME_HTTP",
  35. "value": "",
  36. "required": false
  37. },
  38. {
  39. "displayName": "Custom https Route Hostname",
  40. "description": "Custom hostname for https service route. Leave blank for default hostname, e.g.: secure-<application-name>-<project>.<default-domain-suffix>",
  41. "name": "HOSTNAME_HTTPS",
  42. "value": "",
  43. "required": false
  44. },
  45. {
  46. "displayName": "Git Repository URL",
  47. "description": "Git source URI for application",
  48. "name": "SOURCE_REPOSITORY_URL",
  49. "value": "https://github.com/jboss-openshift/openshift-quickstarts",
  50. "required": true
  51. },
  52. {
  53. "displayName": "Git Reference",
  54. "description": "Git branch/tag reference",
  55. "name": "SOURCE_REPOSITORY_REF",
  56. "value": "1.2",
  57. "required": false
  58. },
  59. {
  60. "displayName": "Context Directory",
  61. "description": "Path within Git project to build; empty for root project directory.",
  62. "name": "CONTEXT_DIR",
  63. "value": "todolist/todolist-jdbc",
  64. "required": false
  65. },
  66. {
  67. "displayName": "Database JNDI Name",
  68. "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mysql",
  69. "name": "DB_JNDI",
  70. "value": "java:jboss/datasources/TodoListDS",
  71. "required": false
  72. },
  73. {
  74. "displayName": "Database Name",
  75. "description": "Database name",
  76. "name": "DB_DATABASE",
  77. "value": "root",
  78. "required": true
  79. },
  80. {
  81. "displayName": "Database Volume Capacity",
  82. "description": "Size of persistent storage for database volume.",
  83. "name": "VOLUME_CAPACITY",
  84. "value": "1Gi",
  85. "required": true
  86. },
  87. {
  88. "displayName": "Queues",
  89. "description": "Queue names",
  90. "name": "HORNETQ_QUEUES",
  91. "value": "",
  92. "required": false
  93. },
  94. {
  95. "displayName": "Topics",
  96. "description": "Topic names",
  97. "name": "HORNETQ_TOPICS",
  98. "value": "",
  99. "required": false
  100. },
  101. {
  102. "displayName": "Server Keystore Secret Name",
  103. "description": "The name of the secret containing the keystore file",
  104. "name": "HTTPS_SECRET",
  105. "value": "eap-app-secret",
  106. "required": true
  107. },
  108. {
  109. "displayName": "Server Keystore Filename",
  110. "description": "The name of the keystore file within the secret",
  111. "name": "HTTPS_KEYSTORE",
  112. "value": "keystore.jks",
  113. "required": false
  114. },
  115. {
  116. "displayName": "Server Keystore Type",
  117. "description": "The type of the keystore file (JKS or JCEKS)",
  118. "name": "HTTPS_KEYSTORE_TYPE",
  119. "value": "",
  120. "required": false
  121. },
  122. {
  123. "displayName": "Server Certificate Name",
  124. "description": "The name associated with the server certificate",
  125. "name": "HTTPS_NAME",
  126. "value": "",
  127. "required": false
  128. },
  129. {
  130. "displayName": "Server Keystore Password",
  131. "description": "The password for the keystore and certificate",
  132. "name": "HTTPS_PASSWORD",
  133. "value": "",
  134. "required": false
  135. },
  136. {
  137. "displayName": "Datasource Minimum Pool Size",
  138. "description": "Sets xa-pool/min-pool-size for the configured datasource.",
  139. "name": "DB_MIN_POOL_SIZE",
  140. "required": false
  141. },
  142. {
  143. "displayName": "Datasource Maximum Pool Size",
  144. "description": "Sets xa-pool/max-pool-size for the configured datasource.",
  145. "name": "DB_MAX_POOL_SIZE",
  146. "required": false
  147. },
  148. {
  149. "displayName": "Datasource Transaction Isolation",
  150. "description": "Sets transaction-isolation for the configured datasource.",
  151. "name": "DB_TX_ISOLATION",
  152. "required": false
  153. },
  154. {
  155. "displayName": "MySQL Lower Case Table Names",
  156. "description": "Sets how the table names are stored and compared.",
  157. "name": "MYSQL_LOWER_CASE_TABLE_NAMES",
  158. "required": false
  159. },
  160. {
  161. "displayName": "MySQL Maximum number of connections",
  162. "description": "The maximum permitted number of simultaneous client connections.",
  163. "name": "MYSQL_MAX_CONNECTIONS",
  164. "required": false
  165. },
  166. {
  167. "displayName": "MySQL FullText Minimum Word Length",
  168. "description": "The minimum length of the word to be included in a FULLTEXT index.",
  169. "name": "MYSQL_FT_MIN_WORD_LEN",
  170. "required": false
  171. },
  172. {
  173. "displayName": "MySQL FullText Maximum Word Length",
  174. "description": "The maximum length of the word to be included in a FULLTEXT index.",
  175. "name": "MYSQL_FT_MAX_WORD_LEN",
  176. "required": false
  177. },
  178. {
  179. "displayName": "MySQL AIO",
  180. "description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.",
  181. "name": "MYSQL_AIO",
  182. "required": false
  183. },
  184. {
  185. "displayName": "HornetQ Password",
  186. "description": "HornetQ cluster admin password",
  187. "name": "HORNETQ_CLUSTER_PASSWORD",
  188. "from": "[a-zA-Z0-9]{8}",
  189. "generate": "expression",
  190. "required": true
  191. },
  192. {
  193. "displayName": "Database Username",
  194. "description": "Database user name",
  195. "name": "DB_USERNAME",
  196. "from": "user[a-zA-Z0-9]{3}",
  197. "generate": "expression",
  198. "required": true
  199. },
  200. {
  201. "displayName": "Database Password",
  202. "description": "Database user password",
  203. "name": "DB_PASSWORD",
  204. "from": "[a-zA-Z0-9]{8}",
  205. "generate": "expression",
  206. "required": true
  207. },
  208. {
  209. "displayName": "Github Webhook Secret",
  210. "description": "GitHub trigger secret",
  211. "name": "GITHUB_WEBHOOK_SECRET",
  212. "from": "[a-zA-Z0-9]{8}",
  213. "generate": "expression",
  214. "required": true
  215. },
  216. {
  217. "displayName": "Generic Webhook Secret",
  218. "description": "Generic build trigger secret",
  219. "name": "GENERIC_WEBHOOK_SECRET",
  220. "from": "[a-zA-Z0-9]{8}",
  221. "generate": "expression",
  222. "required": true
  223. },
  224. {
  225. "displayName": "ImageStream Namespace",
  226. "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.",
  227. "name": "IMAGE_STREAM_NAMESPACE",
  228. "value": "openshift",
  229. "required": true
  230. },
  231. {
  232. "displayName": "JGroups Secret Name",
  233. "description": "The name of the secret containing the keystore file",
  234. "name": "JGROUPS_ENCRYPT_SECRET",
  235. "value": "eap-app-secret",
  236. "required": false
  237. },
  238. {
  239. "displayName": "JGroups Keystore Filename",
  240. "description": "The name of the keystore file within the secret",
  241. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  242. "value": "jgroups.jceks",
  243. "required": false
  244. },
  245. {
  246. "displayName": "JGroups Certificate Name",
  247. "description": "The name associated with the server certificate",
  248. "name": "JGROUPS_ENCRYPT_NAME",
  249. "value": "",
  250. "required": false
  251. },
  252. {
  253. "displayName": "JGroups Keystore Password",
  254. "description": "The password for the keystore and certificate",
  255. "name": "JGROUPS_ENCRYPT_PASSWORD",
  256. "value": "",
  257. "required": false
  258. },
  259. {
  260. "displayName": "JGroups Cluster Password",
  261. "description": "JGroups cluster password",
  262. "name": "JGROUPS_CLUSTER_PASSWORD",
  263. "from": "[a-zA-Z0-9]{8}",
  264. "generate": "expression",
  265. "required": true
  266. },
  267. {
  268. "displayName": "Deploy Exploded Archives",
  269. "description": "Controls whether exploded deployment content should be automatically deployed",
  270. "name": "AUTO_DEPLOY_EXPLODED",
  271. "value": "false",
  272. "required": false
  273. },
  274. {
  275. "displayName": "Maven mirror URL",
  276. "description": "Maven mirror to use for S2I builds",
  277. "name": "MAVEN_MIRROR_URL",
  278. "value": "",
  279. "required": false
  280. },
  281. {
  282. "description": "List of directories from which archives will be copied into the deployment folder. If unspecified, all archives in /target will be copied.",
  283. "name": "ARTIFACT_DIR",
  284. "value": "",
  285. "required": false
  286. },
  287. {
  288. "displayName": "MySQL Image Stream Tag",
  289. "description": "The tag to use for the \"mysql\" image stream. Typically, this aligns with the major.minor version of MySQL.",
  290. "name": "MYSQL_IMAGE_STREAM_TAG",
  291. "value": "5.7",
  292. "required": true
  293. },
  294. {
  295. "description": "Container memory limit",
  296. "name": "MEMORY_LIMIT",
  297. "value": "1Gi",
  298. "required": false
  299. }
  300. ],
  301. "objects": [
  302. {
  303. "kind": "Service",
  304. "apiVersion": "v1",
  305. "spec": {
  306. "ports": [
  307. {
  308. "port": 8080,
  309. "targetPort": 8080
  310. }
  311. ],
  312. "selector": {
  313. "deploymentConfig": "${APPLICATION_NAME}"
  314. }
  315. },
  316. "metadata": {
  317. "name": "${APPLICATION_NAME}",
  318. "labels": {
  319. "application": "${APPLICATION_NAME}"
  320. },
  321. "annotations": {
  322. "description": "The web server's http port.",
  323. "service.alpha.openshift.io/dependencies": "[{\"name\": \"${APPLICATION_NAME}-mysql\", \"kind\": \"Service\"}]"
  324. }
  325. }
  326. },
  327. {
  328. "kind": "Service",
  329. "apiVersion": "v1",
  330. "spec": {
  331. "ports": [
  332. {
  333. "port": 8443,
  334. "targetPort": 8443
  335. }
  336. ],
  337. "selector": {
  338. "deploymentConfig": "${APPLICATION_NAME}"
  339. }
  340. },
  341. "metadata": {
  342. "name": "secure-${APPLICATION_NAME}",
  343. "labels": {
  344. "application": "${APPLICATION_NAME}"
  345. },
  346. "annotations": {
  347. "description": "The web server's https port.",
  348. "service.alpha.openshift.io/dependencies": "[{\"name\": \"${APPLICATION_NAME}-mysql\", \"kind\": \"Service\"}]"
  349. }
  350. }
  351. },
  352. {
  353. "kind": "Service",
  354. "apiVersion": "v1",
  355. "spec": {
  356. "ports": [
  357. {
  358. "port": 3306,
  359. "targetPort": 3306
  360. }
  361. ],
  362. "selector": {
  363. "deploymentConfig": "${APPLICATION_NAME}-mysql"
  364. }
  365. },
  366. "metadata": {
  367. "name": "${APPLICATION_NAME}-mysql",
  368. "labels": {
  369. "application": "${APPLICATION_NAME}"
  370. },
  371. "annotations": {
  372. "description": "The database server's port."
  373. }
  374. }
  375. },
  376. {
  377. "kind": "Service",
  378. "apiVersion": "v1",
  379. "spec": {
  380. "clusterIP": "None",
  381. "ports": [
  382. {
  383. "name": "ping",
  384. "port": 8888
  385. }
  386. ],
  387. "selector": {
  388. "deploymentConfig": "${APPLICATION_NAME}"
  389. }
  390. },
  391. "metadata": {
  392. "name": "${APPLICATION_NAME}-ping",
  393. "labels": {
  394. "application": "${APPLICATION_NAME}"
  395. },
  396. "annotations": {
  397. "service.alpha.kubernetes.io/tolerate-unready-endpoints": "true",
  398. "description": "The JGroups ping port for clustering."
  399. }
  400. }
  401. },
  402. {
  403. "kind": "Route",
  404. "apiVersion": "v1",
  405. "id": "${APPLICATION_NAME}-http",
  406. "metadata": {
  407. "name": "${APPLICATION_NAME}",
  408. "labels": {
  409. "application": "${APPLICATION_NAME}"
  410. },
  411. "annotations": {
  412. "description": "Route for application's http service."
  413. }
  414. },
  415. "spec": {
  416. "host": "${HOSTNAME_HTTP}",
  417. "to": {
  418. "name": "${APPLICATION_NAME}"
  419. }
  420. }
  421. },
  422. {
  423. "kind": "Route",
  424. "apiVersion": "v1",
  425. "id": "${APPLICATION_NAME}-https",
  426. "metadata": {
  427. "name": "secure-${APPLICATION_NAME}",
  428. "labels": {
  429. "application": "${APPLICATION_NAME}"
  430. },
  431. "annotations": {
  432. "description": "Route for application's https service."
  433. }
  434. },
  435. "spec": {
  436. "host": "${HOSTNAME_HTTPS}",
  437. "to": {
  438. "name": "secure-${APPLICATION_NAME}"
  439. },
  440. "tls": {
  441. "termination": "passthrough"
  442. }
  443. }
  444. },
  445. {
  446. "kind": "ImageStream",
  447. "apiVersion": "v1",
  448. "metadata": {
  449. "name": "${APPLICATION_NAME}",
  450. "labels": {
  451. "application": "${APPLICATION_NAME}"
  452. }
  453. }
  454. },
  455. {
  456. "kind": "BuildConfig",
  457. "apiVersion": "v1",
  458. "metadata": {
  459. "name": "${APPLICATION_NAME}",
  460. "labels": {
  461. "application": "${APPLICATION_NAME}"
  462. }
  463. },
  464. "spec": {
  465. "source": {
  466. "type": "Git",
  467. "git": {
  468. "uri": "${SOURCE_REPOSITORY_URL}",
  469. "ref": "${SOURCE_REPOSITORY_REF}"
  470. },
  471. "contextDir": "${CONTEXT_DIR}"
  472. },
  473. "strategy": {
  474. "type": "Source",
  475. "sourceStrategy": {
  476. "env": [
  477. {
  478. "name": "MAVEN_MIRROR_URL",
  479. "value": "${MAVEN_MIRROR_URL}"
  480. },
  481. {
  482. "name": "ARTIFACT_DIR",
  483. "value": "${ARTIFACT_DIR}"
  484. }
  485. ],
  486. "forcePull": true,
  487. "from": {
  488. "kind": "ImageStreamTag",
  489. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  490. "name": "jboss-eap64-openshift:1.8"
  491. }
  492. }
  493. },
  494. "output": {
  495. "to": {
  496. "kind": "ImageStreamTag",
  497. "name": "${APPLICATION_NAME}:latest"
  498. }
  499. },
  500. "triggers": [
  501. {
  502. "type": "GitHub",
  503. "github": {
  504. "secret": "${GITHUB_WEBHOOK_SECRET}"
  505. }
  506. },
  507. {
  508. "type": "Generic",
  509. "generic": {
  510. "secret": "${GENERIC_WEBHOOK_SECRET}"
  511. }
  512. },
  513. {
  514. "type": "ImageChange",
  515. "imageChange": {}
  516. },
  517. {
  518. "type": "ConfigChange"
  519. }
  520. ]
  521. }
  522. },
  523. {
  524. "kind": "DeploymentConfig",
  525. "apiVersion": "v1",
  526. "metadata": {
  527. "name": "${APPLICATION_NAME}",
  528. "labels": {
  529. "application": "${APPLICATION_NAME}"
  530. }
  531. },
  532. "spec": {
  533. "strategy": {
  534. "type": "Recreate"
  535. },
  536. "triggers": [
  537. {
  538. "type": "ImageChange",
  539. "imageChangeParams": {
  540. "automatic": true,
  541. "containerNames": [
  542. "${APPLICATION_NAME}"
  543. ],
  544. "from": {
  545. "kind": "ImageStreamTag",
  546. "name": "${APPLICATION_NAME}:latest"
  547. }
  548. }
  549. },
  550. {
  551. "type": "ConfigChange"
  552. }
  553. ],
  554. "replicas": 1,
  555. "selector": {
  556. "deploymentConfig": "${APPLICATION_NAME}"
  557. },
  558. "template": {
  559. "metadata": {
  560. "name": "${APPLICATION_NAME}",
  561. "labels": {
  562. "deploymentConfig": "${APPLICATION_NAME}",
  563. "application": "${APPLICATION_NAME}"
  564. }
  565. },
  566. "spec": {
  567. "terminationGracePeriodSeconds": 60,
  568. "containers": [
  569. {
  570. "name": "${APPLICATION_NAME}",
  571. "image": "${APPLICATION_NAME}",
  572. "imagePullPolicy": "Always",
  573. "resources": {
  574. "limits": {
  575. "memory": "${MEMORY_LIMIT}"
  576. }
  577. },
  578. "volumeMounts": [
  579. {
  580. "name": "eap-keystore-volume",
  581. "mountPath": "/etc/eap-secret-volume",
  582. "readOnly": true
  583. },
  584. {
  585. "name": "eap-jgroups-keystore-volume",
  586. "mountPath": "/etc/jgroups-encrypt-secret-volume",
  587. "readOnly": true
  588. }
  589. ],
  590. "livenessProbe": {
  591. "exec": {
  592. "command": [
  593. "/bin/bash",
  594. "-c",
  595. "/opt/eap/bin/livenessProbe.sh"
  596. ]
  597. },
  598. "initialDelaySeconds": 60
  599. },
  600. "readinessProbe": {
  601. "exec": {
  602. "command": [
  603. "/bin/bash",
  604. "-c",
  605. "/opt/eap/bin/readinessProbe.sh"
  606. ]
  607. }
  608. },
  609. "ports": [
  610. {
  611. "name": "jolokia",
  612. "containerPort": 8778,
  613. "protocol": "TCP"
  614. },
  615. {
  616. "name": "http",
  617. "containerPort": 8080,
  618. "protocol": "TCP"
  619. },
  620. {
  621. "name": "https",
  622. "containerPort": 8443,
  623. "protocol": "TCP"
  624. },
  625. {
  626. "name": "ping",
  627. "containerPort": 8888,
  628. "protocol": "TCP"
  629. }
  630. ],
  631. "env": [
  632. {
  633. "name": "DB_SERVICE_PREFIX_MAPPING",
  634. "value": "${APPLICATION_NAME}-mysql=DB"
  635. },
  636. {
  637. "name": "DB_JNDI",
  638. "value": "${DB_JNDI}"
  639. },
  640. {
  641. "name": "DB_USERNAME",
  642. "value": "${DB_USERNAME}"
  643. },
  644. {
  645. "name": "DB_PASSWORD",
  646. "value": "${DB_PASSWORD}"
  647. },
  648. {
  649. "name": "DB_DATABASE",
  650. "value": "${DB_DATABASE}"
  651. },
  652. {
  653. "name": "TX_DATABASE_PREFIX_MAPPING",
  654. "value": "${APPLICATION_NAME}-mysql=DB"
  655. },
  656. {
  657. "name": "DB_MIN_POOL_SIZE",
  658. "value": "${DB_MIN_POOL_SIZE}"
  659. },
  660. {
  661. "name": "DB_MAX_POOL_SIZE",
  662. "value": "${DB_MAX_POOL_SIZE}"
  663. },
  664. {
  665. "name": "DB_TX_ISOLATION",
  666. "value": "${DB_TX_ISOLATION}"
  667. },
  668. {
  669. "name": "JGROUPS_PING_PROTOCOL",
  670. "value": "openshift.DNS_PING"
  671. },
  672. {
  673. "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
  674. "value": "${APPLICATION_NAME}-ping"
  675. },
  676. {
  677. "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
  678. "value": "8888"
  679. },
  680. {
  681. "name": "HTTPS_KEYSTORE_DIR",
  682. "value": "/etc/eap-secret-volume"
  683. },
  684. {
  685. "name": "HTTPS_KEYSTORE",
  686. "value": "${HTTPS_KEYSTORE}"
  687. },
  688. {
  689. "name": "HTTPS_KEYSTORE_TYPE",
  690. "value": "${HTTPS_KEYSTORE_TYPE}"
  691. },
  692. {
  693. "name": "HTTPS_NAME",
  694. "value": "${HTTPS_NAME}"
  695. },
  696. {
  697. "name": "HTTPS_PASSWORD",
  698. "value": "${HTTPS_PASSWORD}"
  699. },
  700. {
  701. "name": "HORNETQ_CLUSTER_PASSWORD",
  702. "value": "${HORNETQ_CLUSTER_PASSWORD}"
  703. },
  704. {
  705. "name": "HORNETQ_QUEUES",
  706. "value": "${HORNETQ_QUEUES}"
  707. },
  708. {
  709. "name": "HORNETQ_TOPICS",
  710. "value": "${HORNETQ_TOPICS}"
  711. },
  712. {
  713. "name": "JGROUPS_ENCRYPT_SECRET",
  714. "value": "${JGROUPS_ENCRYPT_SECRET}"
  715. },
  716. {
  717. "name": "JGROUPS_ENCRYPT_KEYSTORE_DIR",
  718. "value": "/etc/jgroups-encrypt-secret-volume"
  719. },
  720. {
  721. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  722. "value": "${JGROUPS_ENCRYPT_KEYSTORE}"
  723. },
  724. {
  725. "name": "JGROUPS_ENCRYPT_NAME",
  726. "value": "${JGROUPS_ENCRYPT_NAME}"
  727. },
  728. {
  729. "name": "JGROUPS_ENCRYPT_PASSWORD",
  730. "value": "${JGROUPS_ENCRYPT_PASSWORD}"
  731. },
  732. {
  733. "name": "JGROUPS_CLUSTER_PASSWORD",
  734. "value": "${JGROUPS_CLUSTER_PASSWORD}"
  735. },
  736. {
  737. "name": "TIMER_SERVICE_DATA_STORE",
  738. "value": "${APPLICATION_NAME}-mysql"
  739. },
  740. {
  741. "name": "AUTO_DEPLOY_EXPLODED",
  742. "value": "${AUTO_DEPLOY_EXPLODED}"
  743. }
  744. ]
  745. }
  746. ],
  747. "volumes": [
  748. {
  749. "name": "eap-keystore-volume",
  750. "secret": {
  751. "secretName": "${HTTPS_SECRET}"
  752. }
  753. },
  754. {
  755. "name": "eap-jgroups-keystore-volume",
  756. "secret": {
  757. "secretName": "${JGROUPS_ENCRYPT_SECRET}"
  758. }
  759. }
  760. ]
  761. }
  762. }
  763. }
  764. },
  765. {
  766. "kind": "DeploymentConfig",
  767. "apiVersion": "v1",
  768. "metadata": {
  769. "name": "${APPLICATION_NAME}-mysql",
  770. "labels": {
  771. "application": "${APPLICATION_NAME}"
  772. }
  773. },
  774. "spec": {
  775. "strategy": {
  776. "type": "Recreate"
  777. },
  778. "triggers": [
  779. {
  780. "type": "ImageChange",
  781. "imageChangeParams": {
  782. "automatic": true,
  783. "containerNames": [
  784. "${APPLICATION_NAME}-mysql"
  785. ],
  786. "from": {
  787. "kind": "ImageStreamTag",
  788. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  789. "name": "mysql:${MYSQL_IMAGE_STREAM_TAG}"
  790. }
  791. }
  792. },
  793. {
  794. "type": "ConfigChange"
  795. }
  796. ],
  797. "replicas": 1,
  798. "selector": {
  799. "deploymentConfig": "${APPLICATION_NAME}-mysql"
  800. },
  801. "template": {
  802. "metadata": {
  803. "name": "${APPLICATION_NAME}-mysql",
  804. "labels": {
  805. "deploymentConfig": "${APPLICATION_NAME}-mysql",
  806. "application": "${APPLICATION_NAME}"
  807. }
  808. },
  809. "spec": {
  810. "terminationGracePeriodSeconds": 60,
  811. "containers": [
  812. {
  813. "name": "${APPLICATION_NAME}-mysql",
  814. "image": "mysql",
  815. "imagePullPolicy": "Always",
  816. "ports": [
  817. {
  818. "containerPort": 3306,
  819. "protocol": "TCP"
  820. }
  821. ],
  822. "readinessProbe": {
  823. "timeoutSeconds": 1,
  824. "initialDelaySeconds": 5,
  825. "exec": {
  826. "command": [ "/bin/sh", "-i", "-c",
  827. "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1'"]
  828. }
  829. },
  830. "livenessProbe": {
  831. "timeoutSeconds": 1,
  832. "initialDelaySeconds": 30,
  833. "tcpSocket": {
  834. "port": 3306
  835. }
  836. },
  837. "volumeMounts": [
  838. {
  839. "mountPath": "/var/lib/mysql/data",
  840. "name": "${APPLICATION_NAME}-mysql-pvol"
  841. }
  842. ],
  843. "env": [
  844. {
  845. "name": "MYSQL_USER",
  846. "value": "${DB_USERNAME}"
  847. },
  848. {
  849. "name": "MYSQL_PASSWORD",
  850. "value": "${DB_PASSWORD}"
  851. },
  852. {
  853. "name": "MYSQL_DATABASE",
  854. "value": "${DB_DATABASE}"
  855. },
  856. {
  857. "name": "MYSQL_LOWER_CASE_TABLE_NAMES",
  858. "value": "${MYSQL_LOWER_CASE_TABLE_NAMES}"
  859. },
  860. {
  861. "name": "MYSQL_MAX_CONNECTIONS",
  862. "value": "${MYSQL_MAX_CONNECTIONS}"
  863. },
  864. {
  865. "name": "MYSQL_FT_MIN_WORD_LEN",
  866. "value": "${MYSQL_FT_MIN_WORD_LEN}"
  867. },
  868. {
  869. "name": "MYSQL_FT_MAX_WORD_LEN",
  870. "value": "${MYSQL_FT_MAX_WORD_LEN}"
  871. },
  872. {
  873. "name": "MYSQL_AIO",
  874. "value": "${MYSQL_AIO}"
  875. }
  876. ]
  877. }
  878. ],
  879. "volumes": [
  880. {
  881. "name": "${APPLICATION_NAME}-mysql-pvol",
  882. "persistentVolumeClaim": {
  883. "claimName": "${APPLICATION_NAME}-mysql-claim"
  884. }
  885. }
  886. ]
  887. }
  888. }
  889. }
  890. },
  891. {
  892. "apiVersion": "v1",
  893. "kind": "PersistentVolumeClaim",
  894. "metadata": {
  895. "name": "${APPLICATION_NAME}-mysql-claim",
  896. "labels": {
  897. "application": "${APPLICATION_NAME}"
  898. }
  899. },
  900. "spec": {
  901. "accessModes": [
  902. "ReadWriteOnce"
  903. ],
  904. "resources": {
  905. "requests": {
  906. "storage": "${VOLUME_CAPACITY}"
  907. }
  908. }
  909. }
  910. }
  911. ]
  912. }