eap64-mysql-persistent-s2i.json 35 KB

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