spring-boot-camel-amq-template.json 9.8 KB

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