eap-cd-mysql-s2i.json 37 KB

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