eap64-mongodb-s2i.json 32 KB

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