datavirt63-secure-s2i.json 26 KB

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