amq62-ssl.json 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  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 or in a mesh. This template supports SSL and requires usage of OpenShift secrets.",
  7. "iconClass": "icon-jboss",
  8. "tags": "messaging,amq,jboss,xpaas",
  9. "version": "1.3.1"
  10. },
  11. "name": "amq62-ssl"
  12. },
  13. "labels": {
  14. "template": "amq62-ssl",
  15. "xpaas": "1.3.1"
  16. },
  17. "parameters": [
  18. {
  19. "description": "The name for the application.",
  20. "name": "APPLICATION_NAME",
  21. "value": "broker",
  22. "required": true
  23. },
  24. {
  25. "description": "Protocols to configure, separated by commas. Allowed values are: `openwire`, `amqp`, `stomp` and `mqtt`. SSL variants of these protocols will be configured automaticaly.",
  26. "name": "MQ_PROTOCOL",
  27. "value": "openwire",
  28. "required": false
  29. },
  30. {
  31. "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.",
  32. "name": "MQ_QUEUES",
  33. "value": "",
  34. "required": false
  35. },
  36. {
  37. "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.",
  38. "name": "MQ_TOPICS",
  39. "value": "",
  40. "required": false
  41. },
  42. {
  43. "description": "User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
  44. "name": "MQ_USERNAME",
  45. "from": "user[a-zA-Z0-9]{3}",
  46. "generate": "expression",
  47. "required": false
  48. },
  49. {
  50. "description": "Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
  51. "name": "MQ_PASSWORD",
  52. "from": "[a-zA-Z0-9]{8}",
  53. "generate": "expression",
  54. "required": false
  55. },
  56. {
  57. "description": "Name of a secret containing SSL related files",
  58. "name": "AMQ_SECRET",
  59. "value": "amq-app-secret",
  60. "required": true
  61. },
  62. {
  63. "description": "SSL trust store filename",
  64. "name": "AMQ_TRUSTSTORE",
  65. "value": "broker.ts",
  66. "required": true
  67. },
  68. {
  69. "description": "SSL trust store password",
  70. "name": "AMQ_TRUSTSTORE_PASSWORD",
  71. "value": "",
  72. "required": true
  73. },
  74. {
  75. "description": "SSL key store filename",
  76. "name": "AMQ_KEYSTORE",
  77. "value": "broker.ks",
  78. "required": true
  79. },
  80. {
  81. "description": "Password for accessing SSL keystore",
  82. "name": "AMQ_KEYSTORE_PASSWORD",
  83. "value": "",
  84. "required": true
  85. },
  86. {
  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. "description": "The A-MQ storage usage limit",
  94. "name": "AMQ_STORAGE_USAGE_LIMIT",
  95. "value": "100 gb",
  96. "required": false
  97. },
  98. {
  99. "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.",
  100. "name": "IMAGE_STREAM_NAMESPACE",
  101. "value": "openshift",
  102. "required": true
  103. }
  104. ],
  105. "objects": [
  106. {
  107. "kind": "Service",
  108. "apiVersion": "v1",
  109. "spec": {
  110. "ports": [
  111. {
  112. "port": 5672,
  113. "targetPort": 5672
  114. }
  115. ],
  116. "selector": {
  117. "deploymentConfig": "${APPLICATION_NAME}-amq"
  118. }
  119. },
  120. "metadata": {
  121. "name": "${APPLICATION_NAME}-amq-amqp",
  122. "labels": {
  123. "application": "${APPLICATION_NAME}"
  124. },
  125. "annotations": {
  126. "description": "The broker's AMQP port."
  127. }
  128. }
  129. },
  130. {
  131. "kind": "Service",
  132. "apiVersion": "v1",
  133. "spec": {
  134. "ports": [
  135. {
  136. "port": 5671,
  137. "targetPort": 5671
  138. }
  139. ],
  140. "selector": {
  141. "deploymentConfig": "${APPLICATION_NAME}-amq"
  142. }
  143. },
  144. "metadata": {
  145. "name": "${APPLICATION_NAME}-amq-amqp-ssl",
  146. "labels": {
  147. "application": "${APPLICATION_NAME}"
  148. },
  149. "annotations": {
  150. "description": "The broker's AMQP SSL port."
  151. }
  152. }
  153. },
  154. {
  155. "kind": "Service",
  156. "apiVersion": "v1",
  157. "spec": {
  158. "ports": [
  159. {
  160. "port": 1883,
  161. "targetPort": 1883
  162. }
  163. ],
  164. "selector": {
  165. "deploymentConfig": "${APPLICATION_NAME}-amq"
  166. }
  167. },
  168. "metadata": {
  169. "name": "${APPLICATION_NAME}-amq-mqtt",
  170. "labels": {
  171. "application": "${APPLICATION_NAME}"
  172. },
  173. "annotations": {
  174. "description": "The broker's MQTT port."
  175. }
  176. }
  177. },
  178. {
  179. "kind": "Service",
  180. "apiVersion": "v1",
  181. "spec": {
  182. "ports": [
  183. {
  184. "port": 8883,
  185. "targetPort": 8883
  186. }
  187. ],
  188. "selector": {
  189. "deploymentConfig": "${APPLICATION_NAME}-amq"
  190. }
  191. },
  192. "metadata": {
  193. "name": "${APPLICATION_NAME}-amq-mqtt-ssl",
  194. "labels": {
  195. "application": "${APPLICATION_NAME}"
  196. },
  197. "annotations": {
  198. "description": "The broker's MQTT SSL port."
  199. }
  200. }
  201. },
  202. {
  203. "kind": "Service",
  204. "apiVersion": "v1",
  205. "spec": {
  206. "ports": [
  207. {
  208. "port": 61613,
  209. "targetPort": 61613
  210. }
  211. ],
  212. "selector": {
  213. "deploymentConfig": "${APPLICATION_NAME}-amq"
  214. }
  215. },
  216. "metadata": {
  217. "name": "${APPLICATION_NAME}-amq-stomp",
  218. "labels": {
  219. "application": "${APPLICATION_NAME}"
  220. },
  221. "annotations": {
  222. "description": "The broker's STOMP port."
  223. }
  224. }
  225. },
  226. {
  227. "kind": "Service",
  228. "apiVersion": "v1",
  229. "spec": {
  230. "ports": [
  231. {
  232. "port": 61612,
  233. "targetPort": 61612
  234. }
  235. ],
  236. "selector": {
  237. "deploymentConfig": "${APPLICATION_NAME}-amq"
  238. }
  239. },
  240. "metadata": {
  241. "name": "${APPLICATION_NAME}-amq-stomp-ssl",
  242. "labels": {
  243. "application": "${APPLICATION_NAME}"
  244. },
  245. "annotations": {
  246. "description": "The broker's STOMP SSL port."
  247. }
  248. }
  249. },
  250. {
  251. "kind": "Service",
  252. "apiVersion": "v1",
  253. "spec": {
  254. "ports": [
  255. {
  256. "port": 61616,
  257. "targetPort": 61616
  258. }
  259. ],
  260. "selector": {
  261. "deploymentConfig": "${APPLICATION_NAME}-amq"
  262. }
  263. },
  264. "metadata": {
  265. "name": "${APPLICATION_NAME}-amq-tcp",
  266. "labels": {
  267. "application": "${APPLICATION_NAME}"
  268. },
  269. "annotations": {
  270. "description": "The broker's OpenWire port."
  271. }
  272. }
  273. },
  274. {
  275. "kind": "Service",
  276. "apiVersion": "v1",
  277. "spec": {
  278. "ports": [
  279. {
  280. "port": 61617,
  281. "targetPort": 61617
  282. }
  283. ],
  284. "selector": {
  285. "deploymentConfig": "${APPLICATION_NAME}-amq"
  286. }
  287. },
  288. "metadata": {
  289. "name": "${APPLICATION_NAME}-amq-tcp-ssl",
  290. "labels": {
  291. "application": "${APPLICATION_NAME}"
  292. },
  293. "annotations": {
  294. "description": "The broker's OpenWire (SSL) port."
  295. }
  296. }
  297. },
  298. {
  299. "kind": "DeploymentConfig",
  300. "apiVersion": "v1",
  301. "metadata": {
  302. "name": "${APPLICATION_NAME}-amq",
  303. "labels": {
  304. "application": "${APPLICATION_NAME}"
  305. }
  306. },
  307. "spec": {
  308. "strategy": {
  309. "type": "Rolling",
  310. "rollingParams": {
  311. "maxSurge": 0
  312. }
  313. },
  314. "triggers": [
  315. {
  316. "type": "ImageChange",
  317. "imageChangeParams": {
  318. "automatic": true,
  319. "containerNames": [
  320. "${APPLICATION_NAME}-amq"
  321. ],
  322. "from": {
  323. "kind": "ImageStreamTag",
  324. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  325. "name": "jboss-amq-62:1.3"
  326. }
  327. }
  328. },
  329. {
  330. "type": "ConfigChange"
  331. }
  332. ],
  333. "replicas": 1,
  334. "selector": {
  335. "deploymentConfig": "${APPLICATION_NAME}-amq"
  336. },
  337. "template": {
  338. "metadata": {
  339. "name": "${APPLICATION_NAME}-amq",
  340. "labels": {
  341. "deploymentConfig": "${APPLICATION_NAME}-amq",
  342. "application": "${APPLICATION_NAME}"
  343. }
  344. },
  345. "spec": {
  346. "serviceAccountName": "amq-service-account",
  347. "terminationGracePeriodSeconds": 60,
  348. "containers": [
  349. {
  350. "name": "${APPLICATION_NAME}-amq",
  351. "image": "jboss-amq-62",
  352. "imagePullPolicy": "Always",
  353. "volumeMounts": [
  354. {
  355. "name": "broker-secret-volume",
  356. "mountPath": "/etc/amq-secret-volume",
  357. "readOnly": true
  358. }
  359. ],
  360. "readinessProbe": {
  361. "exec": {
  362. "command": [
  363. "/bin/bash",
  364. "-c",
  365. "/opt/amq/bin/readinessProbe.sh"
  366. ]
  367. }
  368. },
  369. "ports": [
  370. {
  371. "name": "jolokia",
  372. "containerPort": 8778,
  373. "protocol": "TCP"
  374. },
  375. {
  376. "name": "amqp",
  377. "containerPort": 5672,
  378. "protocol": "TCP"
  379. },
  380. {
  381. "name": "amqp-ssl",
  382. "containerPort": 5671,
  383. "protocol": "TCP"
  384. },
  385. {
  386. "name": "mqtt",
  387. "containerPort": 1883,
  388. "protocol": "TCP"
  389. },
  390. {
  391. "name": "mqtt-ssl",
  392. "containerPort": 8883,
  393. "protocol": "TCP"
  394. },
  395. {
  396. "name": "stomp",
  397. "containerPort": 61613,
  398. "protocol": "TCP"
  399. },
  400. {
  401. "name": "stomp-ssl",
  402. "containerPort": 61612,
  403. "protocol": "TCP"
  404. },
  405. {
  406. "name": "tcp",
  407. "containerPort": 61616,
  408. "protocol": "TCP"
  409. },
  410. {
  411. "name": "tcp-ssl",
  412. "containerPort": 61617,
  413. "protocol": "TCP"
  414. }
  415. ],
  416. "env": [
  417. {
  418. "name": "AMQ_USER",
  419. "value": "${MQ_USERNAME}"
  420. },
  421. {
  422. "name": "AMQ_PASSWORD",
  423. "value": "${MQ_PASSWORD}"
  424. },
  425. {
  426. "name": "AMQ_TRANSPORTS",
  427. "value": "${MQ_PROTOCOL}"
  428. },
  429. {
  430. "name": "AMQ_QUEUES",
  431. "value": "${MQ_QUEUES}"
  432. },
  433. {
  434. "name": "AMQ_TOPICS",
  435. "value": "${MQ_TOPICS}"
  436. },
  437. {
  438. "name": "AMQ_MESH_DISCOVERY_TYPE",
  439. "value": "${AMQ_MESH_DISCOVERY_TYPE}"
  440. },
  441. {
  442. "name": "AMQ_MESH_SERVICE_NAME",
  443. "value": "${APPLICATION_NAME}-amq-tcp"
  444. },
  445. {
  446. "name": "AMQ_MESH_SERVICE_NAMESPACE",
  447. "valueFrom": {
  448. "fieldRef": {
  449. "fieldPath": "metadata.namespace"
  450. }
  451. }
  452. },
  453. {
  454. "name": "AMQ_KEYSTORE_TRUSTSTORE_DIR",
  455. "value": "/etc/amq-secret-volume"
  456. },
  457. {
  458. "name": "AMQ_TRUSTSTORE",
  459. "value": "${AMQ_TRUSTSTORE}"
  460. },
  461. {
  462. "name": "AMQ_TRUSTSTORE_PASSWORD",
  463. "value": "${AMQ_TRUSTSTORE_PASSWORD}"
  464. },
  465. {
  466. "name": "AMQ_KEYSTORE",
  467. "value": "${AMQ_KEYSTORE}"
  468. },
  469. {
  470. "name": "AMQ_KEYSTORE_PASSWORD",
  471. "value": "${AMQ_KEYSTORE_PASSWORD}"
  472. },
  473. {
  474. "name": "AMQ_STORAGE_USAGE_LIMIT",
  475. "value": "${AMQ_STORAGE_USAGE_LIMIT}"
  476. }
  477. ]
  478. }
  479. ],
  480. "volumes": [
  481. {
  482. "name": "broker-secret-volume",
  483. "secret": {
  484. "secretName": "${AMQ_SECRET}"
  485. }
  486. }
  487. ]
  488. }
  489. }
  490. }
  491. }
  492. ]
  493. }