-
Notifications
You must be signed in to change notification settings - Fork 9
/
.gitlab-ci.yml
356 lines (291 loc) · 8.9 KB
/
.gitlab-ci.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
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
347
348
349
350
351
352
353
354
355
356
## TODO: Modularize the gitlab yaml to reuse templates
## Define the stages & order of execution
stages:
- CLUSTER-SETUP
- PROVIDER-INFRA-SETUP
- STATEFUL-APP-DEPLOY
- APP-FUNC-TEST
- APP-CHAOS-TEST
- APP-DEPROVISION
- CLUSTER-CLEANUP
variables:
utils_path: "/builds/openebs/e2e-aws/script/utils"
## Setup the kubernetes cluster
aws-cluster:
image: atulabhi/kops:v8
stage: CLUSTER-SETUP
script:
- ./script/aws
artifacts:
paths:
- aws/
## Setup OpenEBS control plane
openebs-aws-deploy:
image: atulabhi/kops:v8
stage: PROVIDER-INFRA-SETUP
dependencies:
- aws-cluster
script:
- ./script/provider/infra-setup
artifacts:
paths:
- aws-openebs/
openebs-sc-deploy:
image: atulabhi/kops:v8
stage: PROVIDER-INFRA-SETUP
dependencies:
- aws-cluster
script:
- ./script/provider/setup-sc
artifacts:
paths:
- aws-openebs/
## Define a job template for app deployers
.app_deploy_template:
image: atulabhi/kops:v8
stage: STATEFUL-APP-DEPLOY
dependencies:
- openebs-aws-deploy
artifacts:
paths:
- aws-openebs/
## Define the app deployer jobs
## PERCONA-JIVA
percona-jiva-run/load/check 0:2:
extends: .app_deploy_template
script:
- ./script/apps/percona/deployer/percona-app-deploy-jiva
percona-jiva-run/load/check 1:2:
extends: .app_deploy_template
before_script:
- sleep 180
script:
- ./script/apps/percona/workload/jiva/percona-app-workload-jiva
# PROMETHEUS-CSTOR
prometheus-cstor-run/load/check:
extends: .app_deploy_template
script:
- ./script/apps/prometheus/deployer/prometheus-app-deploy-cstor
## PERCONA-JIVA-SINGLE-REPLICA
percona-jiva-single-replica-run/load/check:
extends: .app_deploy_template
script:
- ./script/apps/percona/deployer/percona-deploy-jiva-single-replica
## MONGO-JIVA
mongo-jiva-run/load/check 0:2:
extends: .app_deploy_template
script:
- ./script/apps/mongo/deployer/mongo-app-deploy-jiva
mongo-jiva-run/load/check 1:2:
extends: .app_deploy_template
before_script:
- sleep 180
script:
- ./script/apps/mongo/workload/jiva/mongo-app-workload-jiva
# POSTGRES-JIVA
postgres-jiva-run/load/check 0:2:
extends: .app_deploy_template
script:
- ./script/apps/postgres/deployer/postgres-app-deploy-jiva
postgres-jiva-run/load/check 1:2:
extends: .app_deploy_template
before_script:
- sleep 180
script:
- ./script/apps/postgres/workload/jiva/postgres-app-workload-jiva
# CASSANDRA-JIVA
cassandra-jiva-run/load/check 0:2:
extends: .app_deploy_template
script:
- ./script/apps/cassandra/deployer/cassandra-app-deploy-jiva
# JENKINS-JIVA
jenkins-jiva-run/load/check:
extends: .app_deploy_template
script:
- ./script/apps/jenkins/deployer/jenkins-app-deploy-jiva
# PERCONA-CSTOR
percona-cstor-run/load/check 0:2:
extends: .app_deploy_template
script:
- ./script/apps/percona/deployer/percona-app-deploy-cstor
percona-cstor-run/load/check 1:2:
extends: .app_deploy_template
before_script:
- sleep 180
script:
- ./script/apps/percona/workload/cstor/percona-app-workload-cstor
# MONGO-CSTOR
mongo-cstor-run/load/check 0:2:
extends: .app_deploy_template
script:
- ./script/apps/mongo/deployer/mongo-app-deploy-cstor
mongo-cstor-run/load/check 1:2:
extends: .app_deploy_template
before_script:
- sleep 180
script:
- ./script/apps/mongo/workload/cstor/mongo-app-workload-cstor
# NUODB-CSTOR
#nuodb-cstor-run/load:
# extends: .app_deploy_template
# script:
# - ./script/apps/nuodb/deployer/nuodb-app-deploy-cstor
# CASSANDRA_CSTOR
cassandra-cstor-run/load/check 0:2:
extends: .app_deploy_template
script:
- ./script/apps/cassandra/deployer/cassandra-app-deploy-cstor
# JENKINS_CSTOR
jenkins-cstor-run/load/check:
extends: .app_deploy_template
script:
- ./script/apps/jenkins/deployer/jenkins-app-deploy-cstor
## Define job template for func test jobs
.func_test_template:
image: atulabhi/kops:v8
stage: APP-FUNC-TEST
when: always
artifacts:
paths:
- aws-openebs/
app-replica-scale-{cassandra-jiva}:
extends: .func_test_template #dependencies: cassandra-jiva
script:
- ./script/apps/cassandra/functional/jiva/app-sts-replica-scale
app-upgrade-deployment-{jenkins-jiva}:
extends: .func_test_template #dependencies: jenkins-jiva
script:
- ./script/apps/jenkins/functional/jiva/app-upgrade-deployment
k8s-snapshot-clone-creation-{snapshot-clone-jiva}:
extends: .func_test_template
script:
- ./script/apps/percona/functional/jiva/k8s-snapshot-clone
# K8s-snapshot/clone test on cStor volume
cstor-k8s-snapshot-clone-creation-{snapshot-clone-cStor}:
extends: .func_test_template
script:
- ./script/apps/percona/functional/cstor/k8s-snapshot-clone-cstor
volume-data-integrity-{fio-jiva}:
extends: .func_test_template
script:
- ./script/apps/fio/tests/jiva/fio-volume-data-integrity-check
volume-data-integrity-{fio-cstor}:
extends: .func_test_template
script:
- ./script/apps/fio/tests/cstor/fio-volume-data-integrity-check
volume-memory-consumption-{memcheck-jiva}:
extends: .func_test_template
script:
- ./script/apps/memleak/tests/jiva/memory-consumption
volume-memory-consumption-{memcheck-cstor}:
extends: .func_test_template
script:
- ./script/apps/prometheus/functional/cstor/memcheck/memory-consumption
app-replica-scale-{cassandra-cstor}:
extends: .func_test_template #dependencies: cassandra-cstor
script:
- ./script/apps/cassandra/functional/cstor/app-sts-replica-scale
app-upgrade-deployment-{jenkins-cstor}:
extends: .func_test_template #dependencies: jenkins-cstor
script:
- ./script/apps/jenkins/functional/cstor/app-upgrade-deployment
Snapshot-rebuild-single-replica-{percona-cstor}:
extends: .func_test_template
script:
- ./script/apps/percona/functional/cstor/snapshot-rebuild-single-rep
Snapshot-rebuild-multiple-replica-{percona-cstor}:
extends: .func_test_template
script:
- ./script/apps/percona/functional/cstor/snapshot-rebuild-multiple-rep
## Define job template for chaos jobs
.chaos_test_template:
image: atulabhi/kops:v8
stage: APP-CHAOS-TEST
when: always
artifacts:
paths:
- aws-openebs/
app-kill-{mongo-jiva-xfs}:
extends: .chaos_test_template #dependencies: mongo-jiva
script:
- ./script/apps/mongo/chaos/jiva/application-pod-failure
app-kill-{jenkins-cstor}:
extends: .chaos_test_template #dependencies: jenkins-cstor
script:
- ./script/apps/jenkins/chaos/cstor/application-pod-failure
repl-kill-{percona-jiva}:
extends: .chaos_test_template #dependencies: percona-jiva
script:
- ./script/apps/percona/chaos/jiva/volume-replica-failure
## Single replica failure
single-repl-kill-{percona-jiva}:
extends: .chaos_test_template #dependencies: percona-jiva-single-replica
script:
- ./script/apps/percona/chaos/jiva/single-replica-failure
ctrl-kill-{mongo-jiva}:
extends: .chaos_test_template #dependencies: mongo-jiva
script:
- ./script/apps/mongo/chaos/jiva/volume-controller-failure
repl-disconnect-{jenkins-jiva}:
extends: .chaos_test_template #dependencies: jenkins-jiva
script:
- ./script/apps/jenkins/chaos/jiva/volume-replica-network-delay
ctrl-disconnect-{postgres-jiva}:
extends: .chaos_test_template #dependencies: postgres-jiva
script:
- ./script/apps/postgres/chaos/jiva/volume-controller-network-delay
tgt-kill-{percona-cstor}:
extends: .chaos_test_template #dependencies: percona-cstor
script:
- ./script/apps/percona/chaos/cstor/volume-target-failure
tgt-disconnect-{mongo-cstor}:
extends: .chaos_test_template #dependencies: mongo-cstor
script:
- ./script/apps/mongo/chaos/cstor/volume-target-network-delay
## Define a job template for app deprovision
.app_deprovision_template:
image: atulabhi/kops:v8
stage: APP-DEPROVISION
when: always
artifacts:
paths:
- aws-openebs/
## PERCONA-JIVA
percona-jiva-deprovision:
extends: .app_deprovision_template
script:
- ./script/apps/percona/deprovision/percona-app-deprovision-jiva
## PROMETHEUS-CSTOR
prometheus-cstor-deprovision:
extends: .app_deprovision_template
script:
- ./script/apps/prometheus/deprovision/prometheus-app-deprovision-cstor
## MONGODB-JIVA
mongodb-jiva-deprovision:
extends: .app_deprovision_template
script:
- ./script/apps/mongo/deprovision/mongo-app-deprovision-jiva
## POSTGRES-JIVA
postgres-jiva-deprovision:
extends: .app_deprovision_template
script:
- ./script/apps/postgres/deprovision/postgres-app-deprovision-jiva
## JENKINS-JIVA
jenkins-jiva-deprovision:
extends: .app_deprovision_template
script:
- ./script/apps/jenkins/deprovision/jenkins-app-deprovision-jiva
## CASSANDRA-JIVA
cassandra-jiva-deprovision:
extends: .app_deprovision_template
script:
- ./script/apps/cassandra/deprovision/cassandra-app-deprovision-jiva
cleanup-aws:
when: always
image: atulabhi/kops:v8
dependencies:
- aws-cluster
stage: CLUSTER-CLEANUP
script:
- chmod 755 ./script/aws-cleanup
- ./script/aws-cleanup