/
amq-broker-71-persistence.yaml
243 lines (243 loc) · 7.69 KB
/
amq-broker-71-persistence.yaml
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
apiVersion: v1
kind: Template
labels:
template: amq-broker-71-persistence
xpaas: 1.4.12
message: A new messaging service has been created in your project. It will handle the protocol(s) "${AMQ_PROTOCOL}". The username/password for accessing the service is ${AMQ_USER}/${AMQ_PASSWORD}.
metadata:
annotations:
description: Application template for Red Hat AMQ brokers. These can be deployed as standalone or in a mesh. This template doesn't feature SSL support.
iconClass: icon-amq
openshift.io/display-name: Red Hat AMQ Broker 7.1 (Persistence, no SSL)
openshift.io/provider-display-name: Red Hat, Inc.
tags: messaging,amq,jboss
template.openshift.io/documentation-url: 'https://access.redhat.com/documentation/en/red-hat-amq/'
template.openshift.io/long-description: >-
This template defines resources needed to develop Red Hat AMQ Broker 7.1 based application, including a deployment configuration, using persistent storage. These can be deployed as standalone or in a mesh.
template.openshift.io/support-url: 'https://access.redhat.com'
version: 1.4.12
name: amq-broker-71-persistence
objects:
- apiVersion: v1
kind: Service
metadata:
annotations:
description: The broker's console and Jolokia port.
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-amq-jolokia
spec:
ports:
- port: 8161
targetPort: 8161
selector:
deploymentConfig: ${APPLICATION_NAME}-amq
- apiVersion: v1
kind: Service
metadata:
annotations:
description: The broker's AMQP port.
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-amq-amqp
spec:
ports:
- port: 5672
targetPort: 5672
selector:
deploymentConfig: ${APPLICATION_NAME}-amq
- apiVersion: v1
kind: Service
metadata:
annotations:
description: The broker's MQTT port.
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-amq-mqtt
spec:
ports:
- port: 1883
targetPort: 1883
selector:
deploymentConfig: ${APPLICATION_NAME}-amq
- apiVersion: v1
kind: Service
metadata:
annotations:
description: The broker's STOMP port.
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-amq-stomp
spec:
ports:
- port: 61613
targetPort: 61613
selector:
deploymentConfig: ${APPLICATION_NAME}-amq
- apiVersion: v1
kind: Service
metadata:
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"}]'
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-amq-tcp
spec:
ports:
- port: 61616
targetPort: 61616
selector:
deploymentConfig: ${APPLICATION_NAME}-amq
- apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-amq
spec:
selector:
matchLabels:
app: ${APPLICATION_NAME}-amq
strategy:
rollingParams:
maxSurge: 0
type: Rolling
template:
metadata:
labels:
application: ${APPLICATION_NAME}
deploymentConfig: ${APPLICATION_NAME}-amq
app: ${APPLICATION_NAME}-amq
name: ${APPLICATION_NAME}-amq
spec:
containers:
- env:
- name: AMQ_USER
value: ${AMQ_USER}
- name: AMQ_PASSWORD
value: ${AMQ_PASSWORD}
- name: AMQ_ROLE
value: ${AMQ_ROLE}
- name: AMQ_NAME
value: ${AMQ_NAME}
- name: AMQ_TRANSPORTS
value: ${AMQ_PROTOCOL}
- name: AMQ_QUEUES
value: ${AMQ_QUEUES}
- name: AMQ_ADDRESSES
value: ${AMQ_ADDRESSES}
- name: AMQ_GLOBAL_MAX_SIZE
value: ${AMQ_GLOBAL_MAX_SIZE}
- name: AMQ_REQUIRE_LOGIN
value: ${AMQ_REQUIRE_LOGIN}
- name: AMQ_DATA_DIR
value: ${AMQ_DATA_DIR}
image: ${IMAGE}
readinessProbe:
exec:
command:
- "/bin/bash"
- "-c"
- "/opt/amq/bin/readinessProbe.sh"
name: ${APPLICATION_NAME}-amq
ports:
- containerPort: 8161
name: console-jolokia
protocol: TCP
- containerPort: 5672
name: amqp
protocol: TCP
- containerPort: 1883
name: mqtt
protocol: TCP
- containerPort: 61613
name: stomp
protocol: TCP
- containerPort: 61616
name: artemis
protocol: TCP
volumeMounts:
- name: ${APPLICATION_NAME}-amq-pvol
mountPath: ${AMQ_DATA_DIR}
terminationGracePeriodSeconds: 60
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ${APPLICATION_NAME}-amq-pvol
spec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: ${VOLUME_CAPACITY}
triggers:
- type: ConfigChange
- apiVersion: v1
kind: Route
metadata:
labels:
application: ${APPLICATION_NAME}
name: console
spec:
to:
kind: Service
name: ${APPLICATION_NAME}-amq-jolokia
parameters:
- description: The name for the application.
displayName: Application Name
name: APPLICATION_NAME
required: true
value: broker
- description: 'Protocols to configure, separated by commas. Allowed values are: `openwire`, `amqp`, `stomp`, `mqtt` and `hornetq`.'
displayName: AMQ Protocols
name: AMQ_PROTOCOL
value: openwire,amqp,stomp,mqtt,hornetq
- 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.
displayName: Queues
name: AMQ_QUEUES
- description: Address names, separated by commas. These addresses will be automatically created when the broker starts. If left empty, addresses will be still created dynamically.
displayName: Addresses
name: AMQ_ADDRESSES
- description: Size of the volume used by AMQ for persisting messages.
displayName: AMQ Volume Size
name: VOLUME_CAPACITY
value: 1Gi
required: true
- description: User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.
displayName: AMQ Username
from: user[a-zA-Z0-9]{3}
generate: expression
name: AMQ_USER
- description: Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.
displayName: AMQ Password
from: '[a-zA-Z0-9]{8}'
generate: expression
name: AMQ_PASSWORD
- description: User role for standard broker user.
displayName: AMQ Role
name: AMQ_ROLE
value: admin
- description: The name of the broker
displayName: AMQ Name
name: AMQ_NAME
value: broker
- description: The directory to use for data storage
displayName: AMQ Data Directory
name: AMQ_DATA_DIR
value: /opt/amq/data
- description: "Maximum amount of memory which message data may consume (Default: Undefined, half of the system's memory)."
displayName: AMQ Global Max Size
name: AMQ_GLOBAL_MAX_SIZE
value: 100 gb
- description: "Determines whether or not the broker will allow anonymous access, or require login."
displayName: AMQ Require Login
name: AMQ_REQUIRE_LOGIN
- description: Broker Image
displayName: Image
name: IMAGE
required: true
value: registry.access.redhat.com/amq-broker-7-tech-preview/amq-broker-71-openshift:1.0