eap-cd-third-party-db-s2i.json 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  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 (with https, DB drivers)",
  10. "openshift.io/provider-display-name": "Red Hat, Inc.",
  11. "description": "An example JBoss Enterprise Application Platform continuous delivery application. 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, using third-party DB drivers 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-third-party-db-s2i"
  17. },
  18. "labels": {
  19. "template": "eap-cd-third-party-db-s2i",
  20. "xpaas": "1.5.0"
  21. },
  22. "message": "A new EAP 7 based application with SSL support has been created in your project. Please be sure to create the following secrets:\"${CONFIGURATION_NAME}\" containing the datasource configuration details required by the deployed application(s); \"${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": "Configuration Secret Name",
  33. "description": "The name of the secret containing configuration properties for the datasources.",
  34. "name": "CONFIGURATION_NAME",
  35. "value": "eap-app-config",
  36. "required": true
  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": "datavirt/hibernate-webapp",
  64. "required": false
  65. },
  66. {
  67. "displayName": "Drivers ImageStreamTag",
  68. "description": "ImageStreamTag definition for the image containing the drivers and configuration, e.g. jboss-datavirt63-driver-openshift:1.1",
  69. "name": "EXTENSIONS_IMAGE",
  70. "value": "jboss-datavirt63-driver-openshift:1.1",
  71. "required": true
  72. },
  73. {
  74. "displayName": "Drivers ImageStream Namespace",
  75. "description": "Namespace within which the ImageStream definition for the image containing the drivers and configuration is located.",
  76. "name": "EXTENSIONS_IMAGE_NAMESPACE",
  77. "value": "openshift",
  78. "required": true
  79. },
  80. {
  81. "displayName": "Drivers Image Install Directory",
  82. "description": "Full path to the directory within the extensions image where the extensions are located (e.g. install.sh, modules/, etc.)",
  83. "name": "EXTENSIONS_INSTALL_DIR",
  84. "value": "/extensions",
  85. "required": true
  86. },
  87. {
  88. "displayName": "Queue Names",
  89. "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.",
  90. "name": "MQ_QUEUES",
  91. "value": "",
  92. "required": false
  93. },
  94. {
  95. "displayName": "Topic Names",
  96. "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.",
  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": "eap-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": "jboss",
  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": "mykeystorepass",
  134. "required": false
  135. },
  136. {
  137. "displayName": "Messaging Cluster Admin Password",
  138. "description": "Admin password for Messaging cluster.",
  139. "name": "MQ_CLUSTER_PASSWORD",
  140. "from": "[a-zA-Z0-9]{8}",
  141. "generate": "expression",
  142. "required": true
  143. },
  144. {
  145. "displayName": "Github Webhook Secret",
  146. "description": "A secret string used to configure the GitHub webhook.",
  147. "name": "GITHUB_WEBHOOK_SECRET",
  148. "from": "[a-zA-Z0-9]{8}",
  149. "generate": "expression",
  150. "required": true
  151. },
  152. {
  153. "displayName": "Generic Webhook Secret",
  154. "description": "A secret string used to configure the Generic webhook.",
  155. "name": "GENERIC_WEBHOOK_SECRET",
  156. "from": "[a-zA-Z0-9]{8}",
  157. "generate": "expression",
  158. "required": true
  159. },
  160. {
  161. "displayName": "ImageStream Namespace",
  162. "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.",
  163. "name": "IMAGE_STREAM_NAMESPACE",
  164. "value": "openshift",
  165. "required": true
  166. },
  167. {
  168. "displayName": "JGroups Secret Name",
  169. "description": "The name of the secret containing the keystore to be used for securing JGroups communications.",
  170. "name": "JGROUPS_ENCRYPT_SECRET",
  171. "value": "eap-app-secret",
  172. "required": false
  173. },
  174. {
  175. "displayName": "JGroups Keystore Filename",
  176. "description": "The name of the keystore file within the JGroups secret.",
  177. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  178. "value": "jgroups.jceks",
  179. "required": false
  180. },
  181. {
  182. "displayName": "JGroups Certificate Name",
  183. "description": "The name associated with the JGroups server certificate",
  184. "name": "JGROUPS_ENCRYPT_NAME",
  185. "value": "secret-key",
  186. "required": false
  187. },
  188. {
  189. "displayName": "JGroups Keystore Password",
  190. "description": "The password for the keystore and certificate",
  191. "name": "JGROUPS_ENCRYPT_PASSWORD",
  192. "value": "password",
  193. "required": false
  194. },
  195. {
  196. "displayName": "JGroups Cluster Password",
  197. "description": "Password used by JGroups to authenticate nodes in the cluster.",
  198. "name": "JGROUPS_CLUSTER_PASSWORD",
  199. "from": "[a-zA-Z0-9]{8}",
  200. "generate": "expression",
  201. "required": true
  202. },
  203. {
  204. "displayName": "Deploy Exploded Archives",
  205. "description": "Controls whether exploded deployment content should be automatically deployed",
  206. "name": "AUTO_DEPLOY_EXPLODED",
  207. "value": "false",
  208. "required": false
  209. },
  210. {
  211. "displayName": "Maven mirror URL",
  212. "description": "Maven mirror to use for S2I builds",
  213. "name": "MAVEN_MIRROR_URL",
  214. "value": "",
  215. "required": false
  216. },
  217. {
  218. "displayName": "Maven Additional Arguments",
  219. "description": "Maven additional arguments to use for S2I builds",
  220. "name": "MAVEN_ARGS_APPEND",
  221. "value": "",
  222. "required": false
  223. },
  224. {
  225. "description": "List of directories from which archives will be copied into the deployment folder. If unspecified, all archives in /target will be copied.",
  226. "name": "ARTIFACT_DIR",
  227. "value": "",
  228. "required": false
  229. },
  230. {
  231. "description": "Container memory limit",
  232. "name": "MEMORY_LIMIT",
  233. "value": "1Gi",
  234. "required": false
  235. }
  236. ],
  237. "objects": [
  238. {
  239. "kind": "Service",
  240. "apiVersion": "v1",
  241. "spec": {
  242. "ports": [
  243. {
  244. "port": 8080,
  245. "targetPort": 8080
  246. }
  247. ],
  248. "selector": {
  249. "deploymentConfig": "${APPLICATION_NAME}"
  250. }
  251. },
  252. "metadata": {
  253. "name": "${APPLICATION_NAME}",
  254. "labels": {
  255. "application": "${APPLICATION_NAME}"
  256. },
  257. "annotations": {
  258. "description": "The web server's http port."
  259. }
  260. }
  261. },
  262. {
  263. "kind": "Service",
  264. "apiVersion": "v1",
  265. "spec": {
  266. "ports": [
  267. {
  268. "port": 8443,
  269. "targetPort": 8443
  270. }
  271. ],
  272. "selector": {
  273. "deploymentConfig": "${APPLICATION_NAME}"
  274. }
  275. },
  276. "metadata": {
  277. "name": "secure-${APPLICATION_NAME}",
  278. "labels": {
  279. "application": "${APPLICATION_NAME}"
  280. },
  281. "annotations": {
  282. "description": "The web server's https port."
  283. }
  284. }
  285. },
  286. {
  287. "kind": "Service",
  288. "apiVersion": "v1",
  289. "spec": {
  290. "clusterIP": "None",
  291. "ports": [
  292. {
  293. "name": "ping",
  294. "port": 8888
  295. }
  296. ],
  297. "selector": {
  298. "deploymentConfig": "${APPLICATION_NAME}"
  299. }
  300. },
  301. "metadata": {
  302. "name": "${APPLICATION_NAME}-ping",
  303. "labels": {
  304. "application": "${APPLICATION_NAME}"
  305. },
  306. "annotations": {
  307. "service.alpha.kubernetes.io/tolerate-unready-endpoints": "true",
  308. "description": "The JGroups ping port for clustering."
  309. }
  310. }
  311. },
  312. {
  313. "kind": "Route",
  314. "apiVersion": "v1",
  315. "id": "${APPLICATION_NAME}-http",
  316. "metadata": {
  317. "name": "${APPLICATION_NAME}",
  318. "labels": {
  319. "application": "${APPLICATION_NAME}"
  320. },
  321. "annotations": {
  322. "description": "Route for application's http service."
  323. }
  324. },
  325. "spec": {
  326. "to": {
  327. "name": "${APPLICATION_NAME}"
  328. }
  329. }
  330. },
  331. {
  332. "kind": "Route",
  333. "apiVersion": "v1",
  334. "id": "${APPLICATION_NAME}-https",
  335. "metadata": {
  336. "name": "secure-${APPLICATION_NAME}",
  337. "labels": {
  338. "application": "${APPLICATION_NAME}"
  339. },
  340. "annotations": {
  341. "description": "Route for application's https service."
  342. }
  343. },
  344. "spec": {
  345. "host": "${HOSTNAME_HTTPS}",
  346. "to": {
  347. "name": "secure-${APPLICATION_NAME}"
  348. },
  349. "tls": {
  350. "termination": "passthrough"
  351. }
  352. }
  353. },
  354. {
  355. "kind": "ImageStream",
  356. "apiVersion": "v1",
  357. "metadata": {
  358. "name": "${APPLICATION_NAME}",
  359. "labels": {
  360. "application": "${APPLICATION_NAME}"
  361. }
  362. }
  363. },
  364. {
  365. "kind": "BuildConfig",
  366. "apiVersion": "v1",
  367. "metadata": {
  368. "name": "${APPLICATION_NAME}",
  369. "labels": {
  370. "application": "${APPLICATION_NAME}"
  371. }
  372. },
  373. "spec": {
  374. "source": {
  375. "type": "Git",
  376. "git": {
  377. "uri": "${SOURCE_REPOSITORY_URL}",
  378. "ref": "${SOURCE_REPOSITORY_REF}"
  379. },
  380. "contextDir": "${CONTEXT_DIR}",
  381. "images": [
  382. {
  383. "from": {
  384. "kind": "ImageStreamTag",
  385. "namespace": "${EXTENSIONS_IMAGE_NAMESPACE}",
  386. "name": "${EXTENSIONS_IMAGE}"
  387. },
  388. "paths": [
  389. {
  390. "destinationDir": "./${CONTEXT_DIR}/extensions/extras",
  391. "sourcePath": "${EXTENSIONS_INSTALL_DIR}/."
  392. }
  393. ]
  394. }
  395. ]
  396. },
  397. "strategy": {
  398. "type": "Source",
  399. "sourceStrategy": {
  400. "env": [
  401. {
  402. "name": "MAVEN_MIRROR_URL",
  403. "value": "${MAVEN_MIRROR_URL}"
  404. },
  405. {
  406. "name": "MAVEN_ARGS_APPEND",
  407. "value": "${MAVEN_ARGS_APPEND}"
  408. },
  409. {
  410. "name": "CUSTOM_INSTALL_DIRECTORIES",
  411. "value": "extensions/*"
  412. },
  413. {
  414. "name": "ARTIFACT_DIR",
  415. "value": "${ARTIFACT_DIR}"
  416. }
  417. ],
  418. "forcePull": true,
  419. "from": {
  420. "kind": "ImageStreamTag",
  421. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  422. "name": "eap-cd-openshift:13"
  423. }
  424. }
  425. },
  426. "output": {
  427. "to": {
  428. "kind": "ImageStreamTag",
  429. "name": "${APPLICATION_NAME}:latest"
  430. }
  431. },
  432. "triggers": [
  433. {
  434. "type": "GitHub",
  435. "github": {
  436. "secret": "${GITHUB_WEBHOOK_SECRET}"
  437. }
  438. },
  439. {
  440. "type": "Generic",
  441. "generic": {
  442. "secret": "${GENERIC_WEBHOOK_SECRET}"
  443. }
  444. },
  445. {
  446. "type": "ImageChange",
  447. "imageChange": {}
  448. },
  449. {
  450. "type": "ImageChange",
  451. "imageChange": {
  452. "from": {
  453. "kind": "ImageStreamTag",
  454. "namespace": "${EXTENSIONS_IMAGE_NAMESPACE}",
  455. "name": "${EXTENSIONS_IMAGE}"
  456. }
  457. }
  458. },
  459. {
  460. "type": "ConfigChange"
  461. }
  462. ]
  463. }
  464. },
  465. {
  466. "kind": "DeploymentConfig",
  467. "apiVersion": "v1",
  468. "metadata": {
  469. "name": "${APPLICATION_NAME}",
  470. "labels": {
  471. "application": "${APPLICATION_NAME}"
  472. }
  473. },
  474. "spec": {
  475. "strategy": {
  476. "type": "Recreate"
  477. },
  478. "triggers": [
  479. {
  480. "type": "ImageChange",
  481. "imageChangeParams": {
  482. "automatic": true,
  483. "containerNames": [
  484. "${APPLICATION_NAME}"
  485. ],
  486. "from": {
  487. "kind": "ImageStreamTag",
  488. "name": "${APPLICATION_NAME}:latest"
  489. }
  490. }
  491. },
  492. {
  493. "type": "ConfigChange"
  494. }
  495. ],
  496. "replicas": 1,
  497. "selector": {
  498. "deploymentConfig": "${APPLICATION_NAME}"
  499. },
  500. "template": {
  501. "metadata": {
  502. "name": "${APPLICATION_NAME}",
  503. "labels": {
  504. "deploymentConfig": "${APPLICATION_NAME}",
  505. "application": "${APPLICATION_NAME}"
  506. }
  507. },
  508. "spec": {
  509. "terminationGracePeriodSeconds": 75,
  510. "containers": [
  511. {
  512. "name": "${APPLICATION_NAME}",
  513. "image": "${APPLICATION_NAME}",
  514. "imagePullPolicy": "Always",
  515. "resources": {
  516. "limits": {
  517. "memory": "${MEMORY_LIMIT}"
  518. }
  519. },
  520. "volumeMounts": [
  521. {
  522. "name": "configuration",
  523. "mountPath": "/etc/eap-environment",
  524. "readOnly": true
  525. },
  526. {
  527. "name": "eap-keystore-volume",
  528. "mountPath": "/etc/eap-secret-volume",
  529. "readOnly": true
  530. },
  531. {
  532. "name": "eap-jgroups-keystore-volume",
  533. "mountPath": "/etc/jgroups-encrypt-secret-volume",
  534. "readOnly": true
  535. }
  536. ],
  537. "livenessProbe": {
  538. "exec": {
  539. "command": [
  540. "/bin/bash",
  541. "-c",
  542. "/opt/eap/bin/livenessProbe.sh"
  543. ]
  544. },
  545. "initialDelaySeconds": 60
  546. },
  547. "readinessProbe": {
  548. "exec": {
  549. "command": [
  550. "/bin/bash",
  551. "-c",
  552. "/opt/eap/bin/readinessProbe.sh"
  553. ]
  554. }
  555. },
  556. "ports": [
  557. {
  558. "name": "jolokia",
  559. "containerPort": 8778,
  560. "protocol": "TCP"
  561. },
  562. {
  563. "name": "http",
  564. "containerPort": 8080,
  565. "protocol": "TCP"
  566. },
  567. {
  568. "name": "https",
  569. "containerPort": 8443,
  570. "protocol": "TCP"
  571. },
  572. {
  573. "name": "ping",
  574. "containerPort": 8888,
  575. "protocol": "TCP"
  576. }
  577. ],
  578. "env": [
  579. {
  580. "name": "JGROUPS_PING_PROTOCOL",
  581. "value": "openshift.DNS_PING"
  582. },
  583. {
  584. "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
  585. "value": "${APPLICATION_NAME}-ping"
  586. },
  587. {
  588. "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
  589. "value": "8888"
  590. },
  591. {
  592. "name": "ENV_FILES",
  593. "value": "/etc/eap-environment/*"
  594. },
  595. {
  596. "name": "HTTPS_KEYSTORE_DIR",
  597. "value": "/etc/eap-secret-volume"
  598. },
  599. {
  600. "name": "HTTPS_KEYSTORE",
  601. "value": "${HTTPS_KEYSTORE}"
  602. },
  603. {
  604. "name": "HTTPS_KEYSTORE_TYPE",
  605. "value": "${HTTPS_KEYSTORE_TYPE}"
  606. },
  607. {
  608. "name": "HTTPS_NAME",
  609. "value": "${HTTPS_NAME}"
  610. },
  611. {
  612. "name": "HTTPS_PASSWORD",
  613. "value": "${HTTPS_PASSWORD}"
  614. },
  615. {
  616. "name": "MQ_CLUSTER_PASSWORD",
  617. "value": "${MQ_CLUSTER_PASSWORD}"
  618. },
  619. {
  620. "name": "MQ_QUEUES",
  621. "value": "${MQ_QUEUES}"
  622. },
  623. {
  624. "name": "MQ_TOPICS",
  625. "value": "${MQ_TOPICS}"
  626. },
  627. {
  628. "name": "JGROUPS_ENCRYPT_SECRET",
  629. "value": "${JGROUPS_ENCRYPT_SECRET}"
  630. },
  631. {
  632. "name": "JGROUPS_ENCRYPT_KEYSTORE_DIR",
  633. "value": "/etc/jgroups-encrypt-secret-volume"
  634. },
  635. {
  636. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  637. "value": "${JGROUPS_ENCRYPT_KEYSTORE}"
  638. },
  639. {
  640. "name": "JGROUPS_ENCRYPT_NAME",
  641. "value": "${JGROUPS_ENCRYPT_NAME}"
  642. },
  643. {
  644. "name": "JGROUPS_ENCRYPT_PASSWORD",
  645. "value": "${JGROUPS_ENCRYPT_PASSWORD}"
  646. },
  647. {
  648. "name": "JGROUPS_CLUSTER_PASSWORD",
  649. "value": "${JGROUPS_CLUSTER_PASSWORD}"
  650. },
  651. {
  652. "name": "AUTO_DEPLOY_EXPLODED",
  653. "value": "${AUTO_DEPLOY_EXPLODED}"
  654. }
  655. ]
  656. }
  657. ],
  658. "volumes": [
  659. {
  660. "name": "configuration",
  661. "secret": {
  662. "secretName": "${CONFIGURATION_NAME}"
  663. }
  664. },
  665. {
  666. "name": "eap-keystore-volume",
  667. "secret": {
  668. "secretName": "${HTTPS_SECRET}"
  669. }
  670. },
  671. {
  672. "name": "eap-jgroups-keystore-volume",
  673. "secret": {
  674. "secretName": "${JGROUPS_ENCRYPT_SECRET}"
  675. }
  676. }
  677. ]
  678. }
  679. }
  680. }
  681. }
  682. ]
  683. }