eap64-third-party-db-s2i.json 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  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.8",
  9. "openshift.io/display-name": "Red Hat JBoss EAP 6.4 (with https, DB drivers)",
  10. "openshift.io/provider-display-name": "Red Hat, Inc.",
  11. "description": "An example EAP 6 DB application. 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, 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": "eap64-third-party-db-s2i"
  17. },
  18. "labels": {
  19. "template": "eap64-third-party-db-s2i",
  20. "xpaas": "1.4.8"
  21. },
  22. "message": "A new EAP 6 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 http Route Hostname",
  40. "description": "Custom hostname for http service route. Leave blank for default hostname, e.g.: <application-name>-<project>.<default-domain-suffix>",
  41. "name": "HOSTNAME_HTTP",
  42. "value": "",
  43. "required": false
  44. },
  45. {
  46. "displayName": "Custom https Route Hostname",
  47. "description": "Custom hostname for https service route. Leave blank for default hostname, e.g.: secure-<application-name>-<project>.<default-domain-suffix>",
  48. "name": "HOSTNAME_HTTPS",
  49. "value": "",
  50. "required": false
  51. },
  52. {
  53. "displayName": "Git Repository URL",
  54. "description": "Git source URI for application",
  55. "name": "SOURCE_REPOSITORY_URL",
  56. "value": "https://github.com/jboss-openshift/openshift-quickstarts",
  57. "required": true
  58. },
  59. {
  60. "displayName": "Git Reference",
  61. "description": "Git branch/tag reference",
  62. "name": "SOURCE_REPOSITORY_REF",
  63. "value": "master",
  64. "required": false
  65. },
  66. {
  67. "displayName": "Context Directory",
  68. "description": "Path within Git project to build; empty for root project directory.",
  69. "name": "CONTEXT_DIR",
  70. "value": "datavirt/hibernate-webapp",
  71. "required": false
  72. },
  73. {
  74. "displayName": "Drivers ImageStreamTag",
  75. "description": "ImageStreamTag definition for the image containing the drivers and configuration, e.g. jboss-datavirt63-driver-openshift:1.1",
  76. "name": "EXTENSIONS_IMAGE",
  77. "value": "jboss-datavirt63-driver-openshift:1.1",
  78. "required": true
  79. },
  80. {
  81. "displayName": "Drivers ImageStream Namespace",
  82. "description": "Namespace within which the ImageStream definition for the image containing the drivers and configuration is located.",
  83. "name": "EXTENSIONS_IMAGE_NAMESPACE",
  84. "value": "openshift",
  85. "required": true
  86. },
  87. {
  88. "displayName": "Drivers Image Install Directory",
  89. "description": "Full path to the directory within the extensions image where the extensions are located (e.g. install.sh, modules/, etc.)",
  90. "name": "EXTENSIONS_INSTALL_DIR",
  91. "value": "/extensions",
  92. "required": true
  93. },
  94. {
  95. "displayName": "Queue Names",
  96. "description": "Queue names to preconfigure within HornetQ subsystem.",
  97. "name": "HORNETQ_QUEUES",
  98. "value": "",
  99. "required": false
  100. },
  101. {
  102. "displayName": "Topic Names",
  103. "description": "Topic names to preconfigure within HornetQ subsystem.",
  104. "name": "HORNETQ_TOPICS",
  105. "value": "",
  106. "required": false
  107. },
  108. {
  109. "displayName": "Server Keystore Secret Name",
  110. "description": "The name of the secret containing the keystore file",
  111. "name": "HTTPS_SECRET",
  112. "value": "eap-app-secret",
  113. "required": true
  114. },
  115. {
  116. "displayName": "Server Keystore Filename",
  117. "description": "The name of the keystore file within the secret",
  118. "name": "HTTPS_KEYSTORE",
  119. "value": "keystore.jks",
  120. "required": false
  121. },
  122. {
  123. "displayName": "Server Keystore Type",
  124. "description": "The type of the keystore file (JKS or JCEKS)",
  125. "name": "HTTPS_KEYSTORE_TYPE",
  126. "value": "",
  127. "required": false
  128. },
  129. {
  130. "displayName": "Server Certificate Name",
  131. "description": "The name associated with the server certificate",
  132. "name": "HTTPS_NAME",
  133. "value": "jboss",
  134. "required": false
  135. },
  136. {
  137. "displayName": "Server Keystore Password",
  138. "description": "The password for the keystore and certificate",
  139. "name": "HTTPS_PASSWORD",
  140. "value": "mykeystorepass",
  141. "required": false
  142. },
  143. {
  144. "displayName": "HornetQ Cluster Admin Password",
  145. "description": "Admin password for HornetQ cluster.",
  146. "name": "HORNETQ_CLUSTER_PASSWORD",
  147. "from": "[a-zA-Z0-9]{8}",
  148. "generate": "expression",
  149. "required": true
  150. },
  151. {
  152. "displayName": "Github Webhook Secret",
  153. "description": "A secret string used to configure the GitHub webhook.",
  154. "name": "GITHUB_WEBHOOK_SECRET",
  155. "from": "[a-zA-Z0-9]{8}",
  156. "generate": "expression",
  157. "required": true
  158. },
  159. {
  160. "displayName": "Generic Webhook Secret",
  161. "description": "A secret string used to configure the Generic webhook.",
  162. "name": "GENERIC_WEBHOOK_SECRET",
  163. "from": "[a-zA-Z0-9]{8}",
  164. "generate": "expression",
  165. "required": true
  166. },
  167. {
  168. "displayName": "ImageStream Namespace",
  169. "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.",
  170. "name": "IMAGE_STREAM_NAMESPACE",
  171. "value": "openshift",
  172. "required": true
  173. },
  174. {
  175. "displayName": "JGroups Secret Name",
  176. "description": "The name of the secret containing the keystore to be used for securing JGroups communications.",
  177. "name": "JGROUPS_ENCRYPT_SECRET",
  178. "value": "eap-app-secret",
  179. "required": false
  180. },
  181. {
  182. "displayName": "JGroups Keystore Filename",
  183. "description": "The name of the keystore file within the JGroups secret.",
  184. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  185. "value": "jgroups.jceks",
  186. "required": false
  187. },
  188. {
  189. "displayName": "JGroups Certificate Name",
  190. "description": "The name associated with the JGroups server certificate",
  191. "name": "JGROUPS_ENCRYPT_NAME",
  192. "value": "secret-key",
  193. "required": false
  194. },
  195. {
  196. "displayName": "JGroups Keystore Password",
  197. "description": "The password for the keystore and certificate",
  198. "name": "JGROUPS_ENCRYPT_PASSWORD",
  199. "value": "password",
  200. "required": false
  201. },
  202. {
  203. "displayName": "JGroups Cluster Password",
  204. "description": "Password used by JGroups to authenticate nodes in the cluster.",
  205. "name": "JGROUPS_CLUSTER_PASSWORD",
  206. "from": "[a-zA-Z0-9]{8}",
  207. "generate": "expression",
  208. "required": true
  209. },
  210. {
  211. "displayName": "Deploy Exploded Archives",
  212. "description": "Controls whether exploded deployment content should be automatically deployed",
  213. "name": "AUTO_DEPLOY_EXPLODED",
  214. "value": "false",
  215. "required": false
  216. },
  217. {
  218. "displayName": "Maven mirror URL",
  219. "description": "Maven mirror to use for S2I builds",
  220. "name": "MAVEN_MIRROR_URL",
  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": "Route",
  288. "apiVersion": "v1",
  289. "id": "${APPLICATION_NAME}-http",
  290. "metadata": {
  291. "name": "${APPLICATION_NAME}",
  292. "labels": {
  293. "application": "${APPLICATION_NAME}"
  294. },
  295. "annotations": {
  296. "description": "Route for application's http service."
  297. }
  298. },
  299. "spec": {
  300. "host": "${HOSTNAME_HTTP}",
  301. "to": {
  302. "name": "${APPLICATION_NAME}"
  303. }
  304. }
  305. },
  306. {
  307. "kind": "Service",
  308. "apiVersion": "v1",
  309. "spec": {
  310. "clusterIP": "None",
  311. "ports": [
  312. {
  313. "name": "ping",
  314. "port": 8888
  315. }
  316. ],
  317. "selector": {
  318. "deploymentConfig": "${APPLICATION_NAME}"
  319. }
  320. },
  321. "metadata": {
  322. "name": "${APPLICATION_NAME}-ping",
  323. "labels": {
  324. "application": "${APPLICATION_NAME}"
  325. },
  326. "annotations": {
  327. "service.alpha.kubernetes.io/tolerate-unready-endpoints": "true",
  328. "description": "The JGroups ping port for clustering."
  329. }
  330. }
  331. },
  332. {
  333. "kind": "Route",
  334. "apiVersion": "v1",
  335. "id": "${APPLICATION_NAME}-https",
  336. "metadata": {
  337. "name": "secure-${APPLICATION_NAME}",
  338. "labels": {
  339. "application": "${APPLICATION_NAME}"
  340. },
  341. "annotations": {
  342. "description": "Route for application's https service."
  343. }
  344. },
  345. "spec": {
  346. "host": "${HOSTNAME_HTTPS}",
  347. "to": {
  348. "name": "secure-${APPLICATION_NAME}"
  349. },
  350. "tls": {
  351. "termination": "passthrough"
  352. }
  353. }
  354. },
  355. {
  356. "kind": "ImageStream",
  357. "apiVersion": "v1",
  358. "metadata": {
  359. "name": "${APPLICATION_NAME}",
  360. "labels": {
  361. "application": "${APPLICATION_NAME}"
  362. }
  363. }
  364. },
  365. {
  366. "kind": "BuildConfig",
  367. "apiVersion": "v1",
  368. "metadata": {
  369. "name": "${APPLICATION_NAME}",
  370. "labels": {
  371. "application": "${APPLICATION_NAME}"
  372. }
  373. },
  374. "spec": {
  375. "source": {
  376. "type": "Git",
  377. "git": {
  378. "uri": "${SOURCE_REPOSITORY_URL}",
  379. "ref": "${SOURCE_REPOSITORY_REF}"
  380. },
  381. "contextDir": "${CONTEXT_DIR}",
  382. "images": [
  383. {
  384. "from": {
  385. "kind": "ImageStreamTag",
  386. "namespace": "${EXTENSIONS_IMAGE_NAMESPACE}",
  387. "name": "${EXTENSIONS_IMAGE}"
  388. },
  389. "paths": [
  390. {
  391. "destinationDir": "./${CONTEXT_DIR}/extensions/extras",
  392. "sourcePath": "${EXTENSIONS_INSTALL_DIR}/."
  393. }
  394. ]
  395. }
  396. ]
  397. },
  398. "strategy": {
  399. "type": "Source",
  400. "sourceStrategy": {
  401. "env": [
  402. {
  403. "name": "MAVEN_MIRROR_URL",
  404. "value": "${MAVEN_MIRROR_URL}"
  405. },
  406. {
  407. "name": "CUSTOM_INSTALL_DIRECTORIES",
  408. "value": "extensions/*"
  409. },
  410. {
  411. "name": "ARTIFACT_DIR",
  412. "value": "${ARTIFACT_DIR}"
  413. }
  414. ],
  415. "forcePull": true,
  416. "from": {
  417. "kind": "ImageStreamTag",
  418. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  419. "name": "jboss-eap64-openshift:1.7"
  420. }
  421. }
  422. },
  423. "output": {
  424. "to": {
  425. "kind": "ImageStreamTag",
  426. "name": "${APPLICATION_NAME}:latest"
  427. }
  428. },
  429. "triggers": [
  430. {
  431. "type": "GitHub",
  432. "github": {
  433. "secret": "${GITHUB_WEBHOOK_SECRET}"
  434. }
  435. },
  436. {
  437. "type": "Generic",
  438. "generic": {
  439. "secret": "${GENERIC_WEBHOOK_SECRET}"
  440. }
  441. },
  442. {
  443. "type": "ImageChange",
  444. "imageChange": {}
  445. },
  446. {
  447. "type": "ImageChange",
  448. "imageChange": {
  449. "from": {
  450. "kind": "ImageStreamTag",
  451. "namespace": "${EXTENSIONS_IMAGE_NAMESPACE}",
  452. "name": "${EXTENSIONS_IMAGE}"
  453. }
  454. }
  455. },
  456. {
  457. "type": "ConfigChange"
  458. }
  459. ]
  460. }
  461. },
  462. {
  463. "kind": "DeploymentConfig",
  464. "apiVersion": "v1",
  465. "metadata": {
  466. "name": "${APPLICATION_NAME}",
  467. "labels": {
  468. "application": "${APPLICATION_NAME}"
  469. }
  470. },
  471. "spec": {
  472. "strategy": {
  473. "type": "Recreate"
  474. },
  475. "triggers": [
  476. {
  477. "type": "ImageChange",
  478. "imageChangeParams": {
  479. "automatic": true,
  480. "containerNames": [
  481. "${APPLICATION_NAME}"
  482. ],
  483. "from": {
  484. "kind": "ImageStreamTag",
  485. "name": "${APPLICATION_NAME}:latest"
  486. }
  487. }
  488. },
  489. {
  490. "type": "ConfigChange"
  491. }
  492. ],
  493. "replicas": 1,
  494. "selector": {
  495. "deploymentConfig": "${APPLICATION_NAME}"
  496. },
  497. "template": {
  498. "metadata": {
  499. "name": "${APPLICATION_NAME}",
  500. "labels": {
  501. "deploymentConfig": "${APPLICATION_NAME}",
  502. "application": "${APPLICATION_NAME}"
  503. }
  504. },
  505. "spec": {
  506. "terminationGracePeriodSeconds": 60,
  507. "containers": [
  508. {
  509. "name": "${APPLICATION_NAME}",
  510. "image": "${APPLICATION_NAME}",
  511. "imagePullPolicy": "Always",
  512. "resources": {
  513. "limits": {
  514. "memory": "${MEMORY_LIMIT}"
  515. }
  516. },
  517. "volumeMounts": [
  518. {
  519. "name": "configuration",
  520. "mountPath": "/etc/eap-environment",
  521. "readOnly": true
  522. },
  523. {
  524. "name": "eap-keystore-volume",
  525. "mountPath": "/etc/eap-secret-volume",
  526. "readOnly": true
  527. },
  528. {
  529. "name": "eap-jgroups-keystore-volume",
  530. "mountPath": "/etc/jgroups-encrypt-secret-volume",
  531. "readOnly": true
  532. }
  533. ],
  534. "livenessProbe": {
  535. "exec": {
  536. "command": [
  537. "/bin/bash",
  538. "-c",
  539. "/opt/eap/bin/livenessProbe.sh"
  540. ]
  541. },
  542. "initialDelaySeconds": 60
  543. },
  544. "readinessProbe": {
  545. "exec": {
  546. "command": [
  547. "/bin/bash",
  548. "-c",
  549. "/opt/eap/bin/readinessProbe.sh"
  550. ]
  551. }
  552. },
  553. "ports": [
  554. {
  555. "name": "jolokia",
  556. "containerPort": 8778,
  557. "protocol": "TCP"
  558. },
  559. {
  560. "name": "http",
  561. "containerPort": 8080,
  562. "protocol": "TCP"
  563. },
  564. {
  565. "name": "https",
  566. "containerPort": 8443,
  567. "protocol": "TCP"
  568. },
  569. {
  570. "name": "ping",
  571. "containerPort": 8888,
  572. "protocol": "TCP"
  573. }
  574. ],
  575. "env": [
  576. {
  577. "name": "JGROUPS_PING_PROTOCOL",
  578. "value": "openshift.DNS_PING"
  579. },
  580. {
  581. "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
  582. "value": "${APPLICATION_NAME}-ping"
  583. },
  584. {
  585. "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
  586. "value": "8888"
  587. },
  588. {
  589. "name": "ENV_FILES",
  590. "value": "/etc/eap-environment/*"
  591. },
  592. {
  593. "name": "HTTPS_KEYSTORE_DIR",
  594. "value": "/etc/eap-secret-volume"
  595. },
  596. {
  597. "name": "HTTPS_KEYSTORE",
  598. "value": "${HTTPS_KEYSTORE}"
  599. },
  600. {
  601. "name": "HTTPS_KEYSTORE_TYPE",
  602. "value": "${HTTPS_KEYSTORE_TYPE}"
  603. },
  604. {
  605. "name": "HTTPS_NAME",
  606. "value": "${HTTPS_NAME}"
  607. },
  608. {
  609. "name": "HTTPS_PASSWORD",
  610. "value": "${HTTPS_PASSWORD}"
  611. },
  612. {
  613. "name": "HORNETQ_CLUSTER_PASSWORD",
  614. "value": "${HORNETQ_CLUSTER_PASSWORD}"
  615. },
  616. {
  617. "name": "HORNETQ_QUEUES",
  618. "value": "${HORNETQ_QUEUES}"
  619. },
  620. {
  621. "name": "HORNETQ_TOPICS",
  622. "value": "${HORNETQ_TOPICS}"
  623. },
  624. {
  625. "name": "JGROUPS_ENCRYPT_SECRET",
  626. "value": "${JGROUPS_ENCRYPT_SECRET}"
  627. },
  628. {
  629. "name": "JGROUPS_ENCRYPT_KEYSTORE_DIR",
  630. "value": "/etc/jgroups-encrypt-secret-volume"
  631. },
  632. {
  633. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  634. "value": "${JGROUPS_ENCRYPT_KEYSTORE}"
  635. },
  636. {
  637. "name": "JGROUPS_ENCRYPT_NAME",
  638. "value": "${JGROUPS_ENCRYPT_NAME}"
  639. },
  640. {
  641. "name": "JGROUPS_ENCRYPT_PASSWORD",
  642. "value": "${JGROUPS_ENCRYPT_PASSWORD}"
  643. },
  644. {
  645. "name": "JGROUPS_CLUSTER_PASSWORD",
  646. "value": "${JGROUPS_CLUSTER_PASSWORD}"
  647. },
  648. {
  649. "name": "AUTO_DEPLOY_EXPLODED",
  650. "value": "${AUTO_DEPLOY_EXPLODED}"
  651. }
  652. ]
  653. }
  654. ],
  655. "volumes": [
  656. {
  657. "name": "configuration",
  658. "secret": {
  659. "secretName": "${CONFIGURATION_NAME}"
  660. }
  661. },
  662. {
  663. "name": "eap-keystore-volume",
  664. "secret": {
  665. "secretName": "${HTTPS_SECRET}"
  666. }
  667. },
  668. {
  669. "name": "eap-jgroups-keystore-volume",
  670. "secret": {
  671. "secretName": "${JGROUPS_ENCRYPT_SECRET}"
  672. }
  673. }
  674. ]
  675. }
  676. }
  677. }
  678. }
  679. ]
  680. }