eap-cd-mongodb-persistent-s2i.json 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "iconClass": "icon-eap",
  7. "tags": "eap,javaee,java,jboss,hidden",
  8. "version": "1.5.0",
  9. "openshift.io/display-name": "JBoss EAP CD + MongoDB (with https)",
  10. "openshift.io/provider-display-name": "Red Hat, Inc.",
  11. "description": "An example JBoss Enterprise Application Platform continuous delivery application with a MongoDB database. For more information about using this template, see https://github.com/jboss-container-images/jboss-eap-7-openshift-image/blob/eap-cd/README.adoc.",
  12. "template.openshift.io/long-description": "This template defines resources needed to develop JBoss Enterprise Application Server continuous delivery based application, including a build configuration, application deployment configuration, database deployment configuration for 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": "eap-cd-mongodb-persistent-s2i"
  17. },
  18. "labels": {
  19. "template": "eap-cd-mongodb-persistent-s2i",
  20. "xpaas": "1.5.0"
  21. },
  22. "message": "A new JBoss EAP CD 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 https Route Hostname",
  33. "description": "Custom hostname for https service route. Leave blank for default hostname, e.g.: secure-<application-name>-<project>.<default-domain-suffix>",
  34. "name": "HOSTNAME_HTTPS",
  35. "value": "",
  36. "required": false
  37. },
  38. {
  39. "displayName": "Git Repository URL",
  40. "description": "Git source URI for application",
  41. "name": "SOURCE_REPOSITORY_URL",
  42. "value": "https://github.com/jboss-openshift/openshift-quickstarts",
  43. "required": true
  44. },
  45. {
  46. "displayName": "Git Reference",
  47. "description": "Git branch/tag reference",
  48. "name": "SOURCE_REPOSITORY_REF",
  49. "value": "1.3",
  50. "required": false
  51. },
  52. {
  53. "displayName": "Context Directory",
  54. "description": "Path within Git project to build; empty for root project directory.",
  55. "name": "CONTEXT_DIR",
  56. "value": "todolist/todolist-mongodb",
  57. "required": false
  58. },
  59. {
  60. "displayName": "Database JNDI Name",
  61. "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
  62. "name": "DB_JNDI",
  63. "value": "",
  64. "required": false
  65. },
  66. {
  67. "displayName": "Database Name",
  68. "description": "Database name",
  69. "name": "DB_DATABASE",
  70. "value": "root",
  71. "required": true
  72. },
  73. {
  74. "displayName": "Database Volume Capacity",
  75. "description": "Size of persistent storage for database volume.",
  76. "name": "VOLUME_CAPACITY",
  77. "value": "1Gi",
  78. "required": true
  79. },
  80. {
  81. "displayName": "Queues",
  82. "description": "Queue names, separated by commas. These queues will be automatically created when the broker starts. Also, they will be made accessible as JNDI resources in EAP. Note that all queues used by the application *must* be specified here in order to be created automatically on the remote AMQ broker.",
  83. "name": "MQ_QUEUES",
  84. "value": "",
  85. "required": false
  86. },
  87. {
  88. "displayName": "Topics",
  89. "description": "Topic names, separated by commas. These topics will be automatically created when the broker starts. Also, they will be made accessible as JNDI resources in EAP. Note that all topics used by the application *must* be specified here in order to be created automatically on the remote AMQ broker.",
  90. "name": "MQ_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": "eap7-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": "AMQ cluster password",
  167. "description": "AMQ cluster admin password",
  168. "name": "MQ_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": "eap7-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. "displayName": "Maven Additional Arguments",
  272. "description": "Maven additional arguments to use for S2I builds",
  273. "name": "MAVEN_ARGS_APPEND",
  274. "value": "",
  275. "required": false
  276. },
  277. {
  278. "description": "List of directories from which archives will be copied into the deployment folder. If unspecified, all archives in /target will be copied.",
  279. "name": "ARTIFACT_DIR",
  280. "value": "",
  281. "required": false
  282. },
  283. {
  284. "displayName": "MongoDB Image Stream Tag",
  285. "description": "The tag to use for the \"mongodb\" image stream. Typically, this aligns with the major.minor version of MongoDB.",
  286. "name": "MONGODB_IMAGE_STREAM_TAG",
  287. "value": "3.2",
  288. "required": true
  289. },
  290. {
  291. "description": "Container memory limit",
  292. "name": "MEMORY_LIMIT",
  293. "value": "1Gi",
  294. "required": false
  295. }
  296. ],
  297. "objects": [
  298. {
  299. "kind": "Service",
  300. "apiVersion": "v1",
  301. "spec": {
  302. "ports": [
  303. {
  304. "port": 8080,
  305. "targetPort": 8080
  306. }
  307. ],
  308. "selector": {
  309. "deploymentConfig": "${APPLICATION_NAME}"
  310. }
  311. },
  312. "metadata": {
  313. "name": "${APPLICATION_NAME}",
  314. "labels": {
  315. "application": "${APPLICATION_NAME}"
  316. },
  317. "annotations": {
  318. "description": "The web server's http port.",
  319. "service.alpha.openshift.io/dependencies": "[{\"name\": \"${APPLICATION_NAME}-mongodb\", \"kind\": \"Service\"}]"
  320. }
  321. }
  322. },
  323. {
  324. "kind": "Service",
  325. "apiVersion": "v1",
  326. "spec": {
  327. "ports": [
  328. {
  329. "port": 8443,
  330. "targetPort": 8443
  331. }
  332. ],
  333. "selector": {
  334. "deploymentConfig": "${APPLICATION_NAME}"
  335. }
  336. },
  337. "metadata": {
  338. "name": "secure-${APPLICATION_NAME}",
  339. "labels": {
  340. "application": "${APPLICATION_NAME}"
  341. },
  342. "annotations": {
  343. "description": "The web server's https port.",
  344. "service.alpha.openshift.io/dependencies": "[{\"name\": \"${APPLICATION_NAME}-mongodb\", \"kind\": \"Service\"}]"
  345. }
  346. }
  347. },
  348. {
  349. "kind": "Service",
  350. "apiVersion": "v1",
  351. "spec": {
  352. "ports": [
  353. {
  354. "port": 27017,
  355. "targetPort": 27017
  356. }
  357. ],
  358. "selector": {
  359. "deploymentConfig": "${APPLICATION_NAME}-mongodb"
  360. }
  361. },
  362. "metadata": {
  363. "name": "${APPLICATION_NAME}-mongodb",
  364. "labels": {
  365. "application": "${APPLICATION_NAME}"
  366. },
  367. "annotations": {
  368. "description": "The database server's port."
  369. }
  370. }
  371. },
  372. {
  373. "kind": "Service",
  374. "apiVersion": "v1",
  375. "spec": {
  376. "clusterIP": "None",
  377. "ports": [
  378. {
  379. "name": "ping",
  380. "port": 8888
  381. }
  382. ],
  383. "selector": {
  384. "deploymentConfig": "${APPLICATION_NAME}"
  385. }
  386. },
  387. "metadata": {
  388. "name": "${APPLICATION_NAME}-ping",
  389. "labels": {
  390. "application": "${APPLICATION_NAME}"
  391. },
  392. "annotations": {
  393. "service.alpha.kubernetes.io/tolerate-unready-endpoints": "true",
  394. "description": "The JGroups ping port for clustering."
  395. }
  396. }
  397. },
  398. {
  399. "kind": "Route",
  400. "apiVersion": "v1",
  401. "id": "${APPLICATION_NAME}-http",
  402. "metadata": {
  403. "name": "${APPLICATION_NAME}",
  404. "labels": {
  405. "application": "${APPLICATION_NAME}"
  406. },
  407. "annotations": {
  408. "description": "Route for application's http service."
  409. }
  410. },
  411. "spec": {
  412. "to": {
  413. "name": "${APPLICATION_NAME}"
  414. }
  415. }
  416. },
  417. {
  418. "kind": "Route",
  419. "apiVersion": "v1",
  420. "id": "${APPLICATION_NAME}-https",
  421. "metadata": {
  422. "name": "secure-${APPLICATION_NAME}",
  423. "labels": {
  424. "application": "${APPLICATION_NAME}"
  425. },
  426. "annotations": {
  427. "description": "Route for application's https service."
  428. }
  429. },
  430. "spec": {
  431. "host": "${HOSTNAME_HTTPS}",
  432. "to": {
  433. "name": "secure-${APPLICATION_NAME}"
  434. },
  435. "tls": {
  436. "termination": "passthrough"
  437. }
  438. }
  439. },
  440. {
  441. "kind": "ImageStream",
  442. "apiVersion": "v1",
  443. "metadata": {
  444. "name": "${APPLICATION_NAME}",
  445. "labels": {
  446. "application": "${APPLICATION_NAME}"
  447. }
  448. }
  449. },
  450. {
  451. "kind": "BuildConfig",
  452. "apiVersion": "v1",
  453. "metadata": {
  454. "name": "${APPLICATION_NAME}",
  455. "labels": {
  456. "application": "${APPLICATION_NAME}"
  457. }
  458. },
  459. "spec": {
  460. "source": {
  461. "type": "Git",
  462. "git": {
  463. "uri": "${SOURCE_REPOSITORY_URL}",
  464. "ref": "${SOURCE_REPOSITORY_REF}"
  465. },
  466. "contextDir": "${CONTEXT_DIR}"
  467. },
  468. "strategy": {
  469. "type": "Source",
  470. "sourceStrategy": {
  471. "env": [
  472. {
  473. "name": "MAVEN_MIRROR_URL",
  474. "value": "${MAVEN_MIRROR_URL}"
  475. },
  476. {
  477. "name": "MAVEN_ARGS_APPEND",
  478. "value": "${MAVEN_ARGS_APPEND}"
  479. },
  480. {
  481. "name": "ARTIFACT_DIR",
  482. "value": "${ARTIFACT_DIR}"
  483. }
  484. ],
  485. "forcePull": true,
  486. "from": {
  487. "kind": "ImageStreamTag",
  488. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  489. "name": "eap-cd-openshift:13"
  490. }
  491. }
  492. },
  493. "output": {
  494. "to": {
  495. "kind": "ImageStreamTag",
  496. "name": "${APPLICATION_NAME}:latest"
  497. }
  498. },
  499. "triggers": [
  500. {
  501. "type": "GitHub",
  502. "github": {
  503. "secret": "${GITHUB_WEBHOOK_SECRET}"
  504. }
  505. },
  506. {
  507. "type": "Generic",
  508. "generic": {
  509. "secret": "${GENERIC_WEBHOOK_SECRET}"
  510. }
  511. },
  512. {
  513. "type": "ImageChange",
  514. "imageChange": {}
  515. },
  516. {
  517. "type": "ConfigChange"
  518. }
  519. ]
  520. }
  521. },
  522. {
  523. "kind": "DeploymentConfig",
  524. "apiVersion": "v1",
  525. "metadata": {
  526. "name": "${APPLICATION_NAME}",
  527. "labels": {
  528. "application": "${APPLICATION_NAME}"
  529. }
  530. },
  531. "spec": {
  532. "strategy": {
  533. "type": "Recreate"
  534. },
  535. "triggers": [
  536. {
  537. "type": "ImageChange",
  538. "imageChangeParams": {
  539. "automatic": true,
  540. "containerNames": [
  541. "${APPLICATION_NAME}"
  542. ],
  543. "from": {
  544. "kind": "ImageStreamTag",
  545. "name": "${APPLICATION_NAME}:latest"
  546. }
  547. }
  548. },
  549. {
  550. "type": "ConfigChange"
  551. }
  552. ],
  553. "replicas": 1,
  554. "selector": {
  555. "deploymentConfig": "${APPLICATION_NAME}"
  556. },
  557. "template": {
  558. "metadata": {
  559. "name": "${APPLICATION_NAME}",
  560. "labels": {
  561. "deploymentConfig": "${APPLICATION_NAME}",
  562. "application": "${APPLICATION_NAME}"
  563. }
  564. },
  565. "spec": {
  566. "terminationGracePeriodSeconds": 75,
  567. "containers": [
  568. {
  569. "name": "${APPLICATION_NAME}",
  570. "image": "${APPLICATION_NAME}",
  571. "imagePullPolicy": "Always",
  572. "resources": {
  573. "limits": {
  574. "memory": "${MEMORY_LIMIT}"
  575. }
  576. },
  577. "volumeMounts": [
  578. {
  579. "name": "eap-keystore-volume",
  580. "mountPath": "/etc/eap-secret-volume",
  581. "readOnly": true
  582. },
  583. {
  584. "name": "eap-jgroups-keystore-volume",
  585. "mountPath": "/etc/jgroups-encrypt-secret-volume",
  586. "readOnly": true
  587. }
  588. ],
  589. "livenessProbe": {
  590. "exec": {
  591. "command": [
  592. "/bin/bash",
  593. "-c",
  594. "/opt/eap/bin/livenessProbe.sh"
  595. ]
  596. },
  597. "initialDelaySeconds": 60
  598. },
  599. "readinessProbe": {
  600. "exec": {
  601. "command": [
  602. "/bin/bash",
  603. "-c",
  604. "/opt/eap/bin/readinessProbe.sh"
  605. ]
  606. }
  607. },
  608. "ports": [
  609. {
  610. "name": "jolokia",
  611. "containerPort": 8778,
  612. "protocol": "TCP"
  613. },
  614. {
  615. "name": "http",
  616. "containerPort": 8080,
  617. "protocol": "TCP"
  618. },
  619. {
  620. "name": "https",
  621. "containerPort": 8443,
  622. "protocol": "TCP"
  623. },
  624. {
  625. "name": "ping",
  626. "containerPort": 8888,
  627. "protocol": "TCP"
  628. }
  629. ],
  630. "env": [
  631. {
  632. "name": "DB_SERVICE_PREFIX_MAPPING",
  633. "value": "${APPLICATION_NAME}-mongodb=DB"
  634. },
  635. {
  636. "name": "DB_JNDI",
  637. "value": "${DB_JNDI}"
  638. },
  639. {
  640. "name": "DB_USERNAME",
  641. "value": "${DB_USERNAME}"
  642. },
  643. {
  644. "name": "DB_PASSWORD",
  645. "value": "${DB_PASSWORD}"
  646. },
  647. {
  648. "name": "DB_DATABASE",
  649. "value": "${DB_DATABASE}"
  650. },
  651. {
  652. "name": "DB_ADMIN_PASSWORD",
  653. "value": "${DB_ADMIN_PASSWORD}"
  654. },
  655. {
  656. "name": "DB_MIN_POOL_SIZE",
  657. "value": "${DB_MIN_POOL_SIZE}"
  658. },
  659. {
  660. "name": "DB_MAX_POOL_SIZE",
  661. "value": "${DB_MAX_POOL_SIZE}"
  662. },
  663. {
  664. "name": "DB_TX_ISOLATION",
  665. "value": "${DB_TX_ISOLATION}"
  666. },
  667. {
  668. "name": "JGROUPS_PING_PROTOCOL",
  669. "value": "openshift.DNS_PING"
  670. },
  671. {
  672. "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
  673. "value": "${APPLICATION_NAME}-ping"
  674. },
  675. {
  676. "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
  677. "value": "8888"
  678. },
  679. {
  680. "name": "HTTPS_KEYSTORE_DIR",
  681. "value": "/etc/eap-secret-volume"
  682. },
  683. {
  684. "name": "HTTPS_KEYSTORE",
  685. "value": "${HTTPS_KEYSTORE}"
  686. },
  687. {
  688. "name": "HTTPS_KEYSTORE_TYPE",
  689. "value": "${HTTPS_KEYSTORE_TYPE}"
  690. },
  691. {
  692. "name": "HTTPS_NAME",
  693. "value": "${HTTPS_NAME}"
  694. },
  695. {
  696. "name": "HTTPS_PASSWORD",
  697. "value": "${HTTPS_PASSWORD}"
  698. },
  699. {
  700. "name": "MQ_CLUSTER_PASSWORD",
  701. "value": "${MQ_CLUSTER_PASSWORD}"
  702. },
  703. {
  704. "name": "MQ_QUEUES",
  705. "value": "${MQ_QUEUES}"
  706. },
  707. {
  708. "name": "MQ_TOPICS",
  709. "value": "${MQ_TOPICS}"
  710. },
  711. {
  712. "name": "JGROUPS_ENCRYPT_SECRET",
  713. "value": "${JGROUPS_ENCRYPT_SECRET}"
  714. },
  715. {
  716. "name": "JGROUPS_ENCRYPT_KEYSTORE_DIR",
  717. "value": "/etc/jgroups-encrypt-secret-volume"
  718. },
  719. {
  720. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  721. "value": "${JGROUPS_ENCRYPT_KEYSTORE}"
  722. },
  723. {
  724. "name": "JGROUPS_ENCRYPT_NAME",
  725. "value": "${JGROUPS_ENCRYPT_NAME}"
  726. },
  727. {
  728. "name": "JGROUPS_ENCRYPT_PASSWORD",
  729. "value": "${JGROUPS_ENCRYPT_PASSWORD}"
  730. },
  731. {
  732. "name": "JGROUPS_CLUSTER_PASSWORD",
  733. "value": "${JGROUPS_CLUSTER_PASSWORD}"
  734. },
  735. {
  736. "name": "AUTO_DEPLOY_EXPLODED",
  737. "value": "${AUTO_DEPLOY_EXPLODED}"
  738. }
  739. ]
  740. }
  741. ],
  742. "volumes": [
  743. {
  744. "name": "eap-keystore-volume",
  745. "secret": {
  746. "secretName": "${HTTPS_SECRET}"
  747. }
  748. },
  749. {
  750. "name": "eap-jgroups-keystore-volume",
  751. "secret": {
  752. "secretName": "${JGROUPS_ENCRYPT_SECRET}"
  753. }
  754. }
  755. ]
  756. }
  757. }
  758. }
  759. },
  760. {
  761. "kind": "DeploymentConfig",
  762. "apiVersion": "v1",
  763. "metadata": {
  764. "name": "${APPLICATION_NAME}-mongodb",
  765. "labels": {
  766. "application": "${APPLICATION_NAME}"
  767. }
  768. },
  769. "spec": {
  770. "strategy": {
  771. "type": "Recreate"
  772. },
  773. "triggers": [
  774. {
  775. "type": "ImageChange",
  776. "imageChangeParams": {
  777. "automatic": true,
  778. "containerNames": [
  779. "${APPLICATION_NAME}-mongodb"
  780. ],
  781. "from": {
  782. "kind": "ImageStreamTag",
  783. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  784. "name": "mongodb:${MONGODB_IMAGE_STREAM_TAG}"
  785. }
  786. }
  787. },
  788. {
  789. "type": "ConfigChange"
  790. }
  791. ],
  792. "replicas": 1,
  793. "selector": {
  794. "deploymentConfig": "${APPLICATION_NAME}-mongodb"
  795. },
  796. "template": {
  797. "metadata": {
  798. "name": "${APPLICATION_NAME}-mongodb",
  799. "labels": {
  800. "deploymentConfig": "${APPLICATION_NAME}-mongodb",
  801. "application": "${APPLICATION_NAME}"
  802. }
  803. },
  804. "spec": {
  805. "terminationGracePeriodSeconds": 60,
  806. "containers": [
  807. {
  808. "name": "${APPLICATION_NAME}-mongodb",
  809. "image": "mongodb",
  810. "imagePullPolicy": "Always",
  811. "ports": [
  812. {
  813. "containerPort": 27017,
  814. "protocol": "TCP"
  815. }
  816. ],
  817. "readinessProbe": {
  818. "timeoutSeconds": 1,
  819. "initialDelaySeconds": 3,
  820. "exec": {
  821. "command": [ "/bin/sh", "-i", "-c", "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\""]
  822. }
  823. },
  824. "livenessProbe": {
  825. "timeoutSeconds": 1,
  826. "initialDelaySeconds": 30,
  827. "tcpSocket": {
  828. "port": 27017
  829. }
  830. },
  831. "volumeMounts": [
  832. {
  833. "mountPath": "/var/lib/mongodb/data",
  834. "name": "${APPLICATION_NAME}-mongodb-pvol"
  835. }
  836. ],
  837. "env": [
  838. {
  839. "name": "MONGODB_USER",
  840. "value": "${DB_USERNAME}"
  841. },
  842. {
  843. "name": "MONGODB_PASSWORD",
  844. "value": "${DB_PASSWORD}"
  845. },
  846. {
  847. "name": "MONGODB_DATABASE",
  848. "value": "${DB_DATABASE}"
  849. },
  850. {
  851. "name": "MONGODB_ADMIN_PASSWORD",
  852. "value": "${DB_ADMIN_PASSWORD}"
  853. },
  854. {
  855. "name": "MONGODB_NOPREALLOC",
  856. "value": "${MONGODB_NOPREALLOC}"
  857. },
  858. {
  859. "name": "MONGODB_SMALLFILES",
  860. "value": "${MONGODB_SMALLFILES}"
  861. },
  862. {
  863. "name": "MONGODB_QUIET",
  864. "value": "${MONGODB_QUIET}"
  865. }
  866. ]
  867. }
  868. ],
  869. "volumes": [
  870. {
  871. "name": "${APPLICATION_NAME}-mongodb-pvol",
  872. "persistentVolumeClaim": {
  873. "claimName": "${APPLICATION_NAME}-mongodb-claim"
  874. }
  875. }
  876. ]
  877. }
  878. }
  879. }
  880. },
  881. {
  882. "apiVersion": "v1",
  883. "kind": "PersistentVolumeClaim",
  884. "metadata": {
  885. "name": "${APPLICATION_NAME}-mongodb-claim",
  886. "labels": {
  887. "application": "${APPLICATION_NAME}"
  888. }
  889. },
  890. "spec": {
  891. "accessModes": [
  892. "ReadWriteOnce"
  893. ],
  894. "resources": {
  895. "requests": {
  896. "storage": "${VOLUME_CAPACITY}"
  897. }
  898. }
  899. }
  900. }
  901. ]
  902. }