forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecs-kubernetes-cluster.yml
1020 lines (988 loc) · 27.8 KB
/
ecs-kubernetes-cluster.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:
zh-cn: 使用ROS模版创建ECS Kubernetes集群,含2个EIP,分别用于Master SSH与6443端口,及ECS外网访问,自动配置网络与安全设置。
en: Use the ROS template to create an ECS Kubernetes cluster, including 2 EIPs, which are used for Master SSH and 6443 ports respectively, as well as ECS external network access, and automatically configure network and security settings.
Parameters:
VpcCidrBlock:
Type: String
Label:
en: VPC CIDR Block
zh-cn: VPC 网段
Description:
en: 'you can use the following IP address ranges and their subnets: <br><font color=''green''>[10.0.0.0/8]</font><br><font color=''green''>[172.16.0.0/12]</font><br><font color=''green''>[192.168.0.0/16]</font>'
zh-cn: 您可以使用以下IP地址范围及其子网:<br><font color='green'>[10.0.0.0/8]</font><br><font color='green'>[172.16.0.0/12]</font><br><font color='green'>[192.168.0/16]</font>
Default: 192.168.0.0/16
ZoneId:
Type: String
Label:
en: The Resource Availability Zone
zh-cn: 资源可用区
Description:
en: The available zone in which the resource is located
zh-cn: 资源所在的可用区域。
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
VSwitchCidrBlock:
Type: String
Label:
en: VSwitch CIDR Block
zh-cn: VSwitch 网段
Description:
en: VSwitch CIDR Block, Must be a subnet segment of the VPC
zh-cn: VSwitch 网段,须是VPC的子网段
Default: 192.168.1.0/24
MasterInstanceType:
Type: String
Label:
en: Instance Type
zh-cn: 实例规格
Description:
en: It is recommended to use the configuration 4vCPU 8GiB or above, low configuration may result in unsuccessful cluster creation<br><font color='blue'><b>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>
zh-cn: 建议使用配置4vCPU 8GiB或以上的规格,配置过低可能会导致集群创建不成功<br><font color='blue'><b>选择机型前请先确认交换机可用区下该机型是否有货,部分机型需要提前报备</b></font>
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
AssociationPropertyMetadata:
ZoneId: ZoneId
MasterSystemDiskCategory:
Type: String
Label:
en: System Disk Type
zh-cn: 系统盘类型
AssociationProperty: ALIYUN::ECS::Disk::SystemDiskCategory
AssociationPropertyMetadata:
LocaleKey: DiskCategory
InstanceType: ${MasterInstanceType}
MasterSystemDiskSize:
Type: Number
Label:
en: System Disk Size
zh-cn: 系统盘空间
Description:
en: System disk size, range 40-2048 GiB
zh-cn: 系统盘大小,范围40-2048 GiB。
Default: 40
MinValue: 40
MaxValue: 2048
NumOfNodes:
Type: Number
Label:
en: Worker Node Count
zh-cn: Worker节点数量
Description:
en: 'Worker node count, Range: 2-10.'
zh-cn: 'Worker 节点数量, 范围: 2-10。'
Default: 2
MinValue: 1
MaxValue: 10
WorkerInstanceType:
Type: String
Label:
en: Instance Type
zh-cn: 实例规格
Description:
en: Worker node instance specifications<br> before selecting the specification, please confirm whether the model is in stock under the switch availability area, and some models need to be reported in advance .
zh-cn: Worker节点实例规格<br>选择规格前请先确认交换机可用区下该机型是否有货,部分机型需要提前报备
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
AssociationPropertyMetadata:
ZoneId: ZoneId
WorkerSystemDiskCategory:
Type: String
Label:
en: System 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>]'
AssociationProperty: ALIYUN::ECS::Disk::SystemDiskCategory
AssociationPropertyMetadata:
LocaleKey: DiskCategory
InstanceType: ${WorkerInstanceType}
WorkerSystemDiskSize:
Type: Number
Label:
en: System Disk Size
zh-cn: 系统盘空间
Description:
en: System disk size, range 40-2048 GiB
zh-cn: 系统盘大小,范围40-2048 GiB。
Default: 40
MinValue: 40
MaxValue: 2048
EcsPassword:
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
ImageId:
Type: String
Default: centos_7
ResourceNamePrefix:
Type: String
Label:
en: The Resource Name Prefix
zh-cn: 资源名称前缀
Description:
en: The resource name prefix, Contains case letters, numbers.
zh-cn: 资源名称前缀,包含大小写字母、数字。
Default: k8s
MinLength: 1
MaxLength: 5
Resources:
NetworkStack:
Type: ALIYUN::ROS::Stack
Properties:
Parameters:
ResourceNamePrefix:
Ref: ResourceNamePrefix
VSwitchCidrBlock:
Ref: VSwitchCidrBlock
VpcCidrBlock:
Ref: VpcCidrBlock
ZoneId:
Ref: ZoneId
TemplateBody:
Outputs:
SecurityGroupId:
Value:
Fn::GetAtt:
- SecurityGroup
- SecurityGroupId
VSwitchCidrBlock:
Value:
Fn::GetAtt:
- VSwitch
- CidrBlock
VSwitchId:
Value:
Fn::GetAtt:
- VSwitch
- VSwitchId
VSwitchIpv6CidrBlock:
Value:
Fn::GetAtt:
- VSwitch
- Ipv6CidrBlock
VpcId:
Value:
Fn::GetAtt:
- Vpc
- VpcId
VpcRouteTableId:
Value:
Fn::GetAtt:
- Vpc
- RouteTableId
VpcRouterId:
Value:
Fn::GetAtt:
- Vpc
- VRouterId
Parameters:
ResourceNamePrefix:
Default: test
Type: String
VSwitchCidrBlock:
Default: 192.168.0.0/16
Type: String
VpcCidrBlock:
Default: 192.168.0.0/16
Type: String
ZoneId:
Type: String
ROSTemplateFormatVersion: '2015-09-01'
Resources:
SecurityGroup:
Properties:
SecurityGroupEgress:
- DestCidrIp: 0.0.0.0/0
IpProtocol: all
NicType: intranet
PortRange: '-1/-1'
Priority: 1
SecurityGroupIngress:
- IpProtocol: all
NicType: intranet
PortRange: '-1/-1'
Priority: 1
SourceCidrIp: 0.0.0.0/0
SecurityGroupName:
Fn::Join:
- '-'
- - Ref: ResourceNamePrefix
- sg
VpcId:
Ref: Vpc
Type: ALIYUN::ECS::SecurityGroup
VSwitch:
Properties:
CidrBlock:
Ref: VSwitchCidrBlock
VSwitchName:
Fn::Join:
- '-'
- - Ref: ResourceNamePrefix
- vswitch
VpcId:
Ref: Vpc
ZoneId:
Ref: ZoneId
Type: ALIYUN::ECS::VSwitch
Vpc:
Properties:
CidrBlock:
Ref: VpcCidrBlock
VpcName:
Fn::Join:
- '-'
- - Ref: ResourceNamePrefix
- vpc
Type: ALIYUN::ECS::VPC
TimeoutMins: 60
Metadata:
ALIYUN::ROS::Designer:
id: ca8270fb-5466-406c-9d46-a0abe8f5cac3
RosWaitConditionHandleMaster:
Type: ALIYUN::ROS::WaitConditionHandle
Properties: {}
Metadata:
ALIYUN::ROS::Designer:
id: 1cc19ee8-5c85-43c0-b2fb-e3f1ffb03c0c
RosWaitConditionMaster:
Type: ALIYUN::ROS::WaitCondition
Properties:
Count: 1
Handle:
Ref: RosWaitConditionHandleMaster
Timeout: 900
Metadata:
ALIYUN::ROS::Designer:
id: 4b555ee3-1784-4556-816f-49ffdefa21e7
EcsInstanceGroupNodes:
Type: ALIYUN::ECS::InstanceGroup
Properties:
VpcId:
Fn::GetAtt:
- NetworkStack
- Outputs.VpcId
VSwitchId:
Fn::GetAtt:
- NetworkStack
- Outputs.VSwitchId
SecurityGroupId:
Fn::GetAtt:
- NetworkStack
- Outputs.SecurityGroupId
ImageId:
Ref: ImageId
AllocatePublicIP: false
InstanceName:
Fn::Join:
- '-'
- - Ref: ResourceNamePrefix
- node
- '[1,3]'
InstanceType:
Ref: WorkerInstanceType
IoOptimized: optimized
MaxAmount:
Ref: NumOfNodes
MinAmount:
Ref: NumOfNodes
Password:
Ref: EcsPassword
SystemDiskCategory:
Ref: WorkerSystemDiskCategory
SystemDiskSize:
Ref: WorkerSystemDiskSize
UserData:
Fn::Replace:
- ros-notify:
Fn::GetAtt:
- RosWaitConditionHandleNodes
- CurlCli
- Fn::Join:
- ''
- - '#!/bin/sh
'
- "ssh-keygen -t rsa -P '' -f '/root/.ssh/id_rsa' \n"
- 'until yum -y install expect || ! cat /etc/os-release|grep centos; do
echo ''wait yum ready ...''; sleep 1; done
'
- 'touch /root/scp_key.sh
'
- 'echo ''#!/usr/bin/expect'' >> /root/scp_key.sh
'
- echo 'spawn scp root@
- Fn::GetAtt:
- EcsMaster
- PrivateIp
- ':/root/.ssh/* /root/.ssh/'' >> /root/scp_key.sh
'
- 'echo ''set timeout 30'' >> /root/scp_key.sh
'
- 'echo ''expect "*yes*"'' >> /root/scp_key.sh
'
- 'echo ''send "yes\r"'' >> /root/scp_key.sh
'
- 'echo ''expect "*password:"'' >> /root/scp_key.sh
'
- echo 'send "
- Ref: EcsPassword
- '\r"'' >> /root/scp_key.sh
'
- 'echo ''expect EOF'' >> /root/scp_key.sh
'
- 'expect /root/scp_key.sh
'
- 'rm -rf /root/scp_key.sh
'
- 'echo ''Deploy K8S nodes...''
'
- scp root@
- Fn::GetAtt:
- EcsMaster
- PrivateIp
- ':/etc/kubernetes/cloud-config ./cloud-config
'
- 'export ACCESS_KEY_SECRET=`cat ./cloud-config|grep accessKeySecret|awk
-F ''"'' ''{print $4}''`
'
- 'rm -rf ./cloud-config
'
- export TOKEN=`echo '
- Fn::GetAtt:
- RosWaitConditionMaster
- Data
- ''' | awk -F ''"'' ''{print $4}''`
'
- 'echo ''TOKEN=''$TOKEN
'
- 'curl -sSL http://aliacs-k8s.oss-cn-hangzhou.aliyuncs.com/installer/kubemgr-1.7.2.sh
| '
- 'bash -s nice --node-type node --key-id '
- Fn::GetAtt:
- RamUserAk
- AccessKeyId
- ' --key-secret $ACCESS_KEY_SECRET'
- ' --token $TOKEN '
- ' --endpoint '
- Fn::GetAtt:
- EcsMaster
- PrivateIp
- ':6443
'
- 'num=$(cat /dev/urandom | head -n 10 | cksum | awk -F '' '' ''{print
$1}'')
'
- 'seconds=$(($num%30))
'
- 'sleep $seconds
'
- "ros-notify -d \"{\\\"data\\\": \\\"$TOKEN\\\"}\" \n"
DependsOn: RosWaitConditionMaster
Metadata:
ALIYUN::ROS::Designer:
id: a96ef9e6-6a5d-4a75-a4a5-724425a74eac
Eip:
Type: ALIYUN::VPC::EIP
Properties:
Bandwidth: 5
InternetChargeType: PayByTraffic
Name:
Fn::Join:
- '-'
- - Ref: ResourceNamePrefix
- Eip
- Ref: ALIYUN::Index
Metadata:
ALIYUN::ROS::Designer:
id: f9a36336-2c11-4f62-ab96-aed58643d9bd
Count: 2
NatGateway:
Type: ALIYUN::VPC::NatGateway
Properties:
VpcId:
Fn::GetAtt:
- NetworkStack
- Outputs.VpcId
VSwitchId:
Fn::GetAtt:
- NetworkStack
- Outputs.VSwitchId
NatGatewayName:
Fn::Join:
- '-'
- - Ref: ResourceNamePrefix
- NatGateway
NatType: Enhanced
Metadata:
ALIYUN::ROS::Designer:
id: 7da80d45-f342-4e53-bdfd-fa8ee1cfe90a
EipAssociation:
Type: ALIYUN::VPC::EIPAssociation
Properties:
InstanceId:
Ref: NatGateway
AllocationId:
Fn::Select:
- Ref: ALIYUN::Index
- Ref: Eip
DependsOn:
- Eip
- NatGateway
Metadata:
ALIYUN::ROS::Designer:
id: 87f01796-7b1a-4e4e-9f0b-3a0a5d009732
Count: 2
SNatEntry:
Type: ALIYUN::ECS::SNatEntry
Properties:
SNatIp:
Fn::Select:
- 1
- Fn::GetAtt:
- Eip
- EipAddress
SNatTableId:
Fn::GetAtt:
- NatGateway
- SNatTableId
SourceVSwitchId:
Fn::GetAtt:
- NetworkStack
- Outputs.VSwitchId
DependsOn:
- EipAssociation
Metadata:
ALIYUN::ROS::Designer:
id: 8029c393-ae6e-42f6-8e17-b6feb3f08549
EcsMaster:
Type: ALIYUN::ECS::Instance
Properties:
VpcId:
Fn::GetAtt:
- NetworkStack
- Outputs.VpcId
VSwitchId:
Fn::GetAtt:
- NetworkStack
- Outputs.VSwitchId
SecurityGroupId:
Fn::GetAtt:
- NetworkStack
- Outputs.SecurityGroupId
ImageId:
Ref: ImageId
AllocatePublicIP: false
HostName:
Fn::Join:
- '-'
- - Ref: ResourceNamePrefix
- master
InstanceName:
Fn::Join:
- '-'
- - Ref: ResourceNamePrefix
- master
InstanceType:
Ref: MasterInstanceType
IoOptimized: optimized
Password:
Ref: EcsPassword
SystemDiskCategory:
Ref: MasterSystemDiskCategory
SystemDiskSize:
Ref: MasterSystemDiskSize
UserData:
Fn::Replace:
- ros-notify:
Fn::GetAtt:
- RosWaitConditionHandleMaster
- CurlCli
- Fn::Join:
- ''
- - '#!/bin/sh
'
- "ssh-keygen -t rsa -P '' -f '/root/.ssh/id_rsa' \n"
- 'until yum -y install expect || ! cat /etc/os-release|grep centos; do
echo ''wait yum ready ...''; sleep 1; done
'
- 'cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
'
- 'echo ''StrictHostKeyChecking no'' > /root/.ssh/config
'
- 'curl -sSL http://aliacs-k8s.oss-cn-hangzhou.aliyuncs.com/installer/kubemgr-1.7.2.sh
| '
- 'bash -s nice --node-type master --key-id '
- Fn::GetAtt:
- RamUserAk
- AccessKeyId
- ' --key-secret '
- Fn::GetAtt:
- RamUserAk
- AccessKeySecret
- ' --extra-sans '
- Fn::Select:
- 0
- Fn::GetAtt:
- Eip
- EipAddress
- '
'
- 'echo ''export KUBECONFIG=/etc/kubernetes/admin.conf'' >> /root/.bashrc
'
- 'echo ''Sleep 20s to wait master ready.'' ;sleep 20
'
- 'TOKEN=`kubeadm token list | grep token |awk ''{print $1}''`
'
- 'echo ''Send token to notify server, TOKEN=''$TOKEN
'
- "ros-notify -d \"{\\\"data\\\": \\\"$TOKEN\\\"}\" \n"
DependsOn:
- NetworkStack
- SNatEntry
Metadata:
ALIYUN::ROS::Designer:
id: f68cc9bb-e16a-4f3e-bf92-f78bb4dd8c06
ForwardEntry22:
Type: ALIYUN::ECS::ForwardEntry
Properties:
ExternalIp:
Fn::Select:
- 0
- Fn::GetAtt:
- Eip
- EipAddress
ExternalPort: '22'
ForwardTableId:
Fn::GetAtt:
- NatGateway
- ForwardTableId
InternalIp:
Fn::GetAtt:
- EcsMaster
- PrivateIp
InternalPort: '22'
IpProtocol: TCP
DependsOn:
- EcsMaster
- EipAssociation
Metadata:
ALIYUN::ROS::Designer:
id: df97b6e2-d3a9-4fe3-8520-264bd1d894ce
ForwardEntry6443:
Type: ALIYUN::ECS::ForwardEntry
Properties:
ExternalIp:
Fn::Select:
- 0
- Fn::GetAtt:
- Eip
- EipAddress
ExternalPort: '6443'
ForwardTableId:
Fn::GetAtt:
- NatGateway
- ForwardTableId
InternalIp:
Fn::GetAtt:
- EcsMaster
- PrivateIp
InternalPort: '6443'
IpProtocol: TCP
DependsOn:
- EcsMaster
- EipAssociation
Metadata:
ALIYUN::ROS::Designer:
id: 47f4e3e0-ecd1-48ff-abcd-72a3dad12446
RamUser:
Type: ALIYUN::RAM::User
Properties:
UserName:
Fn::Join:
- ''
- - Ref: ResourceNamePrefix
- Ref: ALIYUN::StackId
Metadata:
ALIYUN::ROS::Designer:
id: 2320017d-ea2b-4cdf-ac1f-a5d6896b7ff5
RamUserAk:
Type: ALIYUN::RAM::AccessKey
Properties:
UserName:
Fn::GetAtt:
- RamUser
- UserName
Metadata:
ALIYUN::ROS::Designer:
id: dc334a6f-f12c-48b0-8d94-4ebc572a36a2
RamUserPolicy:
Type: ALIYUN::RAM::ManagedPolicy
Properties:
PolicyDocument:
Statement:
- Action:
- '*'
Effect: Allow
Resource:
- '*'
Version: '1'
PolicyName:
Fn::Join:
- ''
- - Ref: ResourceNamePrefix
- Ref: ALIYUN::StackId
Users:
- Fn::GetAtt:
- RamUser
- UserName
Metadata:
ALIYUN::ROS::Designer:
id: dd1e4b3a-3e35-4fbc-a2de-1eb023e12482
RosWaitConditionHandleNodes:
Type: ALIYUN::ROS::WaitConditionHandle
Properties: {}
Metadata:
ALIYUN::ROS::Designer:
id: 86263691-3cc7-453f-9f86-cc511aa54db7
RosWaitConditionNodes:
Type: ALIYUN::ROS::WaitCondition
Properties:
Count:
Ref: NumOfNodes
Handle:
Ref: RosWaitConditionHandleNodes
Timeout: 1000
DependsOn: RosWaitConditionMaster
Metadata:
ALIYUN::ROS::Designer:
id: 082ca2c7-5d32-4e5f-bc93-5d457e5c1e07
Outputs:
APIServerUrl:
Value:
Fn::Join:
- ''
- - Fn::Select:
- 0
- Fn::GetAtt:
- Eip
- EipAddress
- ':6443'
SSHIp:
Value:
Fn::Select:
- 0
- Fn::GetAtt:
- Eip
- EipAddress
VSwitchPublicIp:
Value:
Fn::Select:
- 1
- Fn::GetAtt:
- Eip
- EipAddress
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- VpcCidrBlock
- ZoneId
- VSwitchCidrBlock
Label:
default:
en: Infrastructure Configuration
zh-cn: 基础资源配置(必填)
- Parameters:
- MasterInstanceType
- MasterSystemDiskCategory
- MasterSystemDiskSize
Label:
default:
en: Master Instance information
zh-cn: Master实例信息(必填)
- Parameters:
- NumOfNodes
- WorkerInstanceType
- WorkerSystemDiskCategory
- WorkerSystemDiskSize
- EcsPassword
Label:
default:
en: Worker Instance information
zh-cn: Worker实例信息(必填)
TemplateTags:
- acs:example:容器:ECS搭建Kubernetes集群(新建VPC)
Hidden:
- ImageId
- ResourceNamePrefix
ALIYUN::ROS::Designer:
082ca2c7-5d32-4e5f-bc93-5d457e5c1e07:
position:
x: 141
y: 93
size:
height: 60
width: 60
z: 0
08cde1b5-8024-4b39-8d0d-f4a13bd8397a:
source:
id: dc334a6f-f12c-48b0-8d94-4ebc572a36a2
target:
id: 2320017d-ea2b-4cdf-ac1f-a5d6896b7ff5
z: 1
12b7cfb7-fefa-4bd9-9aec-dd07d7159781:
source:
id: f68cc9bb-e16a-4f3e-bf92-f78bb4dd8c06
target:
id: ca8270fb-5466-406c-9d46-a0abe8f5cac3
z: 1
1cc19ee8-5c85-43c0-b2fb-e3f1ffb03c0c:
position:
x: -426
y: 179
size:
height: 60
width: 60
z: 0
2320017d-ea2b-4cdf-ac1f-a5d6896b7ff5:
position:
x: -317
y: 25
size:
height: 60
width: 60
z: 0
30ec9969-cbce-4ec4-b130-461cec374018:
source:
id: a96ef9e6-6a5d-4a75-a4a5-724425a74eac
target:
id: ca8270fb-5466-406c-9d46-a0abe8f5cac3
z: 1
342f460b-3ee6-41dd-b179-b6b36086be53:
source:
id: a96ef9e6-6a5d-4a75-a4a5-724425a74eac
target:
id: dc334a6f-f12c-48b0-8d94-4ebc572a36a2
z: 1
34d3d584-2d3e-44b2-b14b-aab2a17c7e73:
source:
id: 082ca2c7-5d32-4e5f-bc93-5d457e5c1e07
target:
id: 86263691-3cc7-453f-9f86-cc511aa54db7
z: 1
36558403-4d28-4a3c-a046-33904a882835:
source:
id: f68cc9bb-e16a-4f3e-bf92-f78bb4dd8c06
target:
id: ca8270fb-5466-406c-9d46-a0abe8f5cac3
z: 1
3673026c-395e-4f59-b70a-71e612008525:
source:
id: 7da80d45-f342-4e53-bdfd-fa8ee1cfe90a
target:
id: ca8270fb-5466-406c-9d46-a0abe8f5cac3
z: 1
3b0565b3-e0d5-4f4f-b45b-80b1e69386f5:
source:
id: 4b555ee3-1784-4556-816f-49ffdefa21e7
target:
id: 1cc19ee8-5c85-43c0-b2fb-e3f1ffb03c0c
z: 1
441e0003-8062-4d49-a6be-3c52dce4951a:
source:
id: df97b6e2-d3a9-4fe3-8520-264bd1d894ce
target:
id: f68cc9bb-e16a-4f3e-bf92-f78bb4dd8c06
z: 1
47f4e3e0-ecd1-48ff-abcd-72a3dad12446:
position:
x: -207
y: 306
size:
height: 60
width: 60
z: 0
4b555ee3-1784-4556-816f-49ffdefa21e7:
position:
x: -426
y: 274
size:
height: 60
width: 60
z: 0
527a0e50-c878-4d77-93a8-cac919e5eb64:
source:
id: 47f4e3e0-ecd1-48ff-abcd-72a3dad12446
target:
id: f68cc9bb-e16a-4f3e-bf92-f78bb4dd8c06
z: 1
5cd6c692-39fa-4809-81dc-bcd9ba6f59a2:
source:
id: 8029c393-ae6e-42f6-8e17-b6feb3f08549
target:
id: ca8270fb-5466-406c-9d46-a0abe8f5cac3
z: 1
5d4ceded-357b-43ae-9b6f-9b1571916312:
source:
id: 47f4e3e0-ecd1-48ff-abcd-72a3dad12446
target:
id: 7da80d45-f342-4e53-bdfd-fa8ee1cfe90a
z: 1
705b441c-b12f-4fd8-849f-63c1059b7a20:
source:
id: a96ef9e6-6a5d-4a75-a4a5-724425a74eac
target:
id: ca8270fb-5466-406c-9d46-a0abe8f5cac3
z: 1
71cc0b74-cf97-417e-ab66-a7404c4e7667:
source:
id: 7da80d45-f342-4e53-bdfd-fa8ee1cfe90a
target:
id: 87f01796-7b1a-4e4e-9f0b-3a0a5d009732
z: 1
7239a69b-f2b1-44bb-b680-dff3812d80dd:
source:
id: dd1e4b3a-3e35-4fbc-a2de-1eb023e12482
target:
id: 2320017d-ea2b-4cdf-ac1f-a5d6896b7ff5
z: 1
748046e6-37ca-4611-a88e-09ab3e49a992:
source:
id: 87f01796-7b1a-4e4e-9f0b-3a0a5d009732
target:
id: f9a36336-2c11-4f62-ab96-aed58643d9bd
z: 1
7da80d45-f342-4e53-bdfd-fa8ee1cfe90a:
position:
x: -28
y: 408
size:
height: 60
width: 60
z: 0
8029c393-ae6e-42f6-8e17-b6feb3f08549:
position:
x: 227
y: 301
size:
height: 60
width: 60
z: 0
86263691-3cc7-453f-9f86-cc511aa54db7:
position:
x: 141
y: -6
size:
height: 60
width: 60
z: 0
87f01796-7b1a-4e4e-9f0b-3a0a5d009732:
position:
x: -28
y: 503
size:
height: 60
width: 60
z: 0
9096334b-a86c-42f4-8789-a6b8d5ec05b9:
source:
id: 8029c393-ae6e-42f6-8e17-b6feb3f08549
target:
id: 7da80d45-f342-4e53-bdfd-fa8ee1cfe90a
z: 1
9f000143-383c-4b35-bb1b-ae9f64830a50:
source:
id: 7da80d45-f342-4e53-bdfd-fa8ee1cfe90a
target:
id: ca8270fb-5466-406c-9d46-a0abe8f5cac3
z: 1
a96ef9e6-6a5d-4a75-a4a5-724425a74eac:
position:
x: -28
y: 25
size:
height: 60
width: 60
z: 0
b84bd66c-e7d5-41f4-ae4d-0289127981f3:
source:
id: df97b6e2-d3a9-4fe3-8520-264bd1d894ce
target:
id: 7da80d45-f342-4e53-bdfd-fa8ee1cfe90a
z: 1
c5cf742d-d7b8-461b-ad38-3442c6eea957:
source:
id: a96ef9e6-6a5d-4a75-a4a5-724425a74eac
target:
id: ca8270fb-5466-406c-9d46-a0abe8f5cac3
z: 1
c6d26527-8ef2-4ff8-bd2f-677eeae459ab:
source:
id: f68cc9bb-e16a-4f3e-bf92-f78bb4dd8c06
target:
id: dc334a6f-f12c-48b0-8d94-4ebc572a36a2
z: 1
ca8270fb-5466-406c-9d46-a0abe8f5cac3:
position:
x: -28
y: 198
size:
height: 60
width: 60
z: 0
dc334a6f-f12c-48b0-8d94-4ebc572a36a2:
position:
x: -207
y: 25
size:
height: 60
width: 60
z: 0
dd1e4b3a-3e35-4fbc-a2de-1eb023e12482:
position:
x: -425
y: 25
size:
height: 60
width: 60
z: 0
df97b6e2-d3a9-4fe3-8520-264bd1d894ce:
position:
x: -427
y: 408
size:
height: 60
width: 60
z: 0
ede92c2c-645f-460c-bc5b-fd6d93e1f0ae:
source: