eap71-mongodb-persistent-s2i.json 37 KB

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