spring-boot-camel-infinispan-template.json 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. {
  2. "apiVersion": "v1",
  3. "kind": "Template",
  4. "metadata": {
  5. "annotations": {
  6. "description": "Spring Boot, Camel and JBoss Data Grid QuickStart. This quickstart demonstrates how to connect a Spring-Boot application to a JBoss Data Grid (or Infinispan) server using the Hot Rod protocol. It requires that the data grid server (or cluster) has been deployed first.",
  7. "tags": "quickstart,java,springboot,fis",
  8. "iconClass": "icon-jboss",
  9. "version": "2.0"
  10. },
  11. "name": "s2i-spring-boot-camel-infinispan"
  12. },
  13. "labels": {
  14. "template": "s2i-spring-boot-camel-infinispan"
  15. },
  16. "parameters": [
  17. {
  18. "name": "APP_NAME",
  19. "displayName": "Application Name",
  20. "required": true,
  21. "value": "s2i-spring-boot-camel-infinispan",
  22. "description": "The name assigned to the application."
  23. },
  24. {
  25. "name": "GIT_REPO",
  26. "displayName": "Git Repository URL",
  27. "required": true,
  28. "value": "https://github.com/fabric8-quickstarts/spring-boot-camel-infinispan.git",
  29. "description": "The URL of the repository with your application source code."
  30. },
  31. {
  32. "name": "GIT_REF",
  33. "displayName": "Git Reference",
  34. "value": "spring-boot-camel-infinispan-1.0.0.redhat-000024",
  35. "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch."
  36. },
  37. {
  38. "name": "INFINISPAN_SERVICE",
  39. "displayName": "JBoss Data Grid Service (Hot Rod)",
  40. "required": true,
  41. "value": "datagrid-app-hotrod",
  42. "description": "Set this to the name of the Hot Rod service of the JBoss Data Grid. You may need to create the data grid first."
  43. },
  44. {
  45. "name": "BUILDER_VERSION",
  46. "displayName": "Builder version",
  47. "value": "2.0",
  48. "description": "The version of the FIS S2I builder image to use."
  49. },
  50. {
  51. "name": "APP_VERSION",
  52. "displayName": "Application Version",
  53. "value": "1.0.0.redhat-000024",
  54. "description": "The application version."
  55. },
  56. {
  57. "name": "MAVEN_ARGS",
  58. "displayName": "Maven Arguments",
  59. "value": "package -DskipTests -Dfabric8.skip -e -B",
  60. "description": "Arguments passed to mvn in the build."
  61. },
  62. {
  63. "name": "MAVEN_ARGS_APPEND",
  64. "displayName": "Extra Maven Arguments",
  65. "description": "Extra arguments passed to mvn, e.g. for multi-module builds."
  66. },
  67. {
  68. "name": "ARTIFACT_DIR",
  69. "displayName": "Maven build directory",
  70. "description": "Directory of the artifact to be built, e.g. for multi-module builds."
  71. },
  72. {
  73. "name": "IMAGE_STREAM_NAMESPACE",
  74. "displayName": "Image Stream Namespace",
  75. "value": "openshift",
  76. "required": true,
  77. "description": "Namespace in which the Fuse ImageStreams 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."
  78. },
  79. {
  80. "name": "BUILD_SECRET",
  81. "displayName": "Git Build Secret",
  82. "generate": "expression",
  83. "description": "The secret needed to trigger a build.",
  84. "from": "[a-zA-Z0-9]{40}"
  85. },
  86. {
  87. "name": "CPU_REQUEST",
  88. "displayName": "CPU request",
  89. "value": "0.2",
  90. "required": true,
  91. "description": "The amount of CPU to requests."
  92. },
  93. {
  94. "name": "CPU_LIMIT",
  95. "displayName": "CPU limit",
  96. "value": "1.0",
  97. "required": true,
  98. "description": "The amount of CPU the container is limited to use."
  99. }
  100. ],
  101. "objects": [
  102. {
  103. "kind": "ImageStream",
  104. "apiVersion": "v1",
  105. "metadata": {
  106. "name": "${APP_NAME}",
  107. "creationTimestamp": null,
  108. "labels": {
  109. "component": "${APP_NAME}",
  110. "group": "quickstarts",
  111. "project": "${APP_NAME}",
  112. "provider": "s2i",
  113. "version": "${APP_VERSION}"
  114. }
  115. },
  116. "spec": {},
  117. "status": {
  118. "dockerImageRepository": ""
  119. }
  120. },
  121. {
  122. "kind": "BuildConfig",
  123. "apiVersion": "v1",
  124. "metadata": {
  125. "name": "${APP_NAME}",
  126. "creationTimestamp": null,
  127. "labels": {
  128. "component": "${APP_NAME}",
  129. "group": "quickstarts",
  130. "project": "${APP_NAME}",
  131. "provider": "s2i",
  132. "version": "${APP_VERSION}"
  133. }
  134. },
  135. "spec": {
  136. "triggers": [
  137. {
  138. "type": "GitHub",
  139. "github": {
  140. "secret": "${BUILD_SECRET}"
  141. }
  142. },
  143. {
  144. "type": "Generic",
  145. "generic": {
  146. "secret": "${BUILD_SECRET}"
  147. }
  148. },
  149. {
  150. "type": "ConfigChange"
  151. },
  152. {
  153. "type": "ImageChange",
  154. "imageChange": {}
  155. }
  156. ],
  157. "source": {
  158. "type": "Git",
  159. "git": {
  160. "uri": "${GIT_REPO}",
  161. "ref": "${GIT_REF}"
  162. }
  163. },
  164. "strategy": {
  165. "type": "Source",
  166. "sourceStrategy": {
  167. "from": {
  168. "kind": "ImageStreamTag",
  169. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  170. "name": "fis-java-openshift:${BUILDER_VERSION}"
  171. },
  172. "forcePull": true,
  173. "incremental": true,
  174. "env": [
  175. {
  176. "name": "BUILD_LOGLEVEL",
  177. "value": "5"
  178. },
  179. {
  180. "name": "ARTIFACT_DIR",
  181. "value": "${ARTIFACT_DIR}"
  182. },
  183. {
  184. "name": "MAVEN_ARGS",
  185. "value": "${MAVEN_ARGS}"
  186. },
  187. {
  188. "name": "MAVEN_ARGS_APPEND",
  189. "value": "${MAVEN_ARGS_APPEND}"
  190. }
  191. ]
  192. }
  193. },
  194. "output": {
  195. "to": {
  196. "kind": "ImageStreamTag",
  197. "name": "${APP_NAME}:latest"
  198. }
  199. },
  200. "resources": {}
  201. },
  202. "status": {
  203. "lastVersion": 0
  204. }
  205. },
  206. {
  207. "kind": "DeploymentConfig",
  208. "apiVersion": "v1",
  209. "metadata": {
  210. "name": "${APP_NAME}",
  211. "creationTimestamp": null,
  212. "labels": {
  213. "component": "${APP_NAME}",
  214. "group": "quickstarts",
  215. "project": "${APP_NAME}",
  216. "provider": "s2i",
  217. "version": "${APP_VERSION}"
  218. }
  219. },
  220. "spec": {
  221. "strategy": {
  222. "resources": {}
  223. },
  224. "triggers": [
  225. {
  226. "type": "ConfigChange"
  227. },
  228. {
  229. "type": "ImageChange",
  230. "imageChangeParams": {
  231. "automatic": true,
  232. "containerNames": [
  233. "${APP_NAME}"
  234. ],
  235. "from": {
  236. "kind": "ImageStreamTag",
  237. "name": "${APP_NAME}:latest"
  238. }
  239. }
  240. }
  241. ],
  242. "replicas": 1,
  243. "selector": {
  244. "component": "${APP_NAME}",
  245. "deploymentconfig": "${APP_NAME}",
  246. "group": "quickstarts",
  247. "project": "${APP_NAME}",
  248. "provider": "s2i",
  249. "version": "${APP_VERSION}"
  250. },
  251. "template": {
  252. "metadata": {
  253. "creationTimestamp": null,
  254. "labels": {
  255. "component": "${APP_NAME}",
  256. "deploymentconfig": "${APP_NAME}",
  257. "group": "quickstarts",
  258. "project": "${APP_NAME}",
  259. "provider": "s2i",
  260. "version": "${APP_VERSION}"
  261. }
  262. },
  263. "spec": {
  264. "containers": [
  265. {
  266. "name": "${APP_NAME}",
  267. "image": "library/${APP_NAME}:latest",
  268. "readinessProbe" : {
  269. "httpGet" : {
  270. "path" : "/health",
  271. "port" : 8081
  272. },
  273. "initialDelaySeconds" : 10
  274. },
  275. "livenessProbe" : {
  276. "httpGet" : {
  277. "path" : "/health",
  278. "port" : 8081
  279. },
  280. "initialDelaySeconds" : 180
  281. },
  282. "ports": [
  283. {
  284. "containerPort": 8778,
  285. "name": "jolokia"
  286. }
  287. ],
  288. "env" : [ {
  289. "name" : "KUBERNETES_NAMESPACE",
  290. "valueFrom" : {
  291. "fieldRef" : {
  292. "fieldPath" : "metadata.namespace"
  293. }
  294. }
  295. } , {
  296. "name": "INFINISPAN_SERVICE",
  297. "value": "${INFINISPAN_SERVICE}"
  298. } ],
  299. "resources": {
  300. "requests": {
  301. "cpu": "${CPU_REQUEST}"
  302. },
  303. "limits": {
  304. "cpu": "${CPU_LIMIT}"
  305. }
  306. }
  307. }
  308. ]
  309. }
  310. }
  311. },
  312. "status": {}
  313. }
  314. ]
  315. }