-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathamq-template.yml
241 lines (241 loc) · 7 KB
/
amq-template.yml
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
apiVersion: v1
kind: Template
labels:
template: amq63
xpaas: 1.3.1
metadata:
annotations:
description: Application template for JBoss A-MQ brokers. These can be deployed as standalone and use persistent storage for saving messages.
iconClass: icon-jboss
tags: messaging,amq,jboss,xpaas
version: 1.3.1
name: amq63
objects:
- kind: ImageStream
apiVersion: v1
metadata:
labels:
build: openshift-amq
name: amq63-openshift
spec:
lookupPolicy:
local: false
tags:
- annotations:
openshift.io/imported-from: docker-registry.default.svc:5000/reproducer/amq63-openshift:latest
importPolicy: {}
name: "latest"
referencePolicy:
type: Source
- kind: ImageStream
apiVersion: v1
metadata:
labels:
build: amq63
name: amq63
spec:
lookupPolicy:
local: false
- kind: BuildConfig
apiVersion: v1
metadata:
labels:
app: amq63
build: amq63
template: amq63
xpaas: 1.3.1
name: amq63
spec:
failedBuildsHistoryLimit: 5
output:
to:
kind: ImageStreamTag
name: amq63:latest
runPolicy: Serial
source:
git:
uri: ${GIT_URI}
type: Git
strategy:
sourceStrategy:
from:
kind: ImageStreamTag
name: amq63-openshift:latest
type: Source
successfulBuildsHistoryLimit: 5
triggers:
- imageChange: {}
type: ImageChange
- type: ConfigChange
- kind: Service
apiVersion: v1
metadata:
annotations:
description: The broker's OpenWire port.
labels:
project: broker
app: amq63
name: broker-amq-tcp
spec:
ports:
- name: tcp
port: 61616
targetPort: 61616
- name: tcpssl
port: 61617
targetPort: 61617
- name: prometheus-exporter
port: 9779
targetPort: 9779
selector:
project: broker
- kind: DeploymentConfig
apiVersion: v1
metadata:
labels:
project: broker
app: amq63
name: ${APPLICATION_NAME}-amq
spec:
replicas: 1
selector:
project: broker
strategy:
type: Recreate
template:
metadata:
labels:
project: broker
name: ${APPLICATION_NAME}-amq
spec:
containers:
- env:
- name: ACTIVEMQ_OPTS
value: ' -javaagent:/opt/amq/conf/jmx_prometheus_javaagent-0.3.1.jar=9779:/opt/amq/conf/prometheus_javaagent.yml'
- 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_SPLIT
value: "FALSE"
- name: AMQ_MESH_DISCOVERY_TYPE
value: kube
- 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_TEMP_USAGE_LIMIT
value: ${AMQ_TEMP_USAGE_LIMIT}
image: amq63:latest
imagePullPolicy: Always
name: ${APPLICATION_NAME}-amq
ports:
- containerPort: 8778
name: jolokia
protocol: TCP
- containerPort: 61616
name: tcp
protocol: TCP
- containerPort: 61617
name: amqp-ssl
protocol: TCP
- containerPort: 9779
name: jmx-exporter
protocol: TCP
readinessProbe:
exec:
command:
- /bin/bash
- -c
- /opt/amq/bin/readinessProbe.sh
volumeMounts:
- mountPath: /opt/amq/data
name: ${APPLICATION_NAME}-amq-pvol
terminationGracePeriodSeconds: 60
volumes:
- name: ${APPLICATION_NAME}-amq-pvol
persistentVolumeClaim:
claimName: ${APPLICATION_NAME}-amq-claim
triggers:
- imageChangeParams:
automatic: true
containerNames:
- ${APPLICATION_NAME}-amq
from:
kind: ImageStreamTag
name: amq63:latest
type: ImageChange
- type: ConfigChange
- kind: PersistentVolumeClaim
apiVersion: v1
metadata:
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-amq-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: ${VOLUME_CAPACITY}
parameters:
- description: The name for the application.
name: APPLICATION_NAME
required: true
value: broker
- description: The URI for the git.
name: GIT_URI
required: true
- description: 'Protocols to configure, separated by commas. Allowed values are:
`openwire`, `amqp`, `stomp` and `mqtt`.'
name: MQ_PROTOCOL
value: openwire
- 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
- 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
- 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
- description: Size of persistent storage for database volume.
name: VOLUME_CAPACITY
required: true
value: 1Gi
- description: User name for standard broker user. It is required for connecting
to the broker. If left empty, it will be generated.
from: user[a-zA-Z0-9]{3}
generate: expression
name: MQ_USERNAME
- description: Password for standard broker user. It is required for connecting to
the broker. If left empty, it will be generated.
from: '[a-zA-Z0-9]{8}'
generate: expression
name: MQ_PASSWORD
- description: The A-MQ storage usage limit
name: AMQ_STORAGE_USAGE_LIMIT
value: 1 gb
- description: The A-MQ temp storage usage limit
name: AMQ_TEMP_USAGE_LIMIT
value: 1 gb
- 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
required: true
value: openshift