-
Notifications
You must be signed in to change notification settings - Fork 28
/
kubo-deployment.yml
1766 lines (1698 loc) · 54.9 KB
/
kubo-deployment.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
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<%
envs = %w(vsphere-lb vsphere-proxy)
additional_envs = %w()
env_list = envs + additional_envs
enable_failure_alert = true
upgrade_test_envs = %w(vsphere-proxy)
multi_az_envs = %w(vsphere-lb)
multi_master_upgrade_test_envs = %w(vsphere-lb)
conformance_test_envs = envs - %w(vsphere-proxy)
proxy_envs = %w(vsphere-proxy)
bbr_test_envs = %w(vsphere-lb)
%>
---
groups:
- name: all
jobs:
<% conformance_test_envs.each do |env| %>
- run-k8s-conformance-tests-<%= env %>
<% end %>
<% env_list.each do |env| %>
- claim-lock-<%= env %>
- install-bosh-<%= env %>
- deploy-k8s-<%= env %>
- run-k8s-integration-tests-<%= env %>
- run-k8s-turbulence-tests-<%= env %>
- destroy-k8s-<%= env %>
- destroy-bosh-<%= env %>
<% end %>
<% bbr_test_envs.each do |env| %>
- claim-lock-bbr-<%= env %>
- install-bosh-bbr-<%= env %>
- deploy-k8s-bbr-<%= env %>
- run-k8s-bbr-tests-<%= env %>
- destroy-k8s-bbr-<%= env %>
- destroy-bosh-bbr-<%= env %>
<% end %>
<% upgrade_test_envs.each do |env| %>
- claim-lock-upgrade-<%= env %>
- install-bosh-for-upgrade-<%= env %>
- deploy-old-k8s-<%= env %>
- upgrade-kubo-<%= env %>
- destroy-k8s-upgrade-<%= env %>
- destroy-bosh-upgrade-<%= env %>
<% end %>
<% multi_master_upgrade_test_envs.each do |env| %>
- claim-lock-upgrade-multi-master-<%= env %>
- install-bosh-multi-master-<%= env %>
- deploy-old-k8s-multi-master-<%= env %>
- upgrade-kubo-multi-master-<%= env %>
- destroy-k8s-upgrade-multi-master-<%= env %>
- destroy-bosh-upgrade-multi-master-<%= env %>
<% end %>
- upload-kubo-deployment
- upload-kubo-release
<% env_list.each do |env| %>
- name: <%= env %>
jobs:
- claim-lock-<%= env %>
- install-bosh-<%= env %>
- deploy-k8s-<%= env %>
- run-k8s-integration-tests-<%= env %>
<% if bbr_test_envs.include? env %>
- claim-lock-bbr-<%= env %>
- install-bosh-bbr-<%= env %>
- deploy-k8s-bbr-<%= env %>
- run-k8s-bbr-tests-<%= env %>
- destroy-k8s-bbr-<%= env %>
- destroy-bosh-bbr-<%= env %>
<% end %>
<% if conformance_test_envs.include? env %>
- run-k8s-conformance-tests-<%= env %>
<% end %>
- run-k8s-turbulence-tests-<%= env %>
- destroy-k8s-<%= env %>
- destroy-bosh-<%= env %>
<% if upgrade_test_envs.include? env %>
- claim-lock-upgrade-<%= env %>
- install-bosh-for-upgrade-<%= env %>
- deploy-old-k8s-<%= env %>
- upgrade-kubo-<%= env %>
- destroy-k8s-upgrade-<%= env %>
- destroy-bosh-upgrade-<%= env %>
<% end %>
<% if multi_master_upgrade_test_envs.include? env %>
- claim-lock-upgrade-multi-master-<%= env %>
- install-bosh-multi-master-<%= env %>
- deploy-old-k8s-multi-master-<%= env %>
- upgrade-kubo-multi-master-<%= env %>
- destroy-k8s-upgrade-multi-master-<%= env %>
- destroy-bosh-upgrade-multi-master-<%= env %>
<% end %>
<% end %>
- name: integration
jobs:
<% env_list.each do |env| %>
- run-k8s-integration-tests-<%= env %>
<% end %>
- name: conformance
jobs:
<% conformance_test_envs.each do |env| %>
- run-k8s-conformance-tests-<%= env %>
<% end %>
- name: turbulence
jobs:
<% env_list.each do |env| %>
- run-k8s-turbulence-tests-<%= env %>
<% end %>
- name: upgrade
jobs:
<% upgrade_test_envs.each do |env| %>
- claim-lock-upgrade-<%= env %>
- install-bosh-for-upgrade-<%= env %>
- deploy-old-k8s-<%= env %>
- upgrade-kubo-<%= env %>
- destroy-k8s-upgrade-<%= env %>
- destroy-bosh-upgrade-<%= env %>
<% end %>
<% multi_master_upgrade_test_envs.each do |env| %>
- claim-lock-upgrade-multi-master-<%= env %>
- install-bosh-multi-master-<%= env %>
- deploy-old-k8s-multi-master-<%= env %>
- upgrade-kubo-multi-master-<%= env %>
- destroy-k8s-upgrade-multi-master-<%= env %>
- destroy-bosh-upgrade-multi-master-<%= env %>
<% end %>
- name: bbr
jobs:
<% bbr_test_envs.each do |env| %>
- claim-lock-bbr-<%= env %>
- install-bosh-bbr-<%= env %>
- deploy-k8s-bbr-<%= env %>
- run-k8s-bbr-tests-<%= env %>
- destroy-k8s-bbr-<%= env %>
- destroy-bosh-bbr-<%= env %>
<% end %>
resource_types:
- name: gcs
type: docker-image
source:
repository: frodenas/gcs-resource
- name: slack-notification
type: docker-image
source:
repository: cfcommunity/slack-notification-resource
tag: latest
- name: bosh-deployment
type: docker-image
source:
repository: cloudfoundry/bosh-deployment-resource
- name: bosh-errand
type: docker-image
source:
repository: pcfkubo/bosh2-errand-resource
tag: v0.1.3-dev
resources:
- name: git-kubo-ci
type: git
source:
uri: [email protected]:cloudfoundry-incubator/kubo-ci
branch: master
private_key: ((git-ssh-key.private_key))
- name: git-kubo-deployment
type: git
source:
uri: [email protected]:cloudfoundry-incubator/kubo-deployment.git
branch: develop
private_key: ((git-ssh-key.private_key))
ignore_paths:
- 'LICENSE'
- 'NOTICE'
- name: git-kubo-release
type: git
source:
uri: [email protected]:cloudfoundry-incubator/kubo-release.git
branch: develop
private_key: ((git-ssh-key.private_key))
ignore_paths:
- '*.md'
- 'LICENSE'
- 'NOTICE'
- name: git-kubo-drats
type: git
source:
uri: [email protected]:cloudfoundry-incubator/kubo-disaster-recovery-acceptance-tests.git
branch: master
private_key: ((git-ssh-key.private_key))
- name: github-etcd-release
type: github-release
source:
owner: cloudfoundry-incubator
repository: cfcr-etcd-release
access_token: ((github-kubo-gitbot-access-token))
tag_filter: "v(.*)"
- name: git-bosh-deployment
type: git
source:
uri: [email protected]:cloudfoundry/bosh-deployment.git
branch: master
private_key: ((git-ssh-key.private_key))
- name: slackers
type: git
source:
uri: [email protected]:cloudfoundry-incubator/cfcr-home.git
private_key: ((git-ssh-key.private_key))
paths:
- 'slackers'
- name: slack-alert
type: slack-notification
source:
url: ((build-alert-slack-url))
- name: source-json
type: gcs
source:
json_key: ((gcs-json-key))
bucket: kubo-pipeline-store
versioned_file: source.json
- name: gcs-load-balancer-vars
type: gcs
source:
json_key: ((gcs-json-key))
bucket: kubo-pipeline-store
versioned_file: load-balancer-vars.yml
- name: tinyproxy-deployment
type: bosh-deployment
source:
deployment: tinyproxy
skip_check: true
- name: cfcr-deployment
type: bosh-deployment
source:
deployment: ci-service
skip_check: true
- name: run-apply-addons-errand
type: bosh-errand
source:
deployment: ci-service
skip_check: true
- name: run-smoke-tests-errand
type: bosh-errand
source:
deployment: ci-service
skip_check: true
<% env_list.each do |env| %>
- name: kubo-lock-<%= env %>
type: pool
source:
uri: [email protected]:pivotal-cf-experimental/kubo-locks.git
branch: master
private_key: ((git-ssh-key.private_key))
pool: kubo-<%= env %>
<% end %>
- name: gcs-bosh-state
type: gcs
source:
json_key: ((gcs-json-key))
bucket: kubo-pipeline-store
versioned_file: bosh/state.json
- name: gcs-bosh-creds
type: gcs
source:
json_key: ((gcs-json-key))
bucket: kubo-pipeline-store
versioned_file: bosh/creds.yml
- name: gcs-kubeconfig
type: gcs
source:
json_key: ((gcs-json-key))
bucket: kubo-pipeline-store
versioned_file: k8s/config
- name: gcs-kubo-release-tarball-untested
type: gcs
source:
json_key: ((gcs-json-key))
bucket: kubo-pipeline-store
regexp: dev-builds/kubo-(\d+\.\d+\.\d+(-dev\.\d+)*).*\.tgz
- name: gcs-kubo-deployment-tarball-untested
type: gcs
source:
json_key: ((gcs-json-key))
bucket: kubo-pipeline-store
regexp: dev-builds/kubo-deployment-(.*).tgz
- name: gcs-kubo-releases
type: gcs
source:
json_key: ((gcs-json-key))
bucket: kubo-releases
regexp: kubo-release-(.*).tgz
- name: gcs-kubo-deployments
type: gcs
source:
json_key: ((gcs-json-key))
bucket: kubo-releases
regexp: kubo-deployment-(.*).tgz
- name: gcs-kubo-release-tarball
type: gcs
source:
json_key: ((gcs-json-key))
bucket: kubo-public
versioned_file: kubo-release-latest.tgz
- name: gcs-kubo-deployment-tarball
type: gcs
source:
json_key: ((gcs-json-key))
bucket: kubo-public
versioned_file: kubo-deployment-latest.tgz
- name: old-kubo-release-tarball
type: github-release
source:
owner: cloudfoundry-incubator
repository: kubo-release
pre_release: true
access_token: ((github-kubo-gitbot-access-token))
- name: old-kubo-deployment-tarball
type: github-release
source:
owner: cloudfoundry-incubator
repository: kubo-deployment
pre_release: true
access_token: ((github-kubo-gitbot-access-token))
- name: kubo-version
type: semver
source:
driver: gcs
key: versions/kubo-version
json_key: ((gcs-json-key))
bucket: kubo-pipeline-store
- name: bbr-cli
type: github-release
source:
owner: cloudfoundry-incubator
repository: bosh-backup-and-restore
access_token: ((github-kubo-gitbot-access-token))
jobs:
<% env_list.each do |env| %>
- name: claim-lock-<%= env %>
max_in_flight: 1
plan:
- aggregate:
- get: kubo-version
trigger: true
- get: git-kubo-release
- get: git-kubo-deployment
- get: gcs-kubo-release-tarball-untested
- get: gcs-kubo-deployment-tarball-untested
- put: kubo-lock-<%= env %>
params: { acquire: true }
- name: install-bosh-<%= env %>
plan:
- aggregate:
- get: slackers
- get: git-kubo-ci
- get: git-bosh-deployment
- get: git-kubo-deployment
passed: [ 'claim-lock-<%= env %>' ]
- get: kubo-lock
resource: kubo-lock-<%= env %>
version: every
trigger: true
passed: [ 'claim-lock-<%= env %>' ]
- get: gcs-kubo-release-tarball-untested
passed: [ 'claim-lock-<%= env %>' ]
- get: git-kubo-release
passed: [ 'claim-lock-<%= env %>' ]
- get: kubo-version
passed: [ 'claim-lock-<%= env %>' ]
- get: gcs-kubo-deployment-tarball-untested
passed: [ 'claim-lock-<%= env %>' ]
- task: install
tags: [<%= env %>]
file: git-kubo-ci/tasks/install-bosh.yml
params:
USE_TURBULENCE: 1
<% if env =~ /^(gcp|vsphere-lb)/ %>
CLOUD_CONFIG_OPS_FILE: <%= env %>-k8s-cloud-config-multiaz.yml
<% elsif env.include? 'aws-lb' %>
CLOUD_CONFIG_OPS_FILE: aws-k8s-cloud-config-multiaz.yml
<% end %>
on_failure: &on_failure_alert
do:
- task: configure-slack-notification
file: git-kubo-ci/tasks/configure-slack-notification.yml
- put: slack-alert
params:
attachments_file: slack-notification/attachments
text: |
Build Failed. https://ci.kubo.sh/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
- aggregate:
- put: gcs-bosh-creds
attempts: 10
params:
file: bosh-creds/creds.yml
- put: gcs-bosh-state
attempts: 10
params:
file: bosh-state/state.json
- task: configure-bosh-for-turbulence
tags: ['<%= env %>']
file: git-kubo-ci/tasks/configure-bosh.yml
- task: generate-load-balancer-vars
file: git-kubo-ci/tasks/generate-load-balancer-vars.yml
- task: generate-source-json
file: git-kubo-ci/tasks/generate-source-json.yml
- aggregate:
- put: gcs-load-balancer-vars
attempts: 10
params:
file: load-balancer-vars/vars.yml
- put: source-json
attempts: 10
params:
file: source-json/source.json
- task: update-cloud-config-with-vm-ext
tags: ['<%= env %>']
file: git-kubo-ci/tasks/update-cloud-config-with-vm-ext.yml
- name: deploy-k8s-<%= env %>
plan:
- aggregate:
- get: slackers
- get: git-kubo-ci
- get: kubo-lock
resource: kubo-lock-<%= env %>
version: every
trigger: true
passed: [ 'install-bosh-<%= env %>' ]
- get: git-kubo-deployment
passed: [ 'install-bosh-<%= env %>' ]
- get: git-kubo-release
passed: [ 'install-bosh-<%= env %>' ]
- get: kubo-version
passed: [ 'install-bosh-<%= env %>' ]
- get: gcs-bosh-state
passed: [ 'install-bosh-<%= env %>' ]
- get: gcs-bosh-creds
passed: [ 'install-bosh-<%= env %>' ]
- get: gcs-kubo-release-tarball-untested
passed: [ 'install-bosh-<%= env %>' ]
- get: gcs-kubo-deployment-tarball-untested
passed: [ 'install-bosh-<%= env %>' ]
- get: source-json
passed: [ 'install-bosh-<%= env %>' ]
- get: gcs-load-balancer-vars
passed: [ 'install-bosh-<%= env %>' ]
<% if env =~ /^vsphere/ %>
- task: get_director_uuid
tags: ['<%= env %>']
file: git-kubo-ci/tasks/get_director_uuid.yml
<% end %>
<% if env =~ /^vsphere-proxy/ %>
- task: update-cloud-config-with-master-static-ips
file: git-kubo-ci/tasks/update-cloud-config.yml
tags: ['<%= env %>']
params:
OPS: -o git-kubo-ci/manifests/ops-files/add-master-static-ips-cloud-config.yml --vars-file=kubo-lock/metadata
- task: update-cloud-config-for-proxy
file: git-kubo-ci/tasks/update-cloud-config.yml
tags: ['<%= env %>']
params:
OPS: -o git-kubo-ci/manifests/ops-files/vsphere-proxy-cloud-config.yml --vars-file=kubo-lock/metadata
<% end %>
- task: upload-stemcell
tags: ['<%= env %>']
file: git-kubo-ci/tasks/upload-stemcell.yml
params:
IAAS: <%= env.split('-')[0] %>
- put: cfcr-deployment
params:
manifest: git-kubo-deployment/manifests/cfcr.yml
cleanup: true
no_redact: true
ops_files:
- git-kubo-ci/manifests/ops-files/kubo-latest-version.yml
- git-kubo-deployment/manifests/ops-files/misc/bootstrap.yml
- git-kubo-deployment/manifests/ops-files/allow-privileged-containers.yml
- git-kubo-deployment/manifests/ops-files/addons-spec.yml
- git-kubo-deployment/manifests/ops-files/enable-bbr.yml
- git-kubo-deployment/manifests/ops-files/enable-nfs.yml
- git-kubo-ci/manifests/ops-files/add-hpa-properties.yml
- git-kubo-ci/manifests/ops-files/increase-logging-level.yml
<% if env =~ /^gcp/ %>
- git-kubo-deployment/manifests/ops-files/iaas/gcp/cloud-provider.yml
- git-kubo-deployment/manifests/ops-files/use-vm-extensions.yml
- git-kubo-deployment/manifests/ops-files/iaas/gcp/add-subnetwork-for-internal-load-balancer.yml
<% end %>
<% if env =~ /^aws/ %>
- git-kubo-deployment/manifests/ops-files/iaas/aws/cloud-provider.yml
- git-kubo-deployment/manifests/ops-files/use-vm-extensions.yml
- git-kubo-deployment/manifests/ops-files/iaas/aws/lb.yml
<% end %>
<% if env =~ /^openstack/ %>
- git-kubo-deployment/manifests/ops-files/iaas/openstack/cloud-provider.yml
- git-kubo-ci/manifests/ops-files/add-master-static-ips.yml
<% end %>
<% if env =~ /^vsphere/ %>
- git-kubo-deployment/manifests/ops-files/iaas/vsphere/cloud-provider.yml
- git-kubo-deployment/manifests/ops-files/iaas/vsphere/use-vm-extensions.yml
<% end %>
<% if !(env =~ /^(gcp|vsphere-lb|aws-lb)/) %>
- git-kubo-deployment/manifests/ops-files/misc/single-master.yml
- git-kubo-ci/manifests/ops-files/scale-to-one-az.yml
<% end %>
<% if env =~ /^vsphere-proxy/ %>
- git-kubo-deployment/manifests/ops-files/add-proxy.yml
- git-kubo-deployment/manifests/ops-files/use-persistent-disk-for-workers.yml
- git-kubo-ci/manifests/ops-files/add-master-static-ips.yml
<% end %>
var_files:
addons-spec: "git-kubo-ci/specs/guestbook.yml"
vars_files:
- gcs-load-balancer-vars/load-balancer-vars.yml
- kubo-lock/metadata
<% if env =~ /^vsphere/ %>
- director_uuid/var.yml
<% end %>
releases:
- gcs-kubo-release-tarball-untested/*.tgz
source_file: source-json/source.json
vars:
deployment_name: ci-service
worker_count: 3
tags: [<%= env %>]
on_failure: *on_failure_alert
- task: update-kubeconfig
tags: ['<%= env %>']
file: git-kubo-ci/tasks/update-kubeconfig.yml
- put: run-apply-addons-errand
params:
name: apply-addons
keep_alive: true
source_file: source-json/source.json
tags: [<%= env %>]
on_failure: *on_failure_alert
- put: run-smoke-tests-errand
params:
name: smoke-tests
keep_alive: true
source_file: source-json/source.json
tags: [<%= env %>]
on_failure: *on_failure_alert
<% if env =~ /^vsphere-proxy/ %>
- put: tinyproxy-deployment
tags: ['<%= env %>']
params:
manifest: git-kubo-ci/manifests/tinyproxy/manifest.yml
source_file: source-json/source.json
vars_files:
- kubo-lock/metadata
on_failure: *on_failure_alert
<% end %>
- put: gcs-kubeconfig
params:
file: kubeconfig/config
- name: run-k8s-integration-tests-<%= env %>
plan:
- aggregate:
- get: slackers
- get: git-kubo-ci
- get: kubo-lock-<%= env %>
version: every
trigger: true
passed: [ 'deploy-k8s-<%= env %>' ]
- get: git-kubo-deployment
passed: [ 'deploy-k8s-<%= env %>' ]
- get: gcs-bosh-state
passed: [ 'deploy-k8s-<%= env %>' ]
- get: gcs-bosh-creds
passed: [ 'deploy-k8s-<%= env %>' ]
- get: kubo-version
passed: [ 'deploy-k8s-<%= env %>' ]
- get: git-kubo-release
passed: [ 'deploy-k8s-<%= env %>' ]
- get: gcs-kubo-release-tarball-untested
passed: [ 'deploy-k8s-<%= env %>' ]
- get: gcs-kubo-deployment-tarball-untested
passed: [ 'deploy-k8s-<%= env %>' ]
- get: source-json
passed: [ 'deploy-k8s-<%= env %>' ]
- get: gcs-kubeconfig
passed: [ 'deploy-k8s-<%= env %>' ]
- task: integration-tests
tags: [<%= env %>]
file: git-kubo-ci/tasks/run-k8s-integration-tests.yml
input_mapping: {kubo-lock: kubo-lock-<%= env %>}
on_failure: *on_failure_alert
params:
DEPLOYMENT_NAME: ci-service
ENABLE_PERSISTENT_VOLUME_TESTS: true
<% if !(multi_az_envs.include?(env)) %>
ENABLE_MULTI_AZ_TESTS: false
<% end %>
<% if env =~ /^(vsphere|openstack)/ %>
ENABLE_K8S_LBS_TESTS: false
<% end %>
<% if conformance_test_envs.include?(env) %>
- name: run-k8s-conformance-tests-<%= env %>
plan:
- aggregate:
- get: slackers
- get: git-kubo-ci
- get: kubo-lock-<%= env %>
version: every
trigger: true
passed: [ 'deploy-k8s-<%= env %>' ]
- get: gcs-bosh-state
passed: [ 'deploy-k8s-<%= env %>' ]
- get: gcs-bosh-creds
passed: [ 'deploy-k8s-<%= env %>' ]
- get: source-json
passed: [ 'deploy-k8s-<%= env %>' ]
- get: gcs-kubo-release-tarball-untested
passed: [ 'deploy-k8s-<%= env %>' ]
- get: gcs-kubo-deployment-tarball-untested
passed: [ 'deploy-k8s-<%= env %>' ]
- get: git-kubo-deployment
passed: [ 'deploy-k8s-<%= env %>' ]
- get: git-kubo-release
passed: [ 'deploy-k8s-<%= env %>' ]
- get: kubo-version
passed: [ 'deploy-k8s-<%= env %>' ]
- get: gcs-kubeconfig
passed: [ 'deploy-k8s-<%= env %>' ]
- task: conformance-tests
file: git-kubo-ci/tasks/run-conformance-tests.yml
tags:
- <%= env %>
on_failure: *on_failure_alert
<% end %>
<%
turbulence_passed_reqs = ["run-k8s-integration-tests-#{env}"]
if conformance_test_envs.include? env
turbulence_passed_reqs << "run-k8s-conformance-tests-#{env}"
end
%>
- name: run-k8s-turbulence-tests-<%= env %>
plan:
- aggregate:
- get: slackers
- get: git-kubo-ci
- get: kubo-lock-<%= env %>
version: every
trigger: true
passed: <%= turbulence_passed_reqs %>
- get: gcs-bosh-state
passed: <%= turbulence_passed_reqs %>
- get: gcs-bosh-creds
passed: <%= turbulence_passed_reqs %>
- get: gcs-kubo-release-tarball-untested
passed: <%= turbulence_passed_reqs %>
- get: source-json
passed: <%= turbulence_passed_reqs %>
- get: gcs-kubo-deployment-tarball-untested
passed: <%= turbulence_passed_reqs %>
- get: git-kubo-deployment
passed: <%= turbulence_passed_reqs %>
- get: git-kubo-release
passed: <%= turbulence_passed_reqs %>
- get: kubo-version
passed: <%= turbulence_passed_reqs %>
- get: gcs-kubeconfig
passed: <%= turbulence_passed_reqs %>
- task: turbulence-tests
file: git-kubo-ci/tasks/run-k8s-turbulence-tests.yml
tags: ['<%= env %>']
input_mapping: {kubo-lock: kubo-lock-<%= env %>}
on_failure: *on_failure_alert
params:
IAAS: <%= env.split('-')[0] %>
ENABLE_TURBULENCE_WORKER_DRAIN_TESTS: true
ENABLE_TURBULENCE_WORKER_FAILURE_TESTS: true
ENABLE_TURBULENCE_MASTER_FAILURE_TESTS: true
<% if !(multi_az_envs.include?(env)) %>
ENABLE_MULTI_AZ_TESTS: false
<% end %>
<% if env != "openstack" %>
ENABLE_TURBULENCE_PERSISTENCE_FAILURE_TESTS: true
<% end %>
<%
destroy_k8s_passed_reqs = ["run-k8s-turbulence-tests-#{env}"]
%>
- name: destroy-k8s-<%= env %>
plan:
- aggregate:
- get: slackers
- get: git-kubo-ci
- get: kubo-lock-<%= env %>
version: every
trigger: true
passed: <%= destroy_k8s_passed_reqs %>
- get: kubo-version
passed: <%= destroy_k8s_passed_reqs %>
- get: git-kubo-deployment
passed: <%= destroy_k8s_passed_reqs %>
- get: git-kubo-release
passed: <%= destroy_k8s_passed_reqs %>
- get: gcs-bosh-state
passed: <%= destroy_k8s_passed_reqs %>
- get: gcs-bosh-creds
passed: <%= destroy_k8s_passed_reqs %>
- get: gcs-kubo-release-tarball-untested
passed: <%= destroy_k8s_passed_reqs %>
- get: source-json
passed: <%= destroy_k8s_passed_reqs %>
- get: gcs-kubo-deployment-tarball-untested
passed: <%= destroy_k8s_passed_reqs %>
- task: destroy-k8s
tags: [<%= env %>]
file: git-kubo-ci/tasks/destroy-k8s-instance.yml
input_mapping: {kubo-lock: kubo-lock-<%= env %>}
on_failure: *on_failure_alert
<% if env =~ /^vsphere-proxy/ %>
- task: destroy-tinyproxy
tags: [<%= env %>]
file: git-kubo-ci/tasks/destroy-tinyproxy.yml
input_mapping: {kubo-lock: kubo-lock-<%= env %>}
on_failure: *on_failure_alert
<% end %>
<%
destroy_bosh_passed_reqs = [ "destroy-k8s-#{env}" ]
%>
- name: destroy-bosh-<%= env %>
plan:
- aggregate:
- get: slackers
- get: git-kubo-ci
- get: git-bosh-deployment
- get: git-kubo-deployment
passed: <%= destroy_bosh_passed_reqs %>
- get: git-kubo-release
passed: <%= destroy_bosh_passed_reqs %>
- get: kubo-lock-<%= env %>
version: every
trigger: true
passed: <%= destroy_bosh_passed_reqs %>
- get: kubo-version
passed: <%= destroy_bosh_passed_reqs %>
- get: gcs-bosh-state
passed: <%= destroy_bosh_passed_reqs %>
- get: gcs-bosh-creds
passed: <%= destroy_bosh_passed_reqs %>
- get: gcs-kubo-release-tarball-untested
passed: <%= destroy_bosh_passed_reqs %>
- get: gcs-kubo-deployment-tarball-untested
passed: <%= destroy_bosh_passed_reqs %>
- task: destroy
tags: [<%= env %>]
file: git-kubo-ci/tasks/destroy-bosh.yml
input_mapping: {kubo-lock: kubo-lock-<%= env %>}
on_failure: *on_failure_alert
- put: kubo-lock-<%= env %>
params: { release: kubo-lock-<%= env %> }
<% end %>
<% upgrade_test_envs.each do |env| %>
- name: claim-lock-upgrade-<%= env %>
max_in_flight: 1
plan:
- aggregate:
- get: kubo-version
trigger: true
- get: git-kubo-release
- get: git-kubo-deployment
- get: gcs-kubo-release-tarball-untested
- get: gcs-kubo-deployment-tarball-untested
- put: kubo-lock
resource: kubo-lock-<%= env %>
params: { acquire: true }
- name: install-bosh-for-upgrade-<%= env %>
plan:
- aggregate:
- get: git-kubo-ci
- get: git-bosh-deployment
- get: kubo-lock
resource: kubo-lock-<%= env %>
version: every
trigger: true
passed: [ 'claim-lock-upgrade-<%= env %>' ]
- get: gcs-kubo-release-tarball-untested
passed: [ 'claim-lock-upgrade-<%= env %>' ]
- get: gcs-kubo-deployment-tarball-untested
passed: [ 'claim-lock-upgrade-<%= env %>' ]
- get: kubo-version
passed: [ 'claim-lock-upgrade-<%= env %>' ]
- get: git-kubo-release
passed: [ 'claim-lock-upgrade-<%= env %>' ]
- get: git-kubo-deployment
passed: [ 'claim-lock-upgrade-<%= env %>' ]
- task: install
tags: [<%= env %>]
file: git-kubo-ci/tasks/install-bosh.yml
params:
<% if env.include? 'openstack' %>
CLOUD_CONFIG_OPS_FILE: openstack-k8s-cloud-config.yml
<% elsif env =~ /^(gcp|vsphere-lb)/ %>
CLOUD_CONFIG_OPS_FILE: <%= env %>-k8s-cloud-config-multiaz.yml
<% elsif env.include? 'aws-lb' %>
CLOUD_CONFIG_OPS_FILE: aws-k8s-cloud-config-multiaz.yml
<% end %>
- aggregate:
- put: gcs-bosh-creds
attempts: 10
params:
file: bosh-creds/creds.yml
- put: gcs-bosh-state
attempts: 10
params:
file: bosh-state/state.json
- task: generate-load-balancer-vars
file: git-kubo-ci/tasks/generate-load-balancer-vars.yml
- task: generate-source-json
file: git-kubo-ci/tasks/generate-source-json.yml
- aggregate:
- put: gcs-load-balancer-vars
attempts: 10
params:
file: load-balancer-vars/vars.yml
- put: source-json
attempts: 10
params:
file: source-json/source.json
- task: update-cloud-config-with-vm-ext
tags: ['<%= env %>']
file: git-kubo-ci/tasks/update-cloud-config-with-vm-ext.yml
- name: deploy-old-k8s-<%= env %>
plan:
- aggregate:
- get: slackers
- get: git-kubo-ci
- get: old-kubo-deployment-tarball
- get: old-kubo-release-tarball
params:
globs:
- "kubo-release*"
- get: kubo-lock
resource: kubo-lock-<%= env %>
version: every
trigger: true
passed: [ 'install-bosh-for-upgrade-<%= env %>' ]
- get: git-kubo-deployment
passed: [ 'install-bosh-for-upgrade-<%= env %>' ]
- get: git-kubo-release
passed: [ 'install-bosh-for-upgrade-<%= env %>' ]
- get: kubo-version
passed: [ 'install-bosh-for-upgrade-<%= env %>' ]
- get: gcs-bosh-state
passed: [ 'install-bosh-for-upgrade-<%= env %>' ]
- get: gcs-bosh-creds
passed: [ 'install-bosh-for-upgrade-<%= env %>' ]
- get: gcs-kubo-release-tarball-untested
passed: [ 'install-bosh-for-upgrade-<%= env %>' ]
- get: gcs-kubo-deployment-tarball-untested
passed: [ 'install-bosh-for-upgrade-<%= env %>' ]
- get: source-json
passed: [ 'install-bosh-for-upgrade-<%= env %>' ]
- get: gcs-load-balancer-vars
passed: [ 'install-bosh-for-upgrade-<%= env %>' ]
- task: unpack-tgz
file: git-kubo-ci/tasks/unpack-tgz.yml
tags: ['<%= env %>']
input_mapping:
source_tarball: old-kubo-deployment-tarball
output_mapping:
unpacked_dir: unpacked-old-kubo-deployment
params:
SOURCE_TARBALL_REGEX: kubo-deployment-*.tgz
COLLAPSE_DIR: kubo-deployment-*
- task: upload-old-stemcell
tags: ['<%= env %>']
input_mapping:
git-kubo-deployment: unpacked-old-kubo-deployment
file: git-kubo-ci/tasks/upload-stemcell.yml
params:
IAAS: <%= env.split('-')[0] %>
<% if env =~ /^vsphere/ %>
- task: get_director_uuid
tags: ['<%= env %>']
file: git-kubo-ci/tasks/get_director_uuid.yml
<% end %>
<% if env =~ /^vsphere-proxy/ %>
- task: update-cloud-config-for-master-static-ips
file: git-kubo-ci/tasks/update-cloud-config.yml
tags: ['<%= env %>']
params:
OPS: -o git-kubo-ci/manifests/ops-files/add-master-static-ips-cloud-config.yml --vars-file=kubo-lock/metadata
- task: update-cloud-config-for-proxy-ip
file: git-kubo-ci/tasks/update-cloud-config.yml
tags: ['<%= env %>']
params:
OPS: -o git-kubo-ci/manifests/ops-files/vsphere-proxy-cloud-config.yml --vars-file=kubo-lock/metadata
<% end %>
- put: cfcr-deployment
params:
manifest: unpacked-old-kubo-deployment/manifests/cfcr.yml
cleanup: true
no_redact: true
ops_files:
- git-kubo-ci/manifests/ops-files/add-api-server-endpoint.yml
- unpacked-old-kubo-deployment/manifests/ops-files/vm-types.yml
- unpacked-old-kubo-deployment/manifests/ops-files/rename.yml
- unpacked-old-kubo-deployment/manifests/ops-files/use-persistent-disk-for-workers.yml
<% if env =~ /^gcp/ %>
- unpacked-old-kubo-deployment/manifests/ops-files/iaas/gcp/cloud-provider.yml
- git-kubo-deployment/manifests/ops-files/use-vm-extensions.yml
<% end %>
<% if env =~ /^aws/ %>
- unpacked-old-kubo-deployment/manifests/ops-files/iaas/aws/cloud-provider.yml
- unpacked-old-kubo-deployment/manifests/ops-files/iaas/aws/lb.yml
- git-kubo-deployment/manifests/ops-files/use-vm-extensions.yml
<% end %>
<% if env =~ /^openstack/ %>
- unpacked-old-kubo-deployment/manifests/ops-files/iaas/openstack/cloud-provider.yml
<% end %>
<% if env =~ /^vsphere/ %>
- unpacked-old-kubo-deployment/manifests/ops-files/iaas/vsphere/cloud-provider.yml
- git-kubo-deployment/manifests/ops-files/iaas/vsphere/use-vm-extensions.yml
<% end %>
- unpacked-old-kubo-deployment/manifests/ops-files/misc/single-master.yml
- git-kubo-ci/manifests/ops-files/scale-to-one-az.yml
<% if env =~ /^vsphere-proxy/ %>
- unpacked-old-kubo-deployment/manifests/ops-files/add-proxy.yml
- git-kubo-ci/manifests/ops-files/add-master-static-ips.yml
<% end %>
var_files:
addons-spec: "git-kubo-ci/specs/guestbook.yml"
vars_files:
- gcs-load-balancer-vars/load-balancer-vars.yml
- kubo-lock/metadata
<% if env =~ /^vsphere/ %>
- director_uuid/var.yml
<% end %>
releases:
- old-kubo-release-tarball/*.tgz
source_file: source-json/source.json
vars:
deployment_name: ci-service
master_vm_type: master
worker_vm_type: worker
apply_addons_vm_type: minimal
disk_size: 10120
tags: [<%= env %>]
on_failure: *on_failure_alert
- task: update-kubeconfig
tags: ['<%= env %>']
file: git-kubo-ci/tasks/update-kubeconfig.yml
- put: run-apply-addons-errand
params:
name: apply-addons
keep_alive: true
source_file: source-json/source.json
tags: [<%= env %>]
on_failure: *on_failure_alert
- put: run-smoke-tests-errand
params:
name: smoke-tests
keep_alive: true
source_file: source-json/source.json