amq62-ssl.json 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  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": "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",
  44. "name": "MQ_SERIALIZABLE_PACKAGES",
  45. "value": "",
  46. "required": false
  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 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.",
  94. "name": "AMQ_MESH_DISCOVERY_TYPE",
  95. "value": "kube",
  96. "required": false
  97. },
  98. {
  99. "description": "The A-MQ storage usage limit",
  100. "name": "AMQ_STORAGE_USAGE_LIMIT",
  101. "value": "100 gb",
  102. "required": false
  103. },
  104. {
  105. "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.",
  106. "name": "IMAGE_STREAM_NAMESPACE",
  107. "value": "openshift",
  108. "required": true
  109. }
  110. ],
  111. "objects": [
  112. {
  113. "kind": "Service",
  114. "apiVersion": "v1",
  115. "spec": {
  116. "ports": [
  117. {
  118. "port": 5672,
  119. "targetPort": 5672
  120. }
  121. ],
  122. "selector": {
  123. "deploymentConfig": "${APPLICATION_NAME}-amq"
  124. }
  125. },
  126. "metadata": {
  127. "name": "${APPLICATION_NAME}-amq-amqp",
  128. "labels": {
  129. "application": "${APPLICATION_NAME}"
  130. },
  131. "annotations": {
  132. "description": "The broker's AMQP port."
  133. }
  134. }
  135. },
  136. {
  137. "kind": "Service",
  138. "apiVersion": "v1",
  139. "spec": {
  140. "ports": [
  141. {
  142. "port": 5671,
  143. "targetPort": 5671
  144. }
  145. ],
  146. "selector": {
  147. "deploymentConfig": "${APPLICATION_NAME}-amq"
  148. }
  149. },
  150. "metadata": {
  151. "name": "${APPLICATION_NAME}-amq-amqp-ssl",
  152. "labels": {
  153. "application": "${APPLICATION_NAME}"
  154. },
  155. "annotations": {
  156. "description": "The broker's AMQP SSL port."
  157. }
  158. }
  159. },
  160. {
  161. "kind": "Service",
  162. "apiVersion": "v1",
  163. "spec": {
  164. "ports": [
  165. {
  166. "port": 1883,
  167. "targetPort": 1883
  168. }
  169. ],
  170. "selector": {
  171. "deploymentConfig": "${APPLICATION_NAME}-amq"
  172. }
  173. },
  174. "metadata": {
  175. "name": "${APPLICATION_NAME}-amq-mqtt",
  176. "labels": {
  177. "application": "${APPLICATION_NAME}"
  178. },
  179. "annotations": {
  180. "description": "The broker's MQTT port."
  181. }
  182. }
  183. },
  184. {
  185. "kind": "Service",
  186. "apiVersion": "v1",
  187. "spec": {
  188. "ports": [
  189. {
  190. "port": 8883,
  191. "targetPort": 8883
  192. }
  193. ],
  194. "selector": {
  195. "deploymentConfig": "${APPLICATION_NAME}-amq"
  196. }
  197. },
  198. "metadata": {
  199. "name": "${APPLICATION_NAME}-amq-mqtt-ssl",
  200. "labels": {
  201. "application": "${APPLICATION_NAME}"
  202. },
  203. "annotations": {
  204. "description": "The broker's MQTT SSL port."
  205. }
  206. }
  207. },
  208. {
  209. "kind": "Service",
  210. "apiVersion": "v1",
  211. "spec": {
  212. "ports": [
  213. {
  214. "port": 61613,
  215. "targetPort": 61613
  216. }
  217. ],
  218. "selector": {
  219. "deploymentConfig": "${APPLICATION_NAME}-amq"
  220. }
  221. },
  222. "metadata": {
  223. "name": "${APPLICATION_NAME}-amq-stomp",
  224. "labels": {
  225. "application": "${APPLICATION_NAME}"
  226. },
  227. "annotations": {
  228. "description": "The broker's STOMP port."
  229. }
  230. }
  231. },
  232. {
  233. "kind": "Service",
  234. "apiVersion": "v1",
  235. "spec": {
  236. "ports": [
  237. {
  238. "port": 61612,
  239. "targetPort": 61612
  240. }
  241. ],
  242. "selector": {
  243. "deploymentConfig": "${APPLICATION_NAME}-amq"
  244. }
  245. },
  246. "metadata": {
  247. "name": "${APPLICATION_NAME}-amq-stomp-ssl",
  248. "labels": {
  249. "application": "${APPLICATION_NAME}"
  250. },
  251. "annotations": {
  252. "description": "The broker's STOMP SSL port."
  253. }
  254. }
  255. },
  256. {
  257. "kind": "Service",
  258. "apiVersion": "v1",
  259. "spec": {
  260. "ports": [
  261. {
  262. "port": 61616,
  263. "targetPort": 61616
  264. }
  265. ],
  266. "selector": {
  267. "deploymentConfig": "${APPLICATION_NAME}-amq"
  268. }
  269. },
  270. "metadata": {
  271. "name": "${APPLICATION_NAME}-amq-tcp",
  272. "labels": {
  273. "application": "${APPLICATION_NAME}"
  274. },
  275. "annotations": {
  276. "description": "The broker's OpenWire port."
  277. }
  278. }
  279. },
  280. {
  281. "kind": "Service",
  282. "apiVersion": "v1",
  283. "spec": {
  284. "ports": [
  285. {
  286. "port": 61617,
  287. "targetPort": 61617
  288. }
  289. ],
  290. "selector": {
  291. "deploymentConfig": "${APPLICATION_NAME}-amq"
  292. }
  293. },
  294. "metadata": {
  295. "name": "${APPLICATION_NAME}-amq-tcp-ssl",
  296. "labels": {
  297. "application": "${APPLICATION_NAME}"
  298. },
  299. "annotations": {
  300. "description": "The broker's OpenWire (SSL) port."
  301. }
  302. }
  303. },
  304. {
  305. "kind": "DeploymentConfig",
  306. "apiVersion": "v1",
  307. "metadata": {
  308. "name": "${APPLICATION_NAME}-amq",
  309. "labels": {
  310. "application": "${APPLICATION_NAME}"
  311. }
  312. },
  313. "spec": {
  314. "strategy": {
  315. "type": "Rolling",
  316. "rollingParams": {
  317. "maxSurge": 0
  318. }
  319. },
  320. "triggers": [
  321. {
  322. "type": "ImageChange",
  323. "imageChangeParams": {
  324. "automatic": true,
  325. "containerNames": [
  326. "${APPLICATION_NAME}-amq"
  327. ],
  328. "from": {
  329. "kind": "ImageStreamTag",
  330. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  331. "name": "jboss-amq-62:1.3"
  332. }
  333. }
  334. },
  335. {
  336. "type": "ConfigChange"
  337. }
  338. ],
  339. "replicas": 1,
  340. "selector": {
  341. "deploymentConfig": "${APPLICATION_NAME}-amq"
  342. },
  343. "template": {
  344. "metadata": {
  345. "name": "${APPLICATION_NAME}-amq",
  346. "labels": {
  347. "deploymentConfig": "${APPLICATION_NAME}-amq",
  348. "application": "${APPLICATION_NAME}"
  349. }
  350. },
  351. "spec": {
  352. "serviceAccountName": "amq-service-account",
  353. "terminationGracePeriodSeconds": 60,
  354. "containers": [
  355. {
  356. "name": "${APPLICATION_NAME}-amq",
  357. "image": "jboss-amq-62",
  358. "imagePullPolicy": "Always",
  359. "volumeMounts": [
  360. {
  361. "name": "broker-secret-volume",
  362. "mountPath": "/etc/amq-secret-volume",
  363. "readOnly": true
  364. }
  365. ],
  366. "readinessProbe": {
  367. "exec": {
  368. "command": [
  369. "/bin/bash",
  370. "-c",
  371. "/opt/amq/bin/readinessProbe.sh"
  372. ]
  373. }
  374. },
  375. "ports": [
  376. {
  377. "name": "jolokia",
  378. "containerPort": 8778,
  379. "protocol": "TCP"
  380. },
  381. {
  382. "name": "amqp",
  383. "containerPort": 5672,
  384. "protocol": "TCP"
  385. },
  386. {
  387. "name": "amqp-ssl",
  388. "containerPort": 5671,
  389. "protocol": "TCP"
  390. },
  391. {
  392. "name": "mqtt",
  393. "containerPort": 1883,
  394. "protocol": "TCP"
  395. },
  396. {
  397. "name": "mqtt-ssl",
  398. "containerPort": 8883,
  399. "protocol": "TCP"
  400. },
  401. {
  402. "name": "stomp",
  403. "containerPort": 61613,
  404. "protocol": "TCP"
  405. },
  406. {
  407. "name": "stomp-ssl",
  408. "containerPort": 61612,
  409. "protocol": "TCP"
  410. },
  411. {
  412. "name": "tcp",
  413. "containerPort": 61616,
  414. "protocol": "TCP"
  415. },
  416. {
  417. "name": "tcp-ssl",
  418. "containerPort": 61617,
  419. "protocol": "TCP"
  420. }
  421. ],
  422. "env": [
  423. {
  424. "name": "AMQ_USER",
  425. "value": "${MQ_USERNAME}"
  426. },
  427. {
  428. "name": "AMQ_PASSWORD",
  429. "value": "${MQ_PASSWORD}"
  430. },
  431. {
  432. "name": "AMQ_TRANSPORTS",
  433. "value": "${MQ_PROTOCOL}"
  434. },
  435. {
  436. "name": "AMQ_QUEUES",
  437. "value": "${MQ_QUEUES}"
  438. },
  439. {
  440. "name": "AMQ_TOPICS",
  441. "value": "${MQ_TOPICS}"
  442. },
  443. {
  444. "name": "MQ_SERIALIZABLE_PACKAGES",
  445. "value": "${MQ_SERIALIZABLE_PACKAGES}"
  446. },
  447. {
  448. "name": "AMQ_MESH_DISCOVERY_TYPE",
  449. "value": "${AMQ_MESH_DISCOVERY_TYPE}"
  450. },
  451. {
  452. "name": "AMQ_MESH_SERVICE_NAME",
  453. "value": "${APPLICATION_NAME}-amq-tcp"
  454. },
  455. {
  456. "name": "AMQ_MESH_SERVICE_NAMESPACE",
  457. "valueFrom": {
  458. "fieldRef": {
  459. "fieldPath": "metadata.namespace"
  460. }
  461. }
  462. },
  463. {
  464. "name": "AMQ_KEYSTORE_TRUSTSTORE_DIR",
  465. "value": "/etc/amq-secret-volume"
  466. },
  467. {
  468. "name": "AMQ_TRUSTSTORE",
  469. "value": "${AMQ_TRUSTSTORE}"
  470. },
  471. {
  472. "name": "AMQ_TRUSTSTORE_PASSWORD",
  473. "value": "${AMQ_TRUSTSTORE_PASSWORD}"
  474. },
  475. {
  476. "name": "AMQ_KEYSTORE",
  477. "value": "${AMQ_KEYSTORE}"
  478. },
  479. {
  480. "name": "AMQ_KEYSTORE_PASSWORD",
  481. "value": "${AMQ_KEYSTORE_PASSWORD}"
  482. },
  483. {
  484. "name": "AMQ_STORAGE_USAGE_LIMIT",
  485. "value": "${AMQ_STORAGE_USAGE_LIMIT}"
  486. }
  487. ]
  488. }
  489. ],
  490. "volumes": [
  491. {
  492. "name": "broker-secret-volume",
  493. "secret": {
  494. "secretName": "${AMQ_SECRET}"
  495. }
  496. }
  497. ]
  498. }
  499. }
  500. }
  501. }
  502. ]
  503. }