datavirt63-basic-s2i.json 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
  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. "openshift.io/display-name": "Red Hat JBoss Data Virtualization 6.3 (no SSL)"
  11. },
  12. "name": "datavirt63-basic-s2i"
  13. },
  14. "labels": {
  15. "template": "datavirt63-basic-s2i",
  16. "xpaas": "1.4.0"
  17. },
  18. "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).",
  19. "parameters": [
  20. {
  21. "description": "The name for the application.",
  22. "displayName": "Application Name",
  23. "name": "APPLICATION_NAME",
  24. "value": "datavirt-app",
  25. "required": true
  26. },
  27. {
  28. "description": "The name of the secret containing configuration properties for the data sources.",
  29. "displayName": "Configuration Secret Name",
  30. "name": "CONFIGURATION_NAME",
  31. "value": "datavirt-app-config",
  32. "required": true
  33. },
  34. {
  35. "description": "Specify a custom hostname for the http route. Leave blank to use default hostname, e.g.: <service-name>-<project>.<default-domain-suffix>",
  36. "displayName": "Custom http Route Hostname",
  37. "name": "HOSTNAME_HTTP",
  38. "value": "",
  39. "required": false
  40. },
  41. {
  42. "description": "The URL of the repository with your application source code.",
  43. "displayName": "Git Repository URL",
  44. "name": "SOURCE_REPOSITORY_URL",
  45. "value": "https://github.com/jboss-openshift/openshift-quickstarts",
  46. "required": true
  47. },
  48. {
  49. "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
  50. "displayName": "Git Reference",
  51. "name": "SOURCE_REPOSITORY_REF",
  52. "value": "master",
  53. "required": false
  54. },
  55. {
  56. "description": "Set this to the relative path to your project if it is not in the root of your repository.",
  57. "displayName": "Context Directory",
  58. "name": "CONTEXT_DIR",
  59. "value": "datavirt/dynamicvdb-datafederation/app",
  60. "required": false
  61. },
  62. {
  63. "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.",
  64. "displayName": "Service Account Name",
  65. "name": "SERVICE_ACCOUNT_NAME",
  66. "value": "datavirt-service-account",
  67. "required": true
  68. },
  69. {
  70. "description": "Username associated with Teiid data service.",
  71. "displayName": "Teiid Username",
  72. "name": "TEIID_USERNAME",
  73. "from": "[\\a]{8}",
  74. "generate": "expression",
  75. "required": true
  76. },
  77. {
  78. "description": "Password for Teiid user.",
  79. "displayName": "Teiid User Password",
  80. "name": "TEIID_PASSWORD",
  81. "from": "[\\a\\A]{8}[\\d]{1}[\\A]{1}",
  82. "generate": "expression",
  83. "required": true
  84. },
  85. {
  86. "description": "Username associated with ModeShape.",
  87. "displayName": "ModeShape Username",
  88. "name": "MODESHAPE_USERNAME",
  89. "from": "[\\a]{8}",
  90. "generate": "expression",
  91. "required": true
  92. },
  93. {
  94. "description": "Password for ModeShape user.",
  95. "displayName": "ModeShape User Password",
  96. "name": "MODESHAPE_PASSWORD",
  97. "from": "[\\a\\A]{8}[\\d]{1}[\\A]{1}",
  98. "generate": "expression",
  99. "required": true
  100. },
  101. {
  102. "description": "A secret string used to configure the GitHub webhook.",
  103. "displayName": "Github Webhook Secret",
  104. "name": "GITHUB_WEBHOOK_SECRET",
  105. "from": "[a-zA-Z0-9]{8}",
  106. "generate": "expression",
  107. "required": true
  108. },
  109. {
  110. "description": "A secret string used to configure the Generic webhook.",
  111. "displayName": "Generic Webhook Secret",
  112. "name": "GENERIC_WEBHOOK_SECRET",
  113. "from": "[a-zA-Z0-9]{8}",
  114. "generate": "expression",
  115. "required": true
  116. },
  117. {
  118. "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.",
  119. "displayName": "ImageStream Namespace",
  120. "name": "IMAGE_STREAM_NAMESPACE",
  121. "value": "openshift",
  122. "required": true
  123. },
  124. {
  125. "description": "Password used by JGroups to authenticate nodes in the cluster.",
  126. "displayName": "JGroups Cluster Password",
  127. "name": "JGROUPS_CLUSTER_PASSWORD",
  128. "from": "[a-zA-Z0-9]{8}",
  129. "generate": "expression",
  130. "required": true
  131. },
  132. {
  133. "description": "Controls whether exploded deployment content should be automatically deployed",
  134. "displayName": "Deploy Exploded Archives",
  135. "name": "AUTO_DEPLOY_EXPLODED",
  136. "value": "false",
  137. "required": false
  138. },
  139. {
  140. "description": "Comma delimited list of source directories containing VDBs for deployment",
  141. "displayName": "VDB Deployment Directories",
  142. "name": "VDB_DIRS",
  143. "value": "",
  144. "required": false
  145. },
  146. {
  147. "displayName": "Maven mirror URL",
  148. "description": "Maven mirror to use for S2I builds",
  149. "name": "MAVEN_MIRROR_URL",
  150. "value": "",
  151. "required": false
  152. },
  153. {
  154. "displayName": "Artifact Directories",
  155. "description": "List of directories from which archives will be copied into the deployment folder. If unspecified, all archives in /target will be copied.",
  156. "name": "ARTIFACT_DIR",
  157. "value": "",
  158. "required": false
  159. }
  160. ],
  161. "objects": [
  162. {
  163. "kind": "Service",
  164. "apiVersion": "v1",
  165. "spec": {
  166. "ports": [
  167. {
  168. "name": "http",
  169. "port": 8080,
  170. "targetPort": "http"
  171. },
  172. {
  173. "name": "jdbc",
  174. "port": 31000,
  175. "targetPort": "jdbc"
  176. }
  177. ],
  178. "selector": {
  179. "deploymentConfig": "${APPLICATION_NAME}"
  180. }
  181. },
  182. "metadata": {
  183. "name": "${APPLICATION_NAME}",
  184. "labels": {
  185. "application": "${APPLICATION_NAME}"
  186. },
  187. "annotations": {
  188. "description": "The data virtualization services."
  189. }
  190. }
  191. },
  192. {
  193. "kind": "Route",
  194. "apiVersion": "v1",
  195. "id": "${APPLICATION_NAME}-http",
  196. "metadata": {
  197. "name": "${APPLICATION_NAME}",
  198. "labels": {
  199. "application": "${APPLICATION_NAME}"
  200. },
  201. "annotations": {
  202. "description": "Route for application's http (REST) service."
  203. }
  204. },
  205. "spec": {
  206. "host": "${HOSTNAME_HTTP}",
  207. "port": {
  208. "targetPort": "http"
  209. },
  210. "to": {
  211. "name": "${APPLICATION_NAME}"
  212. }
  213. }
  214. },
  215. {
  216. "kind": "ImageStream",
  217. "apiVersion": "v1",
  218. "metadata": {
  219. "name": "${APPLICATION_NAME}",
  220. "labels": {
  221. "application": "${APPLICATION_NAME}"
  222. }
  223. }
  224. },
  225. {
  226. "kind": "BuildConfig",
  227. "apiVersion": "v1",
  228. "metadata": {
  229. "name": "${APPLICATION_NAME}",
  230. "labels": {
  231. "application": "${APPLICATION_NAME}"
  232. }
  233. },
  234. "spec": {
  235. "source": {
  236. "type": "Git",
  237. "git": {
  238. "uri": "${SOURCE_REPOSITORY_URL}",
  239. "ref": "${SOURCE_REPOSITORY_REF}"
  240. },
  241. "contextDir": "${CONTEXT_DIR}",
  242. "images": [
  243. {
  244. "from": {
  245. "kind": "ImageStreamTag",
  246. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  247. "name": "jboss-datagrid65-client-openshift:1.0"
  248. },
  249. "paths": [
  250. {
  251. "destinationDir": "./${CONTEXT_DIR}/extensions/datagrid65",
  252. "sourcePath": "/extensions/."
  253. }
  254. ]
  255. }
  256. ]
  257. },
  258. "strategy": {
  259. "type": "Source",
  260. "sourceStrategy": {
  261. "forcePull": true,
  262. "from": {
  263. "kind": "ImageStreamTag",
  264. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  265. "name": "jboss-datavirt63-openshift:1.2"
  266. },
  267. "env": [
  268. {
  269. "name": "MAVEN_MIRROR_URL",
  270. "value": "${MAVEN_MIRROR_URL}"
  271. },
  272. {
  273. "name": "CUSTOM_INSTALL_DIRECTORIES",
  274. "value": "extensions/*"
  275. },
  276. {
  277. "name": "VDB_DIRS",
  278. "value": "${VDB_DIRS}"
  279. },
  280. {
  281. "name": "ARTIFACT_DIR",
  282. "value": "${ARTIFACT_DIR}"
  283. }
  284. ]
  285. }
  286. },
  287. "output": {
  288. "to": {
  289. "kind": "ImageStreamTag",
  290. "name": "${APPLICATION_NAME}:latest"
  291. }
  292. },
  293. "triggers": [
  294. {
  295. "type": "GitHub",
  296. "github": {
  297. "secret": "${GITHUB_WEBHOOK_SECRET}"
  298. }
  299. },
  300. {
  301. "type": "Generic",
  302. "generic": {
  303. "secret": "${GENERIC_WEBHOOK_SECRET}"
  304. }
  305. },
  306. {
  307. "type": "ImageChange",
  308. "imageChange": {}
  309. },
  310. {
  311. "type": "ImageChange",
  312. "imageChange": {
  313. "from": {
  314. "kind": "ImageStreamTag",
  315. "name": "jboss-datagrid65-client-openshift:1.0"
  316. }
  317. }
  318. },
  319. {
  320. "type": "ConfigChange"
  321. }
  322. ]
  323. }
  324. },
  325. {
  326. "kind": "DeploymentConfig",
  327. "apiVersion": "v1",
  328. "metadata": {
  329. "name": "${APPLICATION_NAME}",
  330. "labels": {
  331. "application": "${APPLICATION_NAME}"
  332. }
  333. },
  334. "spec": {
  335. "strategy": {
  336. "type": "Recreate"
  337. },
  338. "triggers": [
  339. {
  340. "type": "ImageChange",
  341. "imageChangeParams": {
  342. "automatic": true,
  343. "containerNames": [
  344. "${APPLICATION_NAME}"
  345. ],
  346. "from": {
  347. "kind": "ImageStreamTag",
  348. "name": "${APPLICATION_NAME}:latest"
  349. }
  350. }
  351. },
  352. {
  353. "type": "ConfigChange"
  354. }
  355. ],
  356. "replicas": 1,
  357. "selector": {
  358. "deploymentConfig": "${APPLICATION_NAME}"
  359. },
  360. "template": {
  361. "metadata": {
  362. "name": "${APPLICATION_NAME}",
  363. "labels": {
  364. "deploymentConfig": "${APPLICATION_NAME}",
  365. "application": "${APPLICATION_NAME}"
  366. }
  367. },
  368. "spec": {
  369. "serviceAccountName": "${SERVICE_ACCOUNT_NAME}",
  370. "terminationGracePeriodSeconds": 60,
  371. "containers": [
  372. {
  373. "name": "${APPLICATION_NAME}",
  374. "image": "${APPLICATION_NAME}",
  375. "imagePullPolicy": "Always",
  376. "volumeMounts": [
  377. {
  378. "name": "configuration",
  379. "mountPath": "/etc/datavirt-environment",
  380. "readOnly": true
  381. }
  382. ],
  383. "livenessProbe": {
  384. "exec": {
  385. "command": [
  386. "/bin/bash",
  387. "-c",
  388. "/opt/eap/bin/livenessProbe.sh"
  389. ]
  390. }
  391. },
  392. "readinessProbe": {
  393. "exec": {
  394. "command": [
  395. "/bin/bash",
  396. "-c",
  397. "/opt/eap/bin/readinessProbe.sh"
  398. ]
  399. }
  400. },
  401. "ports": [
  402. {
  403. "name": "jolokia",
  404. "containerPort": 8778,
  405. "protocol": "TCP"
  406. },
  407. {
  408. "name": "http",
  409. "containerPort": 8080,
  410. "protocol": "TCP"
  411. },
  412. {
  413. "name": "jdbc",
  414. "containerPort": 31000,
  415. "protocol": "TCP"
  416. },
  417. {
  418. "name": "ping",
  419. "containerPort": 8888,
  420. "protocol": "TCP"
  421. }
  422. ],
  423. "env": [
  424. {
  425. "name": "OPENSHIFT_KUBE_PING_LABELS",
  426. "value": "application=${APPLICATION_NAME}"
  427. },
  428. {
  429. "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
  430. "valueFrom": {
  431. "fieldRef": {
  432. "fieldPath": "metadata.namespace"
  433. }
  434. }
  435. },
  436. {
  437. "name": "JGROUPS_CLUSTER_PASSWORD",
  438. "value": "${JGROUPS_CLUSTER_PASSWORD}"
  439. },
  440. {
  441. "name": "AUTO_DEPLOY_EXPLODED",
  442. "value": "${AUTO_DEPLOY_EXPLODED}"
  443. },
  444. {
  445. "name": "TEIID_USERNAME",
  446. "value": "${TEIID_USERNAME}"
  447. },
  448. {
  449. "name": "TEIID_PASSWORD",
  450. "value": "${TEIID_PASSWORD}"
  451. },
  452. {
  453. "name": "MODESHAPE_USERNAME",
  454. "value": "${MODESHAPE_USERNAME}"
  455. },
  456. {
  457. "name": "MODESHAPE_PASSWORD",
  458. "value": "${MODESHAPE_PASSWORD}"
  459. },
  460. {
  461. "name": "ENV_FILES",
  462. "value": "/etc/datavirt-environment/*"
  463. }
  464. ]
  465. }
  466. ],
  467. "volumes": [
  468. {
  469. "name": "configuration",
  470. "secret": {
  471. "secretName": "${CONFIGURATION_NAME}"
  472. }
  473. }
  474. ]
  475. }
  476. }
  477. }
  478. }
  479. ]
  480. }