forked from daniyalj/rocketchat-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrocketchat-template.yaml
289 lines (288 loc) · 7.47 KB
/
rocketchat-template.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
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
---
kind: Template
apiVersion: v1
metadata:
name: rocket-chat-ephemeral
annotations:
description: Rocket.Chat with a MongoDB database running with an Ephemeral storage.
tags: quickstart,nodejs,mongodb,instant-app
iconClass: icon-nodejs
objects:
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
labels:
app: mongodb-26-rhel7
app.kubernetes.io/component: mongodb-26-rhel7
app.kubernetes.io/instance: mongodb-26-rhel7
name: mongodb-26-rhel7
spec:
lookupPolicy:
local: false
tags:
- annotations:
openshift.io/imported-from: registry.access.redhat.com/rhscl/mongodb-26-rhel7:latest
from:
kind: DockerImage
name: registry.access.redhat.com/rhscl/mongodb-26-rhel7:latest
name: latest
referencePolicy:
type: Source
- kind: DeploymentConfig
apiVersion: v1
metadata:
name: mongodb
labels:
template: mongodb-ephemeral-template
spec:
strategy:
type: Recreate
recreateParams:
timeoutSeconds: 600
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- mongodb
from:
kind: ImageStreamTag
name: mongodb-26-rhel7:latest
- type: ConfigChange
replicas: 1
test: false
selector:
name: mongodb
template:
metadata:
creationTimestamp:
labels:
name: mongodb
spec:
volumes:
- name: mongodb-data
emptyDir: {}
containers:
- name: mongodb
image: registry.access.redhat.com/rhscl/mongodb-26-rhel7:latest
ports:
- containerPort: 27017
protocol: TCP
env:
- name: MONGODB_USER
value: "${MONGODB_USER}"
- name: MONGODB_PASSWORD
value: "${MONGODB_PASSWORD}"
- name: MONGODB_DATABASE
value: "${MONGODB_DATABASE}"
- name: MONGODB_ADMIN_PASSWORD
value: "${MONGODB_ADMIN_PASSWORD}"
resources:
limits:
memory: "${MEMORY_LIMIT}"
volumeMounts:
- name: mongodb-data
mountPath: "/var/lib/mongodb/data"
livenessProbe:
tcpSocket:
port: 27017
initialDelaySeconds: 30
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
readinessProbe:
exec:
command:
- "/bin/sh"
- "-i"
- "-c"
- mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD
--eval="quit()"
initialDelaySeconds: 3
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
terminationMessagePath: "/dev/termination-log"
imagePullPolicy: IfNotPresent
securityContext:
capabilities: {}
privileged: false
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
- kind: DeploymentConfig
apiVersion: v1
metadata:
name: rocketchat
creationTimestamp:
labels:
app: rocketchat
spec:
strategy:
type: Rolling
rollingParams:
updatePeriodSeconds: 1
intervalSeconds: 1
timeoutSeconds: 600
maxUnavailable: 25%
maxSurge: 25%
resources: {}
triggers:
- type: ConfigChange
replicas: 1
test: false
selector:
app: rocketchat
deploymentconfig: rocketchat
template:
metadata:
creationTimestamp:
labels:
app: rocketchat
deploymentconfig: rocketchat
annotations:
openshift.io/container.rocketchat.image.entrypoint: '["node","main.js"]'
spec:
volumes:
- name: rocketchat-volume-1
emptyDir: {}
containers:
- name: rocketchat
image: "${ROCKETCHAT_IMAGE}:latest" ## Needs to change
ports:
- containerPort: 3000
protocol: TCP
env:
- name: MONGO_URL
value: mongodb://${MONGODB_USER}:${MONGODB_PASSWORD}@mongodb:27017/${MONGODB_DATABASE}
resources: {}
volumeMounts:
- name: rocketchat-volume-1
mountPath: "/app/uploads"
readinessProbe:
httpGet:
path: "/api/v1/info"
port: 3000
scheme: HTTP
initialDelaySeconds: 5
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
livenessProbe:
httpGet:
path: "/api/v1/info"
port: 3000
scheme: HTTP
initialDelaySeconds: 30
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
terminationMessagePath: "/dev/termination-log"
imagePullPolicy: Always
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
status: {}
- kind: Route
apiVersion: v1
metadata:
name: rocketchat
creationTimestamp:
labels:
app: rocketchat
annotations:
openshift.io/host.generated: 'true'
spec:
to:
kind: Service
name: rocketchat
port:
targetPort: 3000-tcp
status:
ingress:
- kind: Service
apiVersion: v1
metadata:
name: mongodb
creationTimestamp:
labels:
template: mongodb-ephemeral-template
spec:
ports:
- name: mongo
protocol: TCP
port: 27017
targetPort: 27017
selector:
name: mongodb
type: ClusterIP
sessionAffinity: None
status:
loadBalancer: {}
- kind: Service
apiVersion: v1
metadata:
name: rocketchat
creationTimestamp:
labels:
app: rocketchat
annotations:
openshift.io/generated-by: OpenShiftNewApp
spec:
ports:
- name: 3000-tcp
protocol: TCP
port: 3000
targetPort: 3000
selector:
app: rocketchat
deploymentconfig: rocketchat
type: ClusterIP
sessionAffinity: None
status:
loadBalancer: {}
parameters:
- name: MEMORY_LIMIT
displayName: Memory Limit
description: Maximum amount of memory the container can use.
value: 512Mi
- name: DATABASE_SERVICE_NAME
displayName: Database Service Name
description: The name of the OpenShift Service exposed for the database.
value: mongodb
required: true
- name: MONGODB_USER
displayName: MongoDB User
description: Username for MongoDB user that will be used for accessing the database.
generate: expression
from: user[A-Z0-9]{3}
required: true
- name: MONGODB_PASSWORD
displayName: MongoDB Password
description: Password for the MongoDB user.
generate: expression
from: "[a-zA-Z0-9]{16}"
required: true
- name: MONGODB_DATABASE
displayName: MongoDB Database Name
description: Name of the MongoDB database accessed.
value: rocketchatdb
required: true
- name: ROCKETCHAT_IMAGE
displayName: RocketChat Image
description: The RocketChat image to use for this deployment
required: true
value: docker.io/rocketchat/rocket.chat
## Add parameter for Rocket.Chat Image tag
- name: MONGODB_ADMIN_PASSWORD
displayName: MongoDB Admin Password
description: Password for the database admin user.
generate: expression
from: "[a-zA-Z0-9]{16}"
required: true