amq63-persistent.json 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "description": "Application template for JBoss A-MQ brokers. These can be deployed as standalone and use persistent storage for saving messages. This template doesn't feature SSL support.",
  7. "iconClass": "icon-jboss",
  8. "tags": "messaging,amq,jboss,xpaas",
  9. "version": "1.0",
  10. "openshift.io/display-name": "Red Hat JBoss A-MQ 6.3 (Persistent, no SSL)"
  11. },
  12. "name": "amq63-persistent"
  13. },
  14. "labels": {
  15. "template": "amq63-persistent",
  16. "xpaas": "1.4.0"
  17. },
  18. "message": "A new persistent messaging service has been created in your project. It will handle the protocol(s) \"${MQ_PROTOCOL}\". The username/password for accessing the service is ${MQ_USERNAME}/${MQ_PASSWORD}.",
  19. "parameters": [
  20. {
  21. "displayName": "Application Name",
  22. "description": "The name for the application.",
  23. "name": "APPLICATION_NAME",
  24. "value": "broker",
  25. "required": true
  26. },
  27. {
  28. "displayName": "Split Data?",
  29. "description": "Split the data directory for each node in a mesh.",
  30. "name": "AMQ_SPLIT",
  31. "value": "false",
  32. "required": false
  33. },
  34. {
  35. "displayName": "A-MQ Protocols",
  36. "description": "Protocols to configure, separated by commas. Allowed values are: `openwire`, `amqp`, `stomp` and `mqtt`.",
  37. "name": "MQ_PROTOCOL",
  38. "value": "openwire",
  39. "required": false
  40. },
  41. {
  42. "displayName": "Queues",
  43. "description": "Queue names, separated by commas. These queues will be automatically created when the broker starts. If left empty, queues will be still created dynamically.",
  44. "name": "MQ_QUEUES",
  45. "value": "",
  46. "required": false
  47. },
  48. {
  49. "displayName": "Topics",
  50. "description": "Topic names, separated by commas. These topics will be automatically created when the broker starts. If left empty, topics will be still created dynamically.",
  51. "name": "MQ_TOPICS",
  52. "value": "",
  53. "required": false
  54. },
  55. {
  56. "displayName": "A-MQ Serializable Packages",
  57. "description": "List of packages that are allowed to be serialized for use in ObjectMessage, separated by commas. If your app doesn't use ObjectMessages, leave this blank. This is a security enforcement. For the rationale, see http://activemq.apache.org/objectmessage.html",
  58. "name": "MQ_SERIALIZABLE_PACKAGES",
  59. "value": "",
  60. "required": false
  61. },
  62. {
  63. "displayName": "A-MQ Volume Size",
  64. "description": "Size of the volume used by A-MQ for persisting messages.",
  65. "name": "VOLUME_CAPACITY",
  66. "value": "512Mi",
  67. "required": true
  68. },
  69. {
  70. "displayName": "A-MQ Username",
  71. "description": "User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
  72. "name": "MQ_USERNAME",
  73. "from": "user[a-zA-Z0-9]{3}",
  74. "generate": "expression",
  75. "required": false
  76. },
  77. {
  78. "displayName": "A-MQ Password",
  79. "description": "Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
  80. "name": "MQ_PASSWORD",
  81. "from": "[a-zA-Z0-9]{8}",
  82. "generate": "expression",
  83. "required": false
  84. },
  85. {
  86. "displayName": "A-MQ Mesh Discovery Type",
  87. "description": "The discovery agent type to use for discovering mesh endpoints. 'dns' will use OpenShift's DNS service to resolve endpoints. 'kube' will use Kubernetes REST API to resolve service endpoints. If using 'kube' the service account for the pod must have the 'view' role, which can be added via 'oc policy add-role-to-user view system:serviceaccount:<namespace>:default' where <namespace> is the project namespace.",
  88. "name": "AMQ_MESH_DISCOVERY_TYPE",
  89. "value": "kube",
  90. "required": false
  91. },
  92. {
  93. "displayName": "A-MQ Storage Limit",
  94. "description": "The A-MQ storage usage limit",
  95. "name": "AMQ_STORAGE_USAGE_LIMIT",
  96. "value": "100 gb",
  97. "required": false
  98. },
  99. {
  100. "displayName": "ImageStream Namespace",
  101. "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.",
  102. "name": "IMAGE_STREAM_NAMESPACE",
  103. "value": "openshift",
  104. "required": true
  105. }
  106. ],
  107. "objects": [
  108. {
  109. "kind": "Service",
  110. "apiVersion": "v1",
  111. "spec": {
  112. "ports": [
  113. {
  114. "port": 5672,
  115. "targetPort": 5672
  116. }
  117. ],
  118. "selector": {
  119. "deploymentConfig": "${APPLICATION_NAME}-amq"
  120. }
  121. },
  122. "metadata": {
  123. "name": "${APPLICATION_NAME}-amq-amqp",
  124. "labels": {
  125. "application": "${APPLICATION_NAME}"
  126. },
  127. "annotations": {
  128. "description": "The broker's AMQP port."
  129. }
  130. }
  131. },
  132. {
  133. "kind": "Service",
  134. "apiVersion": "v1",
  135. "spec": {
  136. "ports": [
  137. {
  138. "port": 1883,
  139. "targetPort": 1883
  140. }
  141. ],
  142. "selector": {
  143. "deploymentConfig": "${APPLICATION_NAME}-amq"
  144. }
  145. },
  146. "metadata": {
  147. "name": "${APPLICATION_NAME}-amq-mqtt",
  148. "labels": {
  149. "application": "${APPLICATION_NAME}"
  150. },
  151. "annotations": {
  152. "description": "The broker's MQTT port."
  153. }
  154. }
  155. },
  156. {
  157. "kind": "Service",
  158. "apiVersion": "v1",
  159. "spec": {
  160. "ports": [
  161. {
  162. "port": 61613,
  163. "targetPort": 61613
  164. }
  165. ],
  166. "selector": {
  167. "deploymentConfig": "${APPLICATION_NAME}-amq"
  168. }
  169. },
  170. "metadata": {
  171. "name": "${APPLICATION_NAME}-amq-stomp",
  172. "labels": {
  173. "application": "${APPLICATION_NAME}"
  174. },
  175. "annotations": {
  176. "description": "The broker's STOMP port."
  177. }
  178. }
  179. },
  180. {
  181. "kind": "Service",
  182. "apiVersion": "v1",
  183. "spec": {
  184. "ports": [
  185. {
  186. "port": 61616,
  187. "targetPort": 61616
  188. }
  189. ],
  190. "selector": {
  191. "deploymentConfig": "${APPLICATION_NAME}-amq"
  192. }
  193. },
  194. "metadata": {
  195. "name": "${APPLICATION_NAME}-amq-tcp",
  196. "labels": {
  197. "application": "${APPLICATION_NAME}"
  198. },
  199. "annotations": {
  200. "description": "The broker's OpenWire port.",
  201. "service.alpha.openshift.io/dependencies": "[{\"name\": \"${APPLICATION_NAME}-amq-amqp\", \"kind\": \"Service\"},{\"name\": \"${APPLICATION_NAME}-amq-mqtt\", \"kind\": \"Service\"},{\"name\": \"${APPLICATION_NAME}-amq-stomp\", \"kind\": \"Service\"}]"
  202. }
  203. }
  204. },
  205. {
  206. "kind": "DeploymentConfig",
  207. "apiVersion": "v1",
  208. "metadata": {
  209. "name": "${APPLICATION_NAME}-amq",
  210. "labels": {
  211. "application": "${APPLICATION_NAME}"
  212. }
  213. },
  214. "spec": {
  215. "strategy": {
  216. "type": "Rolling",
  217. "rollingParams": {
  218. "maxSurge": 0
  219. }
  220. },
  221. "triggers": [
  222. {
  223. "type": "ImageChange",
  224. "imageChangeParams": {
  225. "automatic": true,
  226. "containerNames": [
  227. "${APPLICATION_NAME}-amq"
  228. ],
  229. "from": {
  230. "kind": "ImageStreamTag",
  231. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  232. "name": "jboss-amq-63:1.0"
  233. }
  234. }
  235. },
  236. {
  237. "type": "ConfigChange"
  238. }
  239. ],
  240. "replicas": 1,
  241. "selector": {
  242. "deploymentConfig": "${APPLICATION_NAME}-amq"
  243. },
  244. "template": {
  245. "metadata": {
  246. "name": "${APPLICATION_NAME}-amq",
  247. "labels": {
  248. "deploymentConfig": "${APPLICATION_NAME}-amq",
  249. "application": "${APPLICATION_NAME}"
  250. }
  251. },
  252. "spec": {
  253. "terminationGracePeriodSeconds": 60,
  254. "containers": [
  255. {
  256. "name": "${APPLICATION_NAME}-amq",
  257. "image": "jboss-amq-63",
  258. "imagePullPolicy": "Always",
  259. "volumeMounts": [
  260. {
  261. "mountPath": "/opt/amq/data",
  262. "name": "${APPLICATION_NAME}-amq-pvol"
  263. }
  264. ],
  265. "readinessProbe": {
  266. "exec": {
  267. "command": [
  268. "/bin/bash",
  269. "-c",
  270. "/opt/amq/bin/readinessProbe.sh"
  271. ]
  272. }
  273. },
  274. "ports": [
  275. {
  276. "name": "jolokia",
  277. "containerPort": 8778,
  278. "protocol": "TCP"
  279. },
  280. {
  281. "name": "amqp",
  282. "containerPort": 5672,
  283. "protocol": "TCP"
  284. },
  285. {
  286. "name": "mqtt",
  287. "containerPort": 1883,
  288. "protocol": "TCP"
  289. },
  290. {
  291. "name": "stomp",
  292. "containerPort": 61613,
  293. "protocol": "TCP"
  294. },
  295. {
  296. "name": "tcp",
  297. "containerPort": 61616,
  298. "protocol": "TCP"
  299. }
  300. ],
  301. "env": [
  302. {
  303. "name": "AMQ_USER",
  304. "value": "${MQ_USERNAME}"
  305. },
  306. {
  307. "name": "AMQ_PASSWORD",
  308. "value": "${MQ_PASSWORD}"
  309. },
  310. {
  311. "name": "AMQ_TRANSPORTS",
  312. "value": "${MQ_PROTOCOL}"
  313. },
  314. {
  315. "name": "AMQ_QUEUES",
  316. "value": "${MQ_QUEUES}"
  317. },
  318. {
  319. "name": "AMQ_TOPICS",
  320. "value": "${MQ_TOPICS}"
  321. },
  322. {
  323. "name": "MQ_SERIALIZABLE_PACKAGES",
  324. "value": "${MQ_SERIALIZABLE_PACKAGES}"
  325. },
  326. {
  327. "name": "AMQ_SPLIT",
  328. "value": "${AMQ_SPLIT}"
  329. },
  330. {
  331. "name": "AMQ_MESH_DISCOVERY_TYPE",
  332. "value": "${AMQ_MESH_DISCOVERY_TYPE}"
  333. },
  334. {
  335. "name": "AMQ_MESH_SERVICE_NAME",
  336. "value": "${APPLICATION_NAME}-amq-tcp"
  337. },
  338. {
  339. "name": "AMQ_MESH_SERVICE_NAMESPACE",
  340. "valueFrom": {
  341. "fieldRef": {
  342. "fieldPath": "metadata.namespace"
  343. }
  344. }
  345. },
  346. {
  347. "name": "AMQ_STORAGE_USAGE_LIMIT",
  348. "value": "${AMQ_STORAGE_USAGE_LIMIT}"
  349. }
  350. ]
  351. }
  352. ],
  353. "volumes": [
  354. {
  355. "name": "${APPLICATION_NAME}-amq-pvol",
  356. "persistentVolumeClaim": {
  357. "claimName": "${APPLICATION_NAME}-amq-claim"
  358. }
  359. }
  360. ]
  361. }
  362. }
  363. }
  364. },
  365. {
  366. "apiVersion": "v1",
  367. "kind": "PersistentVolumeClaim",
  368. "metadata": {
  369. "name": "${APPLICATION_NAME}-amq-claim",
  370. "labels": {
  371. "application": "${APPLICATION_NAME}"
  372. }
  373. },
  374. "spec": {
  375. "accessModes": [
  376. "ReadWriteMany"
  377. ],
  378. "resources": {
  379. "requests": {
  380. "storage": "${VOLUME_CAPACITY}"
  381. }
  382. }
  383. }
  384. }
  385. ]
  386. }