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

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