summaryrefslogtreecommitdiffstats
path: root/roles/openshift_examples/files/examples/v3.8/xpaas-templates/amq62-basic.json
blob: 8f8e14cb60ec551a8d9ff0085f22e58d2ee3c65d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
{
    "kind": "Template",
    "apiVersion": "v1",
    "metadata": {
        "annotations": {
            "description": "Application template for JBoss A-MQ brokers. These can be deployed as standalone or in a mesh. This template doesn't feature SSL support.",
            "iconClass": "icon-amq",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "tags": "messaging,amq,jboss,hidden",
            "version": "1.4.7",
            "openshift.io/display-name": "JBoss A-MQ 6.2 (Ephemeral, no SSL)"
        },
        "name": "amq62-basic"
    },
    "labels": {
        "template": "amq62-basic",
        "xpaas": "1.4.7"
    },
    "message": "A new 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}.",
    "parameters": [
        {
            "displayName": "Application Name",
            "description": "The name for the application.",
            "name": "APPLICATION_NAME",
            "value": "broker",
            "required": true
        },
        {
            "displayName": "A-MQ Protocols",
            "description": "Protocols to configure, separated by commas. Allowed values are: `openwire`, `amqp`, `stomp` and `mqtt`.",
            "name": "MQ_PROTOCOL",
            "value": "openwire",
            "required": false
        },
        {
            "displayName": "Queues",
            "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.",
            "name": "MQ_QUEUES",
            "value": "",
            "required": false
        },
        {
            "displayName": "Topics",
            "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.",
            "name": "MQ_TOPICS",
            "value": "",
            "required": false
        },
        {
            "displayName": "A-MQ Serializable Packages",
            "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",
            "name": "MQ_SERIALIZABLE_PACKAGES",
            "value": "",
            "required": false
        },
        {
            "displayName": "A-MQ Username",
            "description": "User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
            "name": "MQ_USERNAME",
            "from": "user[a-zA-Z0-9]{3}",
            "generate": "expression",
            "required": false
        },
        {
            "displayName": "A-MQ Password",
            "description": "Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
            "name": "MQ_PASSWORD",
            "from": "[a-zA-Z0-9]{8}",
            "generate": "expression",
            "required": false
        },
        {
            "displayName": "A-MQ Mesh Discovery Type",
            "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.",
            "name": "AMQ_MESH_DISCOVERY_TYPE",
            "value": "kube",
            "required": false
        },
        {
            "displayName": "A-MQ Storage Limit",
            "description": "The A-MQ storage usage limit",
            "name": "AMQ_STORAGE_USAGE_LIMIT",
            "value": "100 gb",
            "required": false
        },
        {
            "displayName": "Queue Memory Limit",
            "description": "The queue memory limit (default is 1mb)",
            "name": "AMQ_QUEUE_MEMORY_LIMIT",
            "value": "",
            "required": false
        },
        {
            "displayName": "ImageStream Namespace",
            "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.",
            "name": "IMAGE_STREAM_NAMESPACE",
            "value": "openshift",
            "required": true
        }
    ],
    "objects": [
        {
            "kind": "Service",
            "apiVersion": "v1",
            "spec": {
                "ports": [
                    {
                        "port": 5672,
                        "targetPort": 5672
                    }
                ],
                "selector": {
                    "deploymentConfig": "${APPLICATION_NAME}-amq"
                }
            },
            "metadata": {
                "name": "${APPLICATION_NAME}-amq-amqp",
                "labels": {
                    "application": "${APPLICATION_NAME}"
                },
                "annotations": {
                    "description": "The broker's AMQP port."
                }
            }
        },
        {
            "kind": "Service",
            "apiVersion": "v1",
            "spec": {
                "ports": [
                    {
                        "port": 1883,
                        "targetPort": 1883
                    }
                ],
                "selector": {
                    "deploymentConfig": "${APPLICATION_NAME}-amq"
                }
            },
            "metadata": {
                "name": "${APPLICATION_NAME}-amq-mqtt",
                "labels": {
                    "application": "${APPLICATION_NAME}"
                },
                "annotations": {
                    "description": "The broker's MQTT port."
                }
            }
        },
        {
            "kind": "Service",
            "apiVersion": "v1",
            "spec": {
                "ports": [
                    {
                        "port": 61613,
                        "targetPort": 61613
                    }
                ],
                "selector": {
                    "deploymentConfig": "${APPLICATION_NAME}-amq"
                }
            },
            "metadata": {
                "name": "${APPLICATION_NAME}-amq-stomp",
                "labels": {
                    "application": "${APPLICATION_NAME}"
                },
                "annotations": {
                    "description": "The broker's STOMP port."
                }
            }
        },
        {
            "kind": "Service",
            "apiVersion": "v1",
            "spec": {
                "ports": [
                    {
                        "port": 61616,
                        "targetPort": 61616
                    }
                ],
                "selector": {
                    "deploymentConfig": "${APPLICATION_NAME}-amq"
                }
            },
            "metadata": {
                "name": "${APPLICATION_NAME}-amq-tcp",
                "labels": {
                    "application": "${APPLICATION_NAME}"
                },
                "annotations": {
                    "description": "The broker's OpenWire port.",
                    "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\"}]"
                }
            }
        },
        {
            "kind": "DeploymentConfig",
            "apiVersion": "v1",
            "metadata": {
                "name": "${APPLICATION_NAME}-amq",
                "labels": {
                    "application": "${APPLICATION_NAME}"
                }
            },
            "spec": {
                "strategy": {
                    "type": "Rolling",
                    "rollingParams": {
                        "maxSurge": 0
                    }
                },
                "triggers": [
                    {
                        "type": "ImageChange",
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "${APPLICATION_NAME}-amq"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "namespace": "${IMAGE_STREAM_NAMESPACE}",
                                "name": "jboss-amq-62:1.6"
                            }
                        }
                    },
                    {
                        "type": "ConfigChange"
                    }
                ],
                "replicas": 1,
                "selector": {
                    "deploymentConfig": "${APPLICATION_NAME}-amq"
                },
                "template": {
                    "metadata": {
                        "name": "${APPLICATION_NAME}-amq",
                        "labels": {
                            "deploymentConfig": "${APPLICATION_NAME}-amq",
                            "application": "${APPLICATION_NAME}"
                        }
                    },
                    "spec": {
                        "terminationGracePeriodSeconds": 60,
                        "containers": [
                            {
                                "name": "${APPLICATION_NAME}-amq",
                                "image": "jboss-amq-62",
                                "imagePullPolicy": "Always",
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/bash",
                                            "-c",
                                            "/opt/amq/bin/readinessProbe.sh"
                                        ]
                                    }
                                },
                                "ports": [
                                    {
                                        "name": "jolokia",
                                        "containerPort": 8778,
                                        "protocol": "TCP"
                                    },
                                    {
                                        "name": "amqp",
                                        "containerPort": 5672,
                                        "protocol": "TCP"
                                    },
                                    {
                                        "name": "mqtt",
                                        "containerPort": 1883,
                                        "protocol": "TCP"
                                    },
                                    {
                                        "name": "stomp",
                                        "containerPort": 61613,
                                        "protocol": "TCP"
                                    },
                                    {
                                        "name": "tcp",
                                        "containerPort": 61616,
                                        "protocol": "TCP"
                                    }
                                ],
                                "env": [
                                    {
                                        "name": "AMQ_USER",
                                        "value": "${MQ_USERNAME}"
                                    },
                                    {
                                        "name": "AMQ_PASSWORD",
                                        "value": "${MQ_PASSWORD}"
                                    },
                                    {
                                        "name": "AMQ_TRANSPORTS",
                                        "value": "${MQ_PROTOCOL}"
                                    },
                                    {
                                        "name": "AMQ_QUEUES",
                                        "value": "${MQ_QUEUES}"
                                    },
                                    {
                                        "name": "AMQ_TOPICS",
                                        "value": "${MQ_TOPICS}"
                                    },
                                    {
                                        "name": "MQ_SERIALIZABLE_PACKAGES",
                                        "value": "${MQ_SERIALIZABLE_PACKAGES}"
                                    },
                                    {
                                        "name": "AMQ_MESH_DISCOVERY_TYPE",
                                        "value": "${AMQ_MESH_DISCOVERY_TYPE}"
                                    },
                                    {
                                        "name": "AMQ_MESH_SERVICE_NAME",
                                        "value": "${APPLICATION_NAME}-amq-tcp"
                                    },
                                    {
                                        "name": "AMQ_MESH_SERVICE_NAMESPACE",
                                        "valueFrom": {
                                            "fieldRef": {
                                                "fieldPath": "metadata.namespace"
                                            }
                                        }
                                    },
                                    {
                                        "name": "AMQ_STORAGE_USAGE_LIMIT",
                                        "value": "${AMQ_STORAGE_USAGE_LIMIT}"
                                    },
                                    {
                                        "name": "AMQ_QUEUE_MEMORY_LIMIT",
                                        "value": "${AMQ_QUEUE_MEMORY_LIMIT}"
                                    }
                                ]
                            }
                        ]
                    }
                }
            }
        }
    ]
}