forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
spring-cloud-cloud-native-migration.yml
1414 lines (1408 loc) · 47.6 KB
/
spring-cloud-cloud-native-migration.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
ROSTemplateFormatVersion: '2015-09-01'
Description:
en: This template uses resources such as ECS instances and ACK managed clusters
to build the Spring Cloud architecture based on an existing VPC, vSwitch, and
security group. This allows you to migrate Spring Cloud architecture and applications
to Alibaba Cloud in a convenient manner.
zh-cn: 在已有虚拟专有网络、交换机和安全组基础资源上,使用ECS和ACK托管版等资源搭建Spring Cloud的架构参考示例,方便用户在阿里云上部署和迁移Spring
Cloud应用。
Conditions:
NoStandbyEureka:
Fn::Equals:
- Ref: StandbyEurekaInstanceTypes
- default
NoStandbyGateway:
Fn::Equals:
- Ref: StandbyGatewayInstanceTypes
- default
NoStandbyK8s:
Fn::Equals:
- Ref: StandbyK8sInstanceTypes
- default
Parameters:
VpcId:
Type: String
Label:
en: Existing VPC Instance ID
zh-cn: 现有VPC的实例ID
Description:
en: Please search the ID starting with (vpc-xxx)from console-Virtual Private
Cloud
zh-cn: 控制台-VPC-专有网络下查询
AssociationProperty: ALIYUN::ECS::VPC::VPCId
SecurityGroupId:
Type: String
Label:
en: Business Security Group ID
zh-cn: 业务安全组ID
Description:
en: Please search the business security group ID starting with(sg-xxx)from console-ECS-Network
& Security
zh-cn: 现有业务安全组的实例ID,控制台-ECS-网络与安全-安全组下查询
AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
AssociationPropertyMetadata:
VpcId: VpcId
VSwitchIds:
Type: String
Label:
en: VSwitch IDs
zh-cn: 网络交换机ID
Description:
en: 'Instance ID of existing service network switch, query under console -VPC
-proprietary network -switch; Multiple switches are separated by English commas
(,).<br><font color=''blue''><b>Note: By default, resources will be created
under each switch, including: Eureka/Gateway Server, SLB(For Eureka), Container
Worker Node</b></font><br>Fill in at least 2, fill in a maximum of 3, and
recommend filling in 3 exchange IDs for different Availability Zones.<br>Example:
vsw-xxxxxxxx,vsw-xxxxxxxx,vsw-xxxxxxxx'
zh-cn: 现有业务网络交换机的实例ID,控制台-VPC-专有网络-交换机下查询;多个交换机使用英文逗号(,)分割。<br><font color='blue'><b>注:默认会在每个交换机下创建资源,资源包含:
Eureka/Gateway Server、SLB(用于Eureka)、容器Worker Node</b></font><br>至少填写2个, 最大填写3个,建议填写3个不同可用区的交换ID。<br>示例:
vsw-xxxxxxxx,vsw-xxxxxxxx,vsw-xxxxxxxx
Port:
Type: Number
Label:
en: Service Port
zh-cn: 服务端口
Description:
en: Spring Cloud service port, Please use the port number in the range 1024-65535.
zh-cn: Spring Cloud服务端口,请使用1024-65535范围内端口号。
Default: 8081
MinValue: 1024
MaxValue: 65535
InstanceImageId:
Type: String
Label:
en: Image ID
zh-cn: 镜像ID
Description:
en: 'Image ID,See detail:<b><a href=''https://www.alibabacloud.com/help/doc-detail/112977.html''
target=''_blank''><font color=''blue''>Find the mirror</font></a></b><br><font
color=''blue''><b>Note: Use CentOS to install Aliyun-CLI, JDK and other dependencies
on the server by default; CentOS images are recommended.</font></b>'
zh-cn: 镜像ID, 详见:<b><a href='https://help.aliyun.com/document_detail/112977.html'
target='_blank'><font color='blue'>查找镜像</font></a></b><br><font color='blue'><b>注:
使用CentOS默认在服务器上安装Aliyun-CLI、JDK等相关依赖; 推荐使用CentOS镜像。</font></b>
AssociationProperty: ALIYUN::ECS::Instance::ImageId
Default: centos_7_06_64_20G_alibase_20190711.vhd
InstancePassword:
Type: String
Label:
en: Instance Password
zh-cn: 实例密码
Description:
en: Server login password, Length 8-30, must contain three(Capital letters,
lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol
in)
zh-cn: 服务器登录密码,长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ 中的特殊符号)
ConstraintDescription:
en: Length 8-30, must contain three(Capital letters, lowercase letters, numbers,
()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in).
zh-cn: 长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ 中的特殊符号)。
AllowedPattern: '[0-9A-Za-z\_\-\&:;''<>,=%`~!@#\(\)\$\^\*\+\|\{\}\[\]\.\?\/]+$'
MinLength: 8
MaxLength: 30
NoEcho: true
EurekaSlbSpec:
Type: String
Label:
en: Eureka SLB Specification
zh-cn: Eureka SLB规格
Description:
en: Instance specifications, see detail:</b><a href='https://www.alibabacloud.com/help/doc-detail/85939.html'
target='_blank'><b><font color='blue'>Performance Support Type</b></font></a>
zh-cn: 实例规格,详见:</b><a href='https://help.aliyun.com/document_detail/85939.html'
target='_blank'><b><font color='blue'>性能保障型</b></font></a>
AllowedValues:
- slb.s1.small
- slb.s2.small
- slb.s2.medium
- slb.s3.small
- slb.s3.medium
- slb.s3.large
EurekaInstanceType:
Type: String
Label:
en: Instance Main Type
zh-cn: 实例主规格
Description:
en: <font color='blue'><b>1.Before selecting the model please confirm that the
current available zone under the model is in stock, some models need to be
reported in advance</b></font>]<br><font color='blue'><b>2.List of Recommended
Models</font><br></b></font>[ecs.c5.large <font color='green'>2vCPU 4GiB Intranet
bandwidth1Gbps In-grid sending and receiving packages30MillionPPSS</font>]<br></b>[ecs.c5.xlarge
<font color='green'>4vCPU 8GiB Intranet bandwidth1.5Gbps In-grid sending and
receiving packages50MillionPPS</font>]<br></b>[ecs.c5.2xlarge <font color='green'>8vCPU
16GiB Intranet bandwidth2.5Gbps In-grid sending and receiving packages80MillionPPS</font>]
zh-cn: <font color='blue'><b>1.选择机型前请先确认当前可用区下该机型是否有货,部分机型需要提前报备</b></font><br><font
color='blue'><b>2.推荐机型列表</font><br></b></font>[ecs.c5.large <font color='green'>2vCPU
4GiB 内网带宽1Gbps 内网收发包30万PPS</font>]<br></b>[ecs.c5.xlarge <font color='green'>4vCPU
8GiB 内网带宽1.5Gbps 内网收发包50万PPS</font>]<br></b>[ecs.c5.2xlarge <font color='green'>8vCPU
16GiB 内网带宽2.5Gbps 内网收发包80万PPS</font>]
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
StandbyEurekaInstanceTypes:
Type: String
Label:
en: Instance Alternate Type
zh-cn: 实例备用规格
Description:
en: 'Server spare specifications;Multiple specifications are split using an
English comma (,).<br><font color=''blue''><b>Note: Server specifications
take precedence over the main specifications, and alternate specifications
are lowered in order of elements</b></font><br>The default default indicates
that there are no alternate specifications and a maximum of 9 are filled in.<br>Example:
ecs.c6.large,ecs.g6e.large,ecs.g6.large'
zh-cn: 服务器备用规格;多个规格使用英文逗号(,)分割。<br><font color='blue'><b>注:服务器规格优先使用主规格,备用规格优先级按元素的顺序依次降低</b></font><br>默认default表示没有备用规格,最大填写9个。<br>示例:
ecs.c6.large,ecs.g6e.large,ecs.g6.large
Default: default
EurekaDiskCategory:
Type: String
Label:
en: Disk Type
zh-cn: 磁盘类型
Description:
en: '<font color=''blue''><b>Optional values:</b></font><br>[cloud_efficiency:
<font color=''green''>Efficient Cloud Disk</font>]<br>[cloud_ssd: <font color=''green''>SSD
Cloud Disk</font>]<br>[cloud_essd: <font color=''green''>ESSD Cloud Disk</font>]<br>[cloud:
<font color=''green''>Cloud Disk</font>]<br>[ephemeral_ssd: <font color=''green''>Local
SSD Cloud Disk</font>]'
zh-cn: '<font color=''blue''><b>可选值:</b></font><br>[cloud_efficiency: <font
color=''green''>高效云盘</font>]<br>[cloud_ssd: <font color=''green''>SSD云盘</font>]<br>[cloud_essd:
<font color=''green''>ESSD云盘</font>]<br>[cloud: <font color=''green''>普通云盘</font>]<br>[ephemeral_ssd:
<font color=''green''>本地SSD盘</font>]'
Default: cloud_efficiency
AllowedValues:
- cloud_efficiency
- cloud_ssd
- cloud
- cloud_essd
- ephemeral_ssd
EurekaSystemDiskSize:
Type: Number
Label:
en: System Disk Space
zh-cn: 系统盘空间
Description:
en: System disk space of Eureka
zh-cn: Eureka 系统盘空间
Default: 40
MinValue: 40
MaxValue: 2048
GatewaySlbSpec:
Type: String
Label:
en: Gateway SLB Specification
zh-cn: Gateway SLB规格
Description:
en: Instance specifications, see detail:</b><a href='https://www.alibabacloud.com/help/doc-detail/85939.html'
target='_blank'><b><font color='blue'>Performance Support Type</b></font></a>
zh-cn: 实例规格,详见:</b><a href='https://help.aliyun.com/document_detail/85939.html'
target='_blank'><b><font color='blue'>性能保障型</b></font></a>
AllowedValues:
- slb.s1.small
- slb.s2.small
- slb.s2.medium
- slb.s3.small
- slb.s3.medium
- slb.s3.large
GatewayInstanceType:
Type: String
Label:
en: Instance Type
zh-cn: 实例规格
Description:
en: <font color='blue'><b>1.Before selecting the model please confirm that the
current available zone under the model is in stock, some models need to be
reported in advance</b></font>]<br><font color='blue'><b>2.List of Recommended
Models</font><br></b></font>[ecs.c5.large <font color='green'>2vCPU 4GiB Intranet
bandwidth1Gbps In-grid sending and receiving packages30MillionPPSS</font>]<br></b>[ecs.c5.xlarge
<font color='green'>4vCPU 8GiB Intranet bandwidth1.5Gbps In-grid sending and
receiving packages50MillionPPS</font>]<br></b>[ecs.c5.2xlarge <font color='green'>8vCPU
16GiB Intranet bandwidth2.5Gbps In-grid sending and receiving packages80MillionPPS</font>]
zh-cn: <font color='blue'><b>1.选择机型前请先确认当前可用区下该机型是否有货,部分机型需要提前报备</b></font><br><font
color='blue'><b>2.推荐机型列表</font><br></b></font>[ecs.c5.large <font color='green'>2vCPU
4GiB 内网带宽1Gbps 内网收发包30万PPS</font>]<br></b>[ecs.c5.xlarge <font color='green'>4vCPU
8GiB 内网带宽1.5Gbps 内网收发包50万PPS</font>]<br></b>[ecs.c5.2xlarge <font color='green'>8vCPU
16GiB 内网带宽2.5Gbps 内网收发包80万PPS</font>]
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
StandbyGatewayInstanceTypes:
Type: String
Label:
en: Instance Alternate Type
zh-cn: 实例备用规格
Description:
en: 'Server spare specifications;Multiple specifications are split using an
English comma (,).<br><font color=''blue''><b>Note: Server specifications
take precedence over the main specifications, and alternate specifications
are lowered in order of elements</b></font><br>The default default indicates
that there are no alternate specifications and a maximum of 9 are filled in.<br>Example:
ecs.c6.large,ecs.g6e.large,ecs.g6.large'
zh-cn: 服务器备用规格;多个规格使用英文逗号(,)分割。<br><font color='blue'><b>注:服务器规格优先使用主规格,备用规格优先级按元素的顺序依次降低</b></font><br>默认default表示没有备用规格,最大填写9个。<br>示例:
ecs.c6.large,ecs.g6e.large,ecs.g6.large
Default: default
GatewayDiskCategory:
Type: String
Label:
en: Disk Type
zh-cn: 磁盘类型
Description:
en: '<font color=''blue''><b>Optional values:</b></font><br>[cloud_efficiency:
<font color=''green''>Efficient Cloud Disk</font>]<br>[cloud_ssd: <font color=''green''>SSD
Cloud Disk</font>]<br>[cloud_essd: <font color=''green''>ESSD Cloud Disk</font>]<br>[cloud:
<font color=''green''>Cloud Disk</font>]<br>[ephemeral_ssd: <font color=''green''>Local
SSD Cloud Disk</font>]'
zh-cn: '<font color=''blue''><b>可选值:</b></font><br>[cloud_efficiency: <font
color=''green''>高效云盘</font>]<br>[cloud_ssd: <font color=''green''>SSD云盘</font>]<br>[cloud_essd:
<font color=''green''>ESSD云盘</font>]<br>[cloud: <font color=''green''>普通云盘</font>]<br>[ephemeral_ssd:
<font color=''green''>本地SSD盘</font>]'
Default: cloud_efficiency
AllowedValues:
- cloud_efficiency
- cloud_ssd
- cloud
- cloud_essd
- ephemeral_ssd
GatewaySystemDiskSize:
Type: Number
Label:
en: System Disk Space
zh-cn: 系统盘空间
Description:
en: System disk space of Gateway
zh-cn: Gateway 节点系统盘空间
Default: 40
MinValue: 40
MaxValue: 2048
K8sVersion:
Type: String
Label:
en: Kubernetes Version
zh-cn: Kubernetes 版本
Description:
en: Kubernetes version
zh-cn: Kubernetes 版本
Default: 1.18.8-aliyun.1
AllowedValues:
- 1.18.8-aliyun.1
- 1.16.9-aliyun.1
K8sInstanceType:
Type: String
Label:
en: Instance Type
zh-cn: 实例规格
Description:
en: <font color='blue'><b>1.Before selecting the model please confirm that the
current available zone under the model is in stock, some models need to be
reported in advance</b></font>]<br><font color='blue'><b>2.List of Recommended
Models</font><br></b></font>[ecs.c5.large <font color='green'>2vCPU 4GiB Intranet
bandwidth1Gbps In-grid sending and receiving packages30MillionPPSS</font>]<br></b>[ecs.c5.xlarge
<font color='green'>4vCPU 8GiB Intranet bandwidth1.5Gbps In-grid sending and
receiving packages50MillionPPS</font>]<br></b>[ecs.c5.2xlarge <font color='green'>8vCPU
16GiB Intranet bandwidth2.5Gbps In-grid sending and receiving packages80MillionPPS</font>]
zh-cn: <font color='blue'><b>1.选择机型前请先确认当前可用区下该机型是否有货,部分机型需要提前报备</b></font><br><font
color='blue'><b>2.推荐机型列表</font><br></b></font>[ecs.c5.large <font color='green'>2vCPU
4GiB 内网带宽1Gbps 内网收发包30万PPS</font>]<br></b>[ecs.c5.xlarge <font color='green'>4vCPU
8GiB 内网带宽1.5Gbps 内网收发包50万PPS</font>]<br></b>[ecs.c5.2xlarge <font color='green'>8vCPU
16GiB 内网带宽2.5Gbps 内网收发包80万PPS</font>]
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
StandbyK8sInstanceTypes:
Type: String
Label:
en: Instance Alternate Type
zh-cn: 实例备用规格
Description:
en: 'Server spare specifications;Multiple specifications are split using an
English comma (,).<br><font color=''blue''><b>Note: Server specifications
take precedence over the main specifications, and alternate specifications
are lowered in order of elements</b></font><br>The default default indicates
that there are no alternate specifications and a maximum of 9 are filled in.<br>Example:
ecs.c6.large,ecs.g6e.large,ecs.g6.large'
zh-cn: 服务器备用规格;多个规格使用英文逗号(,)分割。<br><font color='blue'><b>注:服务器规格优先使用主规格,备用规格优先级按元素的顺序依次降低</b></font><br>默认default表示没有备用规格,最大填写9个。<br>示例:
ecs.c6.large,ecs.g6e.large,ecs.g6.large
Default: default
K8sContainerCidr:
Type: String
Label:
en: Pod CIDR network
zh-cn: Pod网络CIDR
Description:
en: 'Please fill in a valid private segment, i.e. the following segments and
their subnets: 10.0.0.0/8, 172.16-31.0.0/12-16, 192.168.0.0/16<br> cannot
be associated with the VPC network Segments used by Kubernetes clusters in
segment 10.0.0.0/8 and VPC are duplicated and cannot be modified after successful
creation<br>Cluster network planning See: <b><a href=''https://www.alibabacloud.com/help/doc-detail/86500.html''
target=''_blank''><font color=''blue''>Network address segment planning for
Kubernetes under VPC.</font></a></b><br>In the current configuration, up to
1024 hosts can be deployed within the cluster.'
zh-cn: 请填写有效的私有网段,即以下网段及其子网:10.0.0.0/8,172.16-31.0.0/12-16,192.168.0.0/16<br>不能与
VPC 网段 10.0.0.0/8 及 VPC 内已有 Kubernetes 集群使用的网段重复,创建成功后不能修改。<br>集群网络规划请参见:<b><a
href='https://help.aliyun.com/document_detail/86500.html' target='_blank'><font
color='blue'>VPC下 Kubernetes 的网络地址段规划</font></a></b><br>当前配置下,集群内最多可允许部署 1024
台主机。
Default: 172.20.0.0/16
K8sServiceCidr:
Type: String
Label:
en: Service CIDR
zh-cn: Service CIDR
Description:
en: 'Optional scope: 10.0.0.0/16-24, 172.16-31.0.0/16-24, 192.168.0.0/16-24
<br>with VPC network segment 10.0.0.0/8 and VPC Kubernetes cluster using segment
repeat, already in the created cannot be modified after the success.'
zh-cn: 可选范围:10.0.0.0/16-24,172.16-31.0.0/16-24,192.168.0.0/16-24<br>不能与 VPC
网段 10.0.0.0/8 及 VPC 内已有 Kubernetes 集群使用的网段重复,创建成功后不能修改。
Default: 172.21.0.0/20
K8sDiskCategory:
Type: String
Label:
en: Disk Type
zh-cn: 磁盘类型
Description:
en: '<font color=''blue''><b>Optional values:</b></font><br>[cloud_efficiency:
<font color=''green''>Efficient Cloud Disk</font>]<br>[cloud_ssd: <font color=''green''>SSD
Cloud Disk</font>]<br>[cloud_essd: <font color=''green''>ESSD Cloud Disk</font>]<br>[cloud:
<font color=''green''>Cloud Disk</font>]<br>[ephemeral_ssd: <font color=''green''>Local
SSD Cloud Disk</font>]'
zh-cn: '<font color=''blue''><b>可选值:</b></font><br>[cloud_efficiency: <font
color=''green''>高效云盘</font>]<br>[cloud_ssd: <font color=''green''>SSD云盘</font>]<br>[cloud_essd:
<font color=''green''>ESSD云盘</font>]<br>[cloud: <font color=''green''>普通云盘</font>]<br>[ephemeral_ssd:
<font color=''green''>本地SSD盘</font>]'
Default: cloud_efficiency
AllowedValues:
- cloud_efficiency
- cloud_ssd
- cloud
- cloud_essd
- ephemeral_ssd
K8sWorkerSystemDiskSize:
Type: Number
Label:
en: System Disk Space
zh-cn: 系统盘空间
Description:
en: System disk space of worker node
zh-cn: Worker 节点系统盘空间
Default: 120
MinValue: 40
MaxValue: 2048
Resources:
CsManagedKubernetesCluster:
Type: ALIYUN::CS::ManagedKubernetesCluster
Properties:
VpcId:
Ref: VpcId
VSwitchIds:
Fn::Split:
- ','
- Ref: VSwitchIds
SecurityGroupId:
Ref: SecurityGroupId
Addons:
- Name: flannel
CloudMonitorFlags: true
ContainerCidr:
Ref: K8sContainerCidr
DisableRollback: false
EndpointPublicAccess: true
KubernetesVersion:
Ref: K8sVersion
LoginPassword:
Ref: InstancePassword
Name:
Fn::Join:
- ''
- - Spring-Cloud-
- Ref: ALIYUN::StackId
NumOfNodes:
Fn::Length:
Fn::Split:
- ','
- Ref: VSwitchIds
ServiceCidr:
Ref: K8sServiceCidr
SnatEntry: true
WorkerInstanceTypes:
Fn::If:
- NoStandbyK8s
- - Ref: K8sInstanceType
- Fn::ListMerge:
- - Ref: K8sInstanceType
- Fn::Split:
- ','
- Ref: StandbyK8sInstanceTypes
WorkerSystemDiskCategory:
Ref: K8sDiskCategory
WorkerSystemDiskSize:
Ref: K8sWorkerSystemDiskSize
Metadata:
ALIYUN::ROS::Designer:
id: d0ce96a7-4d41-452a-8ddb-6b02466440ec
SlbLoadBalancerApiGateway:
Type: ALIYUN::SLB::LoadBalancer
Properties:
VpcId:
Ref: VpcId
VSwitchId:
Fn::Select:
- 0
- Fn::Split:
- ','
- Ref: VSwitchIds
AddressType: intranet
InternetChargeType: paybytraffic
LoadBalancerName: SLB-ApiGateway
LoadBalancerSpec:
Ref: GatewaySlbSpec
Metadata:
ALIYUN::ROS::Designer:
id: beed6980-655a-4e5e-9687-899d05c5d2be
SlbListenerApiGateway:
Type: ALIYUN::SLB::Listener
Properties:
BackendServerPort:
Ref: Port
Bandwidth: -1
HealthCheck:
HealthyThreshold: 3
Interval: 2
Port:
Ref: Port
Timeout: 5
UnhealthyThreshold: 10
ListenerPort:
Ref: Port
LoadBalancerId:
Ref: SlbLoadBalancerApiGateway
Protocol: tcp
Scheduler: wlc
DependsOn:
- SlbLoadBalancerApiGateway
Metadata:
ALIYUN::ROS::Designer:
id: 04956232-6aa8-4798-bb87-feab8ad316b3
EssScalingGroupApiGateway:
Type: ALIYUN::ESS::ScalingGroup
Properties:
VSwitchIds:
Fn::Split:
- ','
- Ref: VSwitchIds
DefaultCooldown: 300
LoadBalancerIds:
- Ref: SlbLoadBalancerApiGateway
MaxSize: 10
MinSize:
Fn::Length:
Fn::Split:
- ','
- Ref: VSwitchIds
MultiAZPolicy: BALANCE
ProtectedInstances: []
RemovalPolicys:
- NewestInstance
ScalingGroupName:
Fn::Join:
- ''
- - Spring-Cloud-ApiGateway-
- Ref: ALIYUN::StackId
DependsOn:
- SlbListenerApiGateway
Metadata:
ALIYUN::ROS::Designer:
id: 2693506f-e390-4f0e-8cf1-707b5063f98a
RamRole:
Type: ALIYUN::RAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Action: sts:AssumeRole
Effect: Allow
Principal:
Service:
- ecs.aliyuncs.com
Version: '1'
Policies:
- PolicyDocument:
Statement:
- Action:
- ecs:*
Effect: Allow
Resource:
- '*'
- Action:
- vpc:DescribeVpcs
- vpc:DescribeVSwitches
Effect: Allow
Resource:
- '*'
- Action:
- ess:CompleteLifecycleAction
Effect: Allow
Resource:
- '*'
- Action:
- oos:Get*
- oos:List*
Effect: Allow
Resource:
- '*'
- Action:
- oss:Get*
- oss:List*
Effect: Allow
Resource:
- '*'
- Action:
- kms:Get*
- kms:List*
Effect: Allow
Resource:
- '*'
Version: '1'
PolicyName:
Fn::Join:
- ''
- - Spring-Cloud-
- Ref: ALIYUN::StackId
RoleName:
Fn::Join:
- ''
- - Spring-Cloud-
- Ref: ALIYUN::StackId
Metadata:
ALIYUN::ROS::Designer:
id: 7e6f4cbc-e3ac-4590-b445-90dede3aea08
EssScalingGroupConfigurationApiGateway:
Type: ALIYUN::ESS::ScalingConfiguration
Properties:
SecurityGroupId:
Ref: SecurityGroupId
ImageId:
Ref: InstanceImageId
InstanceName:
Fn::Join:
- ''
- - Gateway-
- Ref: ALIYUN::StackId
InstanceTypes:
Fn::If:
- NoStandbyGateway
- - Ref: GatewayInstanceType
- Fn::ListMerge:
- - Ref: GatewayInstanceType
- Fn::Split:
- ','
- Ref: StandbyGatewayInstanceTypes
InternetMaxBandwidthOut: 100
IoOptimized: optimized
RamRoleName:
Ref: RamRole
ScalingConfigurationName:
Fn::Join:
- ''
- - Spring-Cloud-ApiGateway-
- Ref: ALIYUN::StackId
ScalingGroupId:
Ref: EssScalingGroupApiGateway
SystemDiskCategory:
Ref: GatewayDiskCategory
SystemDiskSize:
Ref: GatewaySystemDiskSize
UserData:
Fn::Join:
- ''
- - "#!/bin/bash \n"
- " \n"
- INSTANCE_PASSWORD=
- Ref: InstancePassword
- '
'
- "echo root:${INSTANCE_PASSWORD} | chpasswd \n"
- "sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' \"\
/etc/ssh/sshd_config\" \n"
- "service sshd restart \n"
- "yum update -y \n"
- "yum install -y java-1.8.0-openjdk jq \n"
- "mkdir /opt/spring_cloud \n"
- "mkdir /var/log/spring_cloud \n"
- " \n"
- "wget https://aliyuncli.alicdn.com/aliyun-cli-linux-3.0.65-amd64.tgz \n"
- "tar xzvf aliyun-cli-linux-3.0.65-amd64.tgz \n"
- "sudo cp aliyun /usr/local/bin \n"
- ROLE_NAME=
- Fn::GetAtt:
- RamRole
- RoleName
- " \n"
- REGION_ID=
- Ref: ALIYUN::Region
- " \n"
- "/usr/local/bin/aliyun configure set --profile ecsRamRoleProfile --mode\
\ EcsRamRole --ram-role-name ${ROLE_NAME} --region ${REGION_ID} \n"
- "mkdir -p /root/.aliyun \n"
- 'cat>/root/.aliyun/config.json <<EOF
'
- "{ \n"
- " \"current\": \"ecsRamRoleProfile\", \n"
- " \"profiles\": [ \n"
- " { \n"
- " \"name\": \"default\", \n"
- " \"mode\": \"AK\", \n"
- " \"access_key_id\": \"\", \n"
- " \"access_key_secret\": \"\", \n"
- " \"sts_token\": \"\", \n"
- " \"ram_role_name\": \"\", \n"
- " \"ram_role_arn\": \"\", \n"
- " \"ram_session_name\": \"\", \n"
- " \"private_key\": \"\", \n"
- " \"key_pair_name\": \"\", \n"
- " \"expired_seconds\": 0, \n"
- " \"verified\": \"\", \n"
- " \"region_id\": \"\", \n"
- " \"output_format\": \"json\", \n"
- " \"language\": \"en\", \n"
- " \"site\": \"\", \n"
- " \"retry_timeout\": 0, \n"
- " \"connect_timeout\": 0, \n"
- " \"retry_count\": 0, \n"
- " \"process_command\": \"\" \n"
- " }, \n"
- " { \n"
- " \"name\": \"ecsRamRoleProfile\", \n"
- " \"mode\": \"EcsRamRole\", \n"
- " \"access_key_id\": \"\", \n"
- " \"access_key_secret\": \"\", \n"
- " \"sts_token\": \"\", \n"
- " \"ram_role_name\": \"${ROLE_NAME}\", \n"
- " \"ram_role_arn\": \"\", \n"
- " \"ram_session_name\": \"\", \n"
- " \"private_key\": \"\", \n"
- " \"key_pair_name\": \"\", \n"
- " \"expired_seconds\": 0, \n"
- " \"verified\": \"\", \n"
- " \"region_id\": \"${REGION_ID}\", \n"
- " \"output_format\": \"json\", \n"
- " \"language\": \"en\", \n"
- " \"site\": \"china\", \n"
- " \"retry_timeout\": 0, \n"
- " \"connect_timeout\": 0, \n"
- " \"retry_count\": 0, \n"
- " \"process_command\": \"\" \n"
- " } \n"
- " ], \n"
- " \"meta_path\": \"\" \n"
- "} \n"
- 'EOF
'
- export eureka_server_port=
- Ref: Port
- " \n"
- eureka_slb_ips=(
- Fn::Join:
- ' '
- Fn::GetAtt:
- VpcEIPsEurekaSlb
- EipAddress
- ") \n"
- "count=0 \n"
- "for ip in ${eureka_slb_ips[@]};do \n"
- " export \"eureka_server_${count}=${ip}\" \n"
- " let count+=1 \n"
- "done \n"
DependsOn:
- EssScalingGroupApiGateway
- RamRole
Metadata:
ALIYUN::ROS::Designer:
id: 9866eda3-9169-433c-a862-4278b3a4ffc5
SlbLoadBalancersEureka:
Type: ALIYUN::SLB::LoadBalancer
Properties:
VpcId:
Ref: VpcId
VSwitchId:
Fn::Select:
- Ref: ALIYUN::Index
- Fn::Split:
- ','
- Ref: VSwitchIds
AddressType: intranet
InternetChargeType: paybytraffic
LoadBalancerName:
Fn::Join:
- ''
- - SLB-Eureka-
- Ref: ALIYUN::Index
LoadBalancerSpec:
Ref: EurekaSlbSpec
Metadata:
ALIYUN::ROS::Designer:
id: a356b2ce-b942-4737-950b-3a6e023e3648
Count:
Fn::Length:
Fn::Split:
- ','
- Ref: VSwitchIds
SlbListenersEureka:
Type: ALIYUN::SLB::Listener
Properties:
BackendServerPort:
Ref: Port
Bandwidth: -1
HealthCheck:
HealthyThreshold: 3
Interval: 2
Port:
Ref: Port
Timeout: 5
UnhealthyThreshold: 10
ListenerPort:
Ref: Port
LoadBalancerId:
Fn::Select:
- Ref: ALIYUN::Index
- Ref: SlbLoadBalancersEureka
Protocol: tcp
Scheduler: wlc
DependsOn:
- SlbLoadBalancersEureka
Metadata:
ALIYUN::ROS::Designer:
id: 4d490768-e145-4e3b-8129-6ffee65d2ffd
Count:
Fn::Length:
Fn::Split:
- ','
- Ref: VSwitchIds
EssScalingGroupEureka:
Type: ALIYUN::ESS::ScalingGroup
Properties:
VSwitchIds:
Fn::Split:
- ','
- Ref: VSwitchIds
DefaultCooldown: 300
LoadBalancerIds:
Ref: SlbLoadBalancersEureka
MaxSize: 12
MinSize:
Fn::Length:
Fn::Split:
- ','
- Ref: VSwitchIds
MultiAZPolicy: BALANCE
ProtectedInstances: []
RemovalPolicys:
- NewestInstance
ScalingGroupName:
Fn::Join:
- ''
- - Spring-Cloud-Eureka-
- Ref: ALIYUN::StackId
DependsOn:
- SlbListenersEureka
Metadata:
ALIYUN::ROS::Designer:
id: 58da9547-bfde-40fb-8edf-4db0ffc99061
EssScalingGroupConfigurationEureka:
Type: ALIYUN::ESS::ScalingConfiguration
Properties:
SecurityGroupId:
Ref: SecurityGroupId
ImageId:
Ref: InstanceImageId
InstanceName:
Fn::Join:
- ''
- - Eureka-
- Ref: ALIYUN::StackId
InstanceTypes:
Fn::If:
- NoStandbyEureka
- - Ref: EurekaInstanceType
- Fn::ListMerge:
- - Ref: EurekaInstanceType
- Fn::Split:
- ','
- Ref: StandbyEurekaInstanceTypes
InternetMaxBandwidthOut: 100
IoOptimized: optimized
RamRoleName:
Ref: RamRole
ScalingGroupId:
Ref: EssScalingGroupEureka
SystemDiskCategory:
Ref: EurekaDiskCategory
SystemDiskSize:
Ref: EurekaSystemDiskSize
UserData:
Fn::Join:
- ''
- - "#!/bin/bash \n"
- " \n"
- INSTANCE_PASSWORD=
- Ref: InstancePassword
- '
'
- "echo root:${INSTANCE_PASSWORD} | chpasswd \n"
- "sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' \"\
/etc/ssh/sshd_config\" \n"
- "service sshd restart \n"
- "yum update -y \n"
- "yum install -y java-1.8.0-openjdk jq \n"
- "mkdir /opt/spring_cloud \n"
- "mkdir /var/log/spring_cloud \n"
- " \n"
- "wget https://aliyuncli.alicdn.com/aliyun-cli-linux-3.0.65-amd64.tgz \n"
- "tar xzvf aliyun-cli-linux-3.0.65-amd64.tgz \n"
- "sudo cp aliyun /usr/local/bin \n"
- ROLE_NAME=
- Fn::GetAtt:
- RamRole
- RoleName
- " \n"
- REGION_ID=
- Ref: ALIYUN::Region
- " \n"
- "/usr/local/bin/aliyun configure set --profile ecsRamRoleProfile --mode\
\ EcsRamRole --ram-role-name ${ROLE_NAME} --region ${REGION_ID} \n"
- "mkdir -p /root/.aliyun \n"
- 'cat>/root/.aliyun/config.json <<EOF
'
- "{ \n"
- " \"current\": \"ecsRamRoleProfile\", \n"
- " \"profiles\": [ \n"
- " { \n"
- " \"name\": \"default\", \n"
- " \"mode\": \"AK\", \n"
- " \"access_key_id\": \"\", \n"
- " \"access_key_secret\": \"\", \n"
- " \"sts_token\": \"\", \n"
- " \"ram_role_name\": \"\", \n"
- " \"ram_role_arn\": \"\", \n"
- " \"ram_session_name\": \"\", \n"
- " \"private_key\": \"\", \n"
- " \"key_pair_name\": \"\", \n"
- " \"expired_seconds\": 0, \n"
- " \"verified\": \"\", \n"
- " \"region_id\": \"\", \n"
- " \"output_format\": \"json\", \n"
- " \"language\": \"en\", \n"
- " \"site\": \"\", \n"
- " \"retry_timeout\": 0, \n"
- " \"connect_timeout\": 0, \n"
- " \"retry_count\": 0, \n"
- " \"process_command\": \"\" \n"
- " }, \n"
- " { \n"
- " \"name\": \"ecsRamRoleProfile\", \n"
- " \"mode\": \"EcsRamRole\", \n"
- " \"access_key_id\": \"\", \n"
- " \"access_key_secret\": \"\", \n"
- " \"sts_token\": \"\", \n"
- " \"ram_role_name\": \"${ROLE_NAME}\", \n"
- " \"ram_role_arn\": \"\", \n"
- " \"ram_session_name\": \"\", \n"
- " \"private_key\": \"\", \n"
- " \"key_pair_name\": \"\", \n"
- " \"expired_seconds\": 0, \n"
- " \"verified\": \"\", \n"
- " \"region_id\": \"${REGION_ID}\", \n"
- " \"output_format\": \"json\", \n"
- " \"language\": \"en\", \n"
- " \"site\": \"china\", \n"
- " \"retry_timeout\": 0, \n"
- " \"connect_timeout\": 0, \n"
- " \"retry_count\": 0, \n"
- " \"process_command\": \"\" \n"
- " } \n"
- " ], \n"
- " \"meta_path\": \"\" \n"
- "} \n"
- 'EOF
'
- export eureka_server_port=
- Ref: Port
- " \n"
- eureka_slb_ips=(
- Fn::Join:
- ' '
- Fn::GetAtt:
- VpcEIPsEurekaSlb
- EipAddress
- ") \n"
- "count=0 \n"
- "for ip in ${eureka_slb_ips[@]};do \n"
- " export \"eureka_server_${count}=${ip}\" \n"
- " let count+=1 \n"
- "done \n"
DependsOn:
- EssScalingGroupEureka
- RamRole
Metadata:
ALIYUN::ROS::Designer:
id: 35d23969-5933-4241-934e-d0926d2359ba
EssScalingGroupEnable:
Type: ALIYUN::ESS::ScalingGroupEnable
Properties:
ScalingConfigurationId:
Ref: EssScalingGroupConfigurationEureka
ScalingGroupId:
Ref: EssScalingGroupEureka
DependsOn:
- EssScalingGroupConfigurationEureka
Metadata:
ALIYUN::ROS::Designer:
id: c27aecbc-af58-4789-ae88-96fb3e606b21
EssScalingGroupEnableApiGateway:
Type: ALIYUN::ESS::ScalingGroupEnable
Properties:
ScalingConfigurationId:
Ref: EssScalingGroupConfigurationApiGateway
ScalingGroupId:
Ref: EssScalingGroupApiGateway
DependsOn:
- EssScalingGroupConfigurationApiGateway
Metadata:
ALIYUN::ROS::Designer:
id: a89a2ffa-6a62-4d45-99aa-accf0a428dde
OosParameterEurekaUrlPort:
Type: ALIYUN::OOS::Parameter
Properties:
Name:
Fn::Join:
- ''
- - /Spring/Eureka/
- Ref: ALIYUN::StackId
- /port
Type: String
Value:
Fn::Str:
Ref: Port
Metadata:
ALIYUN::ROS::Designer:
id: 9f0c5224-0ee8-4a5d-b183-d11b5aebf14e
VpcEIPsEurekaSlb:
Type: ALIYUN::VPC::EIP
Properties:
Bandwidth: 5
InternetChargeType: PayByTraffic
Name:
Fn::Join:
- ''
- - EIP-SLB-Eureka-
- Ref: ALIYUN::Index
Metadata: