eap64-mongodb-s2i.json 35 KB

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