spring-boot-camel-xml-template.json 8.5 KB

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