amq63-ssl.json 21 KB

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