eap70-mongodb-persistent-s2i.json 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855
  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.4.7",
  9. "openshift.io/display-name": "JBoss EAP 7.0 + MongoDB (with https)",
  10. "openshift.io/provider-display-name": "Red Hat, Inc.",
  11. "description": "An example EAP 7 application with a MongoDB 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 7.0 based application, including a build configuration, application deployment configuration, database deployment configuration for MongoDB 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": "eap70-mongodb-persistent-s2i"
  17. },
  18. "labels": {
  19. "template": "eap70-mongodb-persistent-s2i",
  20. "xpaas": "1.4.7"
  21. },
  22. "message": "A new EAP 7 and MongoDB persistent based application with SSL support has been created in your project. The username/password for accessing the MongoDB database \"${DB_DATABASE}\" is ${DB_USERNAME}/${DB_PASSWORD} (Admin password is \"${DB_ADMIN_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.",
  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.3",
  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-mongodb",
  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/mongodb",
  69. "name": "DB_JNDI",
  70. "value": "",
  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": "512Mi",
  85. "required": true
  86. },
  87. {
  88. "displayName": "Queues",
  89. "description": "Queue names",
  90. "name": "MQ_QUEUES",
  91. "value": "",
  92. "required": false
  93. },
  94. {
  95. "displayName": "Topics",
  96. "description": "Topic names",
  97. "name": "MQ_TOPICS",
  98. "value": "",
  99. "required": false
  100. },
  101. {
  102. "displayName": "Service Account Name",
  103. "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.",
  104. "name": "SERVICE_ACCOUNT_NAME",
  105. "value": "eap7-service-account",
  106. "required": true
  107. },
  108. {
  109. "displayName": "Server Keystore Secret Name",
  110. "description": "The name of the secret containing the keystore file",
  111. "name": "HTTPS_SECRET",
  112. "value": "eap7-app-secret",
  113. "required": true
  114. },
  115. {
  116. "displayName": "Server Keystore Filename",
  117. "description": "The name of the keystore file within the secret",
  118. "name": "HTTPS_KEYSTORE",
  119. "value": "keystore.jks",
  120. "required": false
  121. },
  122. {
  123. "displayName": "Server Keystore Type",
  124. "description": "The type of the keystore file (JKS or JCEKS)",
  125. "name": "HTTPS_KEYSTORE_TYPE",
  126. "value": "",
  127. "required": false
  128. },
  129. {
  130. "displayName": "Server Certificate Name",
  131. "description": "The name associated with the server certificate",
  132. "name": "HTTPS_NAME",
  133. "value": "",
  134. "required": false
  135. },
  136. {
  137. "displayName": "Server Keystore Password",
  138. "description": "The password for the keystore and certificate",
  139. "name": "HTTPS_PASSWORD",
  140. "value": "",
  141. "required": false
  142. },
  143. {
  144. "displayName": "Datasource Minimum Pool Size",
  145. "description": "Sets xa-pool/min-pool-size for the configured datasource.",
  146. "name": "DB_MIN_POOL_SIZE",
  147. "required": false
  148. },
  149. {
  150. "displayName": "Datasource Maximum Pool Size",
  151. "description": "Sets xa-pool/max-pool-size for the configured datasource.",
  152. "name": "DB_MAX_POOL_SIZE",
  153. "required": false
  154. },
  155. {
  156. "displayName": "Datasource Transaction Isolation",
  157. "description": "Sets transaction-isolation for the configured datasource.",
  158. "name": "DB_TX_ISOLATION",
  159. "required": false
  160. },
  161. {
  162. "displayName": "MongoDB No Preallocation",
  163. "description": "Disable data file preallocation.",
  164. "name": "MONGODB_NOPREALLOC",
  165. "required": false
  166. },
  167. {
  168. "displayName": "MongoDB Small Files",
  169. "description": "Set MongoDB to use a smaller default data file size.",
  170. "name": "MONGODB_SMALLFILES",
  171. "required": false
  172. },
  173. {
  174. "displayName": "MongoDB Quiet",
  175. "description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.",
  176. "name": "MONGODB_QUIET",
  177. "required": false
  178. },
  179. {
  180. "displayName": "A-MQ cluster password",
  181. "description": "A-MQ cluster admin password",
  182. "name": "MQ_CLUSTER_PASSWORD",
  183. "from": "[a-zA-Z0-9]{8}",
  184. "generate": "expression",
  185. "required": true
  186. },
  187. {
  188. "displayName": "Database Username",
  189. "description": "Database user name",
  190. "name": "DB_USERNAME",
  191. "from": "user[a-zA-Z0-9]{3}",
  192. "generate": "expression",
  193. "required": true
  194. },
  195. {
  196. "displayName": "Database Password",
  197. "description": "Database user password",
  198. "name": "DB_PASSWORD",
  199. "from": "[a-zA-Z0-9]{8}",
  200. "generate": "expression",
  201. "required": true
  202. },
  203. {
  204. "displayName": "Database admin password",
  205. "description": "Database admin password",
  206. "name": "DB_ADMIN_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": "eap7-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": "MongoDB Image Stream Tag",
  292. "description": "The tag to use for the \"mongodb\" image stream. Typically, this aligns with the major.minor version of MongoDB.",
  293. "name": "MONGODB_IMAGE_STREAM_TAG",
  294. "value": "3.2",
  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}-mongodb\", \"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}-mongodb\", \"kind\": \"Service\"}]"
  346. }
  347. }
  348. },
  349. {
  350. "kind": "Service",
  351. "apiVersion": "v1",
  352. "spec": {
  353. "ports": [
  354. {
  355. "port": 27017,
  356. "targetPort": 27017
  357. }
  358. ],
  359. "selector": {
  360. "deploymentConfig": "${APPLICATION_NAME}-mongodb"
  361. }
  362. },
  363. "metadata": {
  364. "name": "${APPLICATION_NAME}-mongodb",
  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-eap70-openshift:1.6"
  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": 75,
  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}-mongodb=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": "DB_ADMIN_PASSWORD",
  620. "value": "${DB_ADMIN_PASSWORD}"
  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": "MQ_CLUSTER_PASSWORD",
  668. "value": "${MQ_CLUSTER_PASSWORD}"
  669. },
  670. {
  671. "name": "MQ_QUEUES",
  672. "value": "${MQ_QUEUES}"
  673. },
  674. {
  675. "name": "MQ_TOPICS",
  676. "value": "${MQ_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": "AUTO_DEPLOY_EXPLODED",
  704. "value": "${AUTO_DEPLOY_EXPLODED}"
  705. }
  706. ]
  707. }
  708. ],
  709. "volumes": [
  710. {
  711. "name": "eap-keystore-volume",
  712. "secret": {
  713. "secretName": "${HTTPS_SECRET}"
  714. }
  715. },
  716. {
  717. "name": "eap-jgroups-keystore-volume",
  718. "secret": {
  719. "secretName": "${JGROUPS_ENCRYPT_SECRET}"
  720. }
  721. }
  722. ]
  723. }
  724. }
  725. }
  726. },
  727. {
  728. "kind": "DeploymentConfig",
  729. "apiVersion": "v1",
  730. "metadata": {
  731. "name": "${APPLICATION_NAME}-mongodb",
  732. "labels": {
  733. "application": "${APPLICATION_NAME}"
  734. }
  735. },
  736. "spec": {
  737. "strategy": {
  738. "type": "Recreate"
  739. },
  740. "triggers": [
  741. {
  742. "type": "ImageChange",
  743. "imageChangeParams": {
  744. "automatic": true,
  745. "containerNames": [
  746. "${APPLICATION_NAME}-mongodb"
  747. ],
  748. "from": {
  749. "kind": "ImageStreamTag",
  750. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  751. "name": "mongodb:${MONGODB_IMAGE_STREAM_TAG}"
  752. }
  753. }
  754. },
  755. {
  756. "type": "ConfigChange"
  757. }
  758. ],
  759. "replicas": 1,
  760. "selector": {
  761. "deploymentConfig": "${APPLICATION_NAME}-mongodb"
  762. },
  763. "template": {
  764. "metadata": {
  765. "name": "${APPLICATION_NAME}-mongodb",
  766. "labels": {
  767. "deploymentConfig": "${APPLICATION_NAME}-mongodb",
  768. "application": "${APPLICATION_NAME}"
  769. }
  770. },
  771. "spec": {
  772. "terminationGracePeriodSeconds": 60,
  773. "containers": [
  774. {
  775. "name": "${APPLICATION_NAME}-mongodb",
  776. "image": "mongodb",
  777. "imagePullPolicy": "Always",
  778. "ports": [
  779. {
  780. "containerPort": 27017,
  781. "protocol": "TCP"
  782. }
  783. ],
  784. "volumeMounts": [
  785. {
  786. "mountPath": "/var/lib/mongodb/data",
  787. "name": "${APPLICATION_NAME}-mongodb-pvol"
  788. }
  789. ],
  790. "env": [
  791. {
  792. "name": "MONGODB_USER",
  793. "value": "${DB_USERNAME}"
  794. },
  795. {
  796. "name": "MONGODB_PASSWORD",
  797. "value": "${DB_PASSWORD}"
  798. },
  799. {
  800. "name": "MONGODB_DATABASE",
  801. "value": "${DB_DATABASE}"
  802. },
  803. {
  804. "name": "MONGODB_ADMIN_PASSWORD",
  805. "value": "${DB_ADMIN_PASSWORD}"
  806. },
  807. {
  808. "name": "MONGODB_NOPREALLOC",
  809. "value": "${MONGODB_NOPREALLOC}"
  810. },
  811. {
  812. "name": "MONGODB_SMALLFILES",
  813. "value": "${MONGODB_SMALLFILES}"
  814. },
  815. {
  816. "name": "MONGODB_QUIET",
  817. "value": "${MONGODB_QUIET}"
  818. }
  819. ]
  820. }
  821. ],
  822. "volumes": [
  823. {
  824. "name": "${APPLICATION_NAME}-mongodb-pvol",
  825. "persistentVolumeClaim": {
  826. "claimName": "${APPLICATION_NAME}-mongodb-claim"
  827. }
  828. }
  829. ]
  830. }
  831. }
  832. }
  833. },
  834. {
  835. "apiVersion": "v1",
  836. "kind": "PersistentVolumeClaim",
  837. "metadata": {
  838. "name": "${APPLICATION_NAME}-mongodb-claim",
  839. "labels": {
  840. "application": "${APPLICATION_NAME}"
  841. }
  842. },
  843. "spec": {
  844. "accessModes": [
  845. "ReadWriteOnce"
  846. ],
  847. "resources": {
  848. "requests": {
  849. "storage": "${VOLUME_CAPACITY}"
  850. }
  851. }
  852. }
  853. }
  854. ]
  855. }