amq62-persistent-ssl.json 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "description": "Application template for JBoss A-MQ brokers. These are deployed as standalone and use persistent storage for saving messages. This template supports SSL and requires usage of OpenShift secrets.",
  7. "iconClass": "icon-jboss",
  8. "tags": "messaging,amq,jboss,xpaas",
  9. "version": "1.2.0"
  10. },
  11. "name": "amq62-persistent-ssl"
  12. },
  13. "labels": {
  14. "template": "amq62-persistent-ssl",
  15. "xpaas": "1.2.0"
  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": "Size of persistent storage for database volume.",
  44. "name": "VOLUME_CAPACITY",
  45. "value": "512Mi",
  46. "required": true
  47. },
  48. {
  49. "description": "User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
  50. "name": "MQ_USERNAME",
  51. "from": "user[a-zA-Z0-9]{3}",
  52. "generate": "expression",
  53. "required": false
  54. },
  55. {
  56. "description": "Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
  57. "name": "MQ_PASSWORD",
  58. "from": "[a-zA-Z0-9]{8}",
  59. "generate": "expression",
  60. "required": false
  61. },
  62. {
  63. "description": "Name of a secret containing SSL related files",
  64. "name": "AMQ_SECRET",
  65. "value": "amq-app-secret",
  66. "required": true
  67. },
  68. {
  69. "description": "SSL trust store filename",
  70. "name": "AMQ_TRUSTSTORE",
  71. "value": "broker.ts",
  72. "required": true
  73. },
  74. {
  75. "description": "SSL trust store password",
  76. "name": "AMQ_TRUSTSTORE_PASSWORD",
  77. "value": "",
  78. "required": true
  79. },
  80. {
  81. "description": "SSL key store filename",
  82. "name": "AMQ_KEYSTORE",
  83. "value": "broker.ks",
  84. "required": true
  85. },
  86. {
  87. "description": "Password for accessing SSL keystore",
  88. "name": "AMQ_KEYSTORE_PASSWORD",
  89. "value": "",
  90. "required": true
  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": "Recreate"
  310. },
  311. "triggers": [
  312. {
  313. "type": "ImageChange",
  314. "imageChangeParams": {
  315. "automatic": true,
  316. "containerNames": [
  317. "${APPLICATION_NAME}-amq"
  318. ],
  319. "from": {
  320. "kind": "ImageStreamTag",
  321. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  322. "name": "jboss-amq-62:1.2"
  323. }
  324. }
  325. },
  326. {
  327. "type": "ConfigChange"
  328. }
  329. ],
  330. "replicas": 1,
  331. "selector": {
  332. "deploymentConfig": "${APPLICATION_NAME}-amq"
  333. },
  334. "template": {
  335. "metadata": {
  336. "name": "${APPLICATION_NAME}-amq",
  337. "labels": {
  338. "deploymentConfig": "${APPLICATION_NAME}-amq",
  339. "application": "${APPLICATION_NAME}"
  340. }
  341. },
  342. "spec": {
  343. "serviceAccount": "amq-service-account",
  344. "terminationGracePeriodSeconds": 60,
  345. "containers": [
  346. {
  347. "name": "${APPLICATION_NAME}-amq",
  348. "image": "jboss-amq-62",
  349. "imagePullPolicy": "Always",
  350. "volumeMounts": [
  351. {
  352. "name": "broker-secret-volume",
  353. "mountPath": "/etc/amq-secret-volume",
  354. "readOnly": true
  355. },
  356. {
  357. "mountPath": "/opt/amq/data/kahadb",
  358. "name": "${APPLICATION_NAME}-amq-pvol"
  359. }
  360. ],
  361. "readinessProbe": {
  362. "exec": {
  363. "command": [
  364. "/bin/bash",
  365. "-c",
  366. "/opt/amq/bin/readinessProbe.sh"
  367. ]
  368. }
  369. },
  370. "ports": [
  371. {
  372. "name": "jolokia",
  373. "containerPort": 8778,
  374. "protocol": "TCP"
  375. },
  376. {
  377. "name": "amqp",
  378. "containerPort": 5672,
  379. "protocol": "TCP"
  380. },
  381. {
  382. "name": "amqp-ssl",
  383. "containerPort": 5671,
  384. "protocol": "TCP"
  385. },
  386. {
  387. "name": "mqtt",
  388. "containerPort": 1883,
  389. "protocol": "TCP"
  390. },
  391. {
  392. "name": "mqtt-ssl",
  393. "containerPort": 8883,
  394. "protocol": "TCP"
  395. },
  396. {
  397. "name": "stomp",
  398. "containerPort": 61613,
  399. "protocol": "TCP"
  400. },
  401. {
  402. "name": "stomp-ssl",
  403. "containerPort": 61612,
  404. "protocol": "TCP"
  405. },
  406. {
  407. "name": "tcp",
  408. "containerPort": 61616,
  409. "protocol": "TCP"
  410. },
  411. {
  412. "name": "tcp-ssl",
  413. "containerPort": 61617,
  414. "protocol": "TCP"
  415. }
  416. ],
  417. "env": [
  418. {
  419. "name": "AMQ_USER",
  420. "value": "${MQ_USERNAME}"
  421. },
  422. {
  423. "name": "AMQ_PASSWORD",
  424. "value": "${MQ_PASSWORD}"
  425. },
  426. {
  427. "name": "AMQ_TRANSPORTS",
  428. "value": "${MQ_PROTOCOL}"
  429. },
  430. {
  431. "name": "AMQ_QUEUES",
  432. "value": "${MQ_QUEUES}"
  433. },
  434. {
  435. "name": "AMQ_TOPICS",
  436. "value": "${MQ_TOPICS}"
  437. },
  438. {
  439. "name": "AMQ_KEYSTORE_TRUSTSTORE_DIR",
  440. "value": "/etc/amq-secret-volume"
  441. },
  442. {
  443. "name": "AMQ_TRUSTSTORE",
  444. "value": "${AMQ_TRUSTSTORE}"
  445. },
  446. {
  447. "name": "AMQ_TRUSTSTORE_PASSWORD",
  448. "value": "${AMQ_TRUSTSTORE_PASSWORD}"
  449. },
  450. {
  451. "name": "AMQ_KEYSTORE",
  452. "value": "${AMQ_KEYSTORE}"
  453. },
  454. {
  455. "name": "AMQ_KEYSTORE_PASSWORD",
  456. "value": "${AMQ_KEYSTORE_PASSWORD}"
  457. },
  458. {
  459. "name": "AMQ_STORAGE_USAGE_LIMIT",
  460. "value": "${AMQ_STORAGE_USAGE_LIMIT}"
  461. }
  462. ]
  463. }
  464. ],
  465. "volumes": [
  466. {
  467. "name": "broker-secret-volume",
  468. "secret": {
  469. "secretName": "${AMQ_SECRET}"
  470. }
  471. },
  472. {
  473. "name": "${APPLICATION_NAME}-amq-pvol",
  474. "persistentVolumeClaim": {
  475. "claimName": "${APPLICATION_NAME}-amq-claim"
  476. }
  477. }
  478. ]
  479. }
  480. }
  481. }
  482. },
  483. {
  484. "apiVersion": "v1",
  485. "kind": "PersistentVolumeClaim",
  486. "metadata": {
  487. "name": "${APPLICATION_NAME}-amq-claim",
  488. "labels": {
  489. "application": "${APPLICATION_NAME}"
  490. }
  491. },
  492. "spec": {
  493. "accessModes": [
  494. "ReadWriteOnce"
  495. ],
  496. "resources": {
  497. "requests": {
  498. "storage": "${VOLUME_CAPACITY}"
  499. }
  500. }
  501. }
  502. }
  503. ]
  504. }