datavirt63-basic-s2i.json 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  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.",
  8. "tags": "jdv,datavirt,jboss,xpaas",
  9. "version": "1.4.0"
  10. },
  11. "name": "datavirt63-basic-s2i"
  12. },
  13. "labels": {
  14. "template": "datavirt63-basic-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 secret named ${CONFIGURATION_NAME} containing the datasource configuration details required by the deployed VDB(s).",
  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": "The URL of the repository with your application source code.",
  42. "displayName": "Git Repository URL",
  43. "name": "SOURCE_REPOSITORY_URL",
  44. "value": "https://github.com/jboss-openshift/openshift-quickstarts",
  45. "required": true
  46. },
  47. {
  48. "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
  49. "displayName": "Git Reference",
  50. "name": "SOURCE_REPOSITORY_REF",
  51. "value": "master",
  52. "required": false
  53. },
  54. {
  55. "description": "Set this to the relative path to your project if it is not in the root of your repository.",
  56. "displayName": "Context Directory",
  57. "name": "CONTEXT_DIR",
  58. "value": "datavirt/dynamicvdb-datafederation/app",
  59. "required": false
  60. },
  61. {
  62. "description": "The name of the service account to use for the deployment. The service account should be configured to allow usage of the secret specified by CONFIGURATION_NAME.",
  63. "name": "SERVICE_ACCOUNT_NAME",
  64. "value": "datavirt-service-account",
  65. "required": true
  66. },
  67. {
  68. "description": "Username associated with Teiid data service.",
  69. "displayName": "Teiid Username",
  70. "name": "TEIID_USERNAME",
  71. "from": "[\\a]{8}",
  72. "generate": "expression",
  73. "required": true
  74. },
  75. {
  76. "description": "Password for Teiid user.",
  77. "displayName": "Teiid User Password",
  78. "name": "TEIID_PASSWORD",
  79. "from": "[\\a\\A]{8}[\\d]{1}[\\A]{1}",
  80. "generate": "expression",
  81. "required": true
  82. },
  83. {
  84. "description": "Username associated with ModeShape.",
  85. "displayName": "ModeShape Username",
  86. "name": "MODESHAPE_USERNAME",
  87. "from": "[\\a]{8}",
  88. "generate": "expression",
  89. "required": true
  90. },
  91. {
  92. "description": "Password for ModeShape user.",
  93. "displayName": "ModeShape User Password",
  94. "name": "MODESHAPE_PASSWORD",
  95. "from": "[\\a\\A]{8}[\\d]{1}[\\A]{1}",
  96. "generate": "expression",
  97. "required": true
  98. },
  99. {
  100. "description": "A secret string used to configure the GitHub webhook.",
  101. "displayName": "Github Webhook Secret",
  102. "name": "GITHUB_WEBHOOK_SECRET",
  103. "from": "[a-zA-Z0-9]{8}",
  104. "generate": "expression",
  105. "required": true
  106. },
  107. {
  108. "description": "A secret string used to configure the Generic webhook.",
  109. "displayName": "Generic Webhook Secret",
  110. "name": "GENERIC_WEBHOOK_SECRET",
  111. "from": "[a-zA-Z0-9]{8}",
  112. "generate": "expression",
  113. "required": true
  114. },
  115. {
  116. "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.",
  117. "displayName": "ImageStream Namespace",
  118. "name": "IMAGE_STREAM_NAMESPACE",
  119. "value": "openshift",
  120. "required": true
  121. },
  122. {
  123. "description": "Password used by JGroups to authenticate nodes in the cluster.",
  124. "displayName": "JGroups Cluster Password",
  125. "name": "JGROUPS_CLUSTER_PASSWORD",
  126. "from": "[a-zA-Z0-9]{8}",
  127. "generate": "expression",
  128. "required": true
  129. },
  130. {
  131. "description": "Controls whether exploded deployment content should be automatically deployed",
  132. "displayName": "Deploy Exploded Archives",
  133. "name": "AUTO_DEPLOY_EXPLODED",
  134. "value": "false",
  135. "required": false
  136. }
  137. ],
  138. "objects": [
  139. {
  140. "kind": "Service",
  141. "apiVersion": "v1",
  142. "spec": {
  143. "ports": [
  144. {
  145. "name": "http",
  146. "port": 8080,
  147. "targetPort": "http"
  148. },
  149. {
  150. "name": "jdbc",
  151. "port": 31000,
  152. "targetPort": "jdbc"
  153. }
  154. ],
  155. "selector": {
  156. "deploymentConfig": "${APPLICATION_NAME}"
  157. }
  158. },
  159. "metadata": {
  160. "name": "${APPLICATION_NAME}",
  161. "labels": {
  162. "application": "${APPLICATION_NAME}"
  163. },
  164. "annotations": {
  165. "description": "The data virtualization services."
  166. }
  167. }
  168. },
  169. {
  170. "kind": "Route",
  171. "apiVersion": "v1",
  172. "id": "${APPLICATION_NAME}-http",
  173. "metadata": {
  174. "name": "${APPLICATION_NAME}",
  175. "labels": {
  176. "application": "${APPLICATION_NAME}"
  177. },
  178. "annotations": {
  179. "description": "Route for application's http (REST) service."
  180. }
  181. },
  182. "spec": {
  183. "host": "${HOSTNAME_HTTP}",
  184. "port": {
  185. "targetPort": "http"
  186. },
  187. "to": {
  188. "name": "${APPLICATION_NAME}"
  189. }
  190. }
  191. },
  192. {
  193. "kind": "ImageStream",
  194. "apiVersion": "v1",
  195. "metadata": {
  196. "name": "${APPLICATION_NAME}",
  197. "labels": {
  198. "application": "${APPLICATION_NAME}"
  199. }
  200. }
  201. },
  202. {
  203. "kind": "BuildConfig",
  204. "apiVersion": "v1",
  205. "metadata": {
  206. "name": "${APPLICATION_NAME}",
  207. "labels": {
  208. "application": "${APPLICATION_NAME}"
  209. }
  210. },
  211. "spec": {
  212. "source": {
  213. "type": "Git",
  214. "git": {
  215. "uri": "${SOURCE_REPOSITORY_URL}",
  216. "ref": "${SOURCE_REPOSITORY_REF}"
  217. },
  218. "contextDir": "${CONTEXT_DIR}"
  219. },
  220. "strategy": {
  221. "type": "Source",
  222. "sourceStrategy": {
  223. "forcePull": true,
  224. "from": {
  225. "kind": "ImageStreamTag",
  226. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  227. "name": "jboss-datavirt63-openshift:1.0"
  228. }
  229. }
  230. },
  231. "output": {
  232. "to": {
  233. "kind": "ImageStreamTag",
  234. "name": "${APPLICATION_NAME}:latest"
  235. }
  236. },
  237. "triggers": [
  238. {
  239. "type": "GitHub",
  240. "github": {
  241. "secret": "${GITHUB_WEBHOOK_SECRET}"
  242. }
  243. },
  244. {
  245. "type": "Generic",
  246. "generic": {
  247. "secret": "${GENERIC_WEBHOOK_SECRET}"
  248. }
  249. },
  250. {
  251. "type": "ImageChange",
  252. "imageChange": {}
  253. },
  254. {
  255. "type": "ConfigChange"
  256. }
  257. ]
  258. }
  259. },
  260. {
  261. "kind": "DeploymentConfig",
  262. "apiVersion": "v1",
  263. "metadata": {
  264. "name": "${APPLICATION_NAME}",
  265. "labels": {
  266. "application": "${APPLICATION_NAME}"
  267. }
  268. },
  269. "spec": {
  270. "strategy": {
  271. "type": "Recreate"
  272. },
  273. "triggers": [
  274. {
  275. "type": "ImageChange",
  276. "imageChangeParams": {
  277. "automatic": true,
  278. "containerNames": [
  279. "${APPLICATION_NAME}"
  280. ],
  281. "from": {
  282. "kind": "ImageStreamTag",
  283. "name": "${APPLICATION_NAME}:latest"
  284. }
  285. }
  286. },
  287. {
  288. "type": "ConfigChange"
  289. }
  290. ],
  291. "replicas": 1,
  292. "selector": {
  293. "deploymentConfig": "${APPLICATION_NAME}"
  294. },
  295. "template": {
  296. "metadata": {
  297. "name": "${APPLICATION_NAME}",
  298. "labels": {
  299. "deploymentConfig": "${APPLICATION_NAME}",
  300. "application": "${APPLICATION_NAME}"
  301. }
  302. },
  303. "spec": {
  304. "serviceAccountName": "${SERVICE_ACCOUNT_NAME}",
  305. "terminationGracePeriodSeconds": 60,
  306. "containers": [
  307. {
  308. "name": "${APPLICATION_NAME}",
  309. "image": "${APPLICATION_NAME}",
  310. "imagePullPolicy": "Always",
  311. "volumeMounts": [
  312. {
  313. "name": "configuration",
  314. "mountPath": "/etc/datavirt-environment",
  315. "readOnly": true
  316. }
  317. ],
  318. "livenessProbe": {
  319. "exec": {
  320. "command": [
  321. "/bin/bash",
  322. "-c",
  323. "/opt/eap/bin/livenessProbe.sh"
  324. ]
  325. }
  326. },
  327. "readinessProbe": {
  328. "exec": {
  329. "command": [
  330. "/bin/bash",
  331. "-c",
  332. "/opt/eap/bin/readinessProbe.sh"
  333. ]
  334. }
  335. },
  336. "ports": [
  337. {
  338. "name": "jolokia",
  339. "containerPort": 8778,
  340. "protocol": "TCP"
  341. },
  342. {
  343. "name": "http",
  344. "containerPort": 8080,
  345. "protocol": "TCP"
  346. },
  347. {
  348. "name": "jdbc",
  349. "containerPort": 31000,
  350. "protocol": "TCP"
  351. },
  352. {
  353. "name": "ping",
  354. "containerPort": 8888,
  355. "protocol": "TCP"
  356. }
  357. ],
  358. "env": [
  359. {
  360. "name": "OPENSHIFT_KUBE_PING_LABELS",
  361. "value": "application=${APPLICATION_NAME}"
  362. },
  363. {
  364. "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
  365. "valueFrom": {
  366. "fieldRef": {
  367. "fieldPath": "metadata.namespace"
  368. }
  369. }
  370. },
  371. {
  372. "name": "JGROUPS_CLUSTER_PASSWORD",
  373. "value": "${JGROUPS_CLUSTER_PASSWORD}"
  374. },
  375. {
  376. "name": "AUTO_DEPLOY_EXPLODED",
  377. "value": "${AUTO_DEPLOY_EXPLODED}"
  378. },
  379. {
  380. "name": "TEIID_USERNAME",
  381. "value": "${TEIID_USERNAME}"
  382. },
  383. {
  384. "name": "TEIID_PASSWORD",
  385. "value": "${TEIID_PASSWORD}"
  386. },
  387. {
  388. "name": "MODESHAPE_USERNAME",
  389. "value": "${MODESHAPE_USERNAME}"
  390. },
  391. {
  392. "name": "MODESHAPE_PASSWORD",
  393. "value": "${MODESHAPE_PASSWORD}"
  394. },
  395. {
  396. "name": "ENV_FILES",
  397. "value": "/etc/datavirt-environment/*"
  398. }
  399. ]
  400. }
  401. ],
  402. "volumes": [
  403. {
  404. "name": "configuration",
  405. "secret": {
  406. "secretName": "${CONFIGURATION_NAME}"
  407. }
  408. }
  409. ]
  410. }
  411. }
  412. }
  413. }
  414. ]
  415. }