forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
global-deployment-network-deploy-single-env.yml
811 lines (811 loc) · 23.2 KB
/
global-deployment-network-deploy-single-env.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
ROSTemplateFormatVersion: '2015-09-01'
Description:
en: In the online education industry, most teachers are not located in the same
region or country as the students. For example, in scenario-based online English
education programs, the teachers are based in North America, while the students
are from various regions in China. This template helps build a resource environment
in a single region.
zh-cn: 在线教育的教师大部分和学员不在相同区域,设置不在同一个国家。例如场景的英语类在线教育,教师在北美,学员分布在国内各地区;此模板完成搭建单个地域的资源环境。
Conditions:
IsCreateManageEnv:
Fn::Equals:
- Ref: CreateManageEnv
- true
Parameters:
CreateManageEnv:
Type: Boolean
Label:
en: Create Management Server And Nat Gateway
zh-cn: 是否创建管理服务器及Nat网关
Description:
en: '<font color=''blue''><b>Refer to the template architecture diagram for
the environment resources</b></font>,<br>note: check: create; Unchecked: not
created.'
zh-cn: '<font color=''blue''><b>环境资源情况请参考模板架构图</b></font>,<br>注:勾选: 创建;未勾选:
不创建。'
Default: false
VpcCidrBlock:
Type: String
Label:
en: VPC CIDR Block
zh-cn: 专有网络网段
Description:
en: 'The IP address range of the VPC in the CIDR Block form; <br>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>您可以使用以下的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.0/16]</font>
Default: 10.0.0.0/16
VSwitch1ZoneId:
Type: String
Label:
en: VSwitch 1 Availability Zone
zh-cn: 交换机1可用区
Description:
en: Availability Zone ID,<br><b>note: <font color='blue'>Before selecting, please
confirm that the Availability Zone supports the specification of creating
RDS、SLB and ECS resources.</font></b>
zh-cn: 可用区ID。<br><b>注: <font color='blue'>选择可用区前请确认该可用区是否支持创建RDS、SLB及ECS资源的规格。</font></b>
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
VSwitch1CidrBlock:
Type: String
Label:
en: VSwitch 1 CIDR Block
zh-cn: 交换机1子网段
Description:
en: Must be a sub-network segment of the proprietary network and is not occupied
by other v-switches.
zh-cn: 必须是所属专有网络的子网段,并且没有被其他交换机占用。
Default: 10.0.10.0/24
VSwitch2ZoneId:
Type: String
Label:
en: VSwitch 2 Availability Zone
zh-cn: 交换机2可用区
Description:
en: Availability Zone ID, <font color='red'>please select a different available
area from switch 1</font> <br><b>note: <font color='blue'>Before selecting,
please confirm that the Availability Zone supports the specification of creating
ECS resources.</font></b>
zh-cn: 可用区ID,<font color='red'>请选择与交换机1不同的可用区</font><br><b>注: <font color='blue'>选择可用区前请确认该可用区是否支持创建ECS资源的规格。</font></b>
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
VSwitch2CidrBlock:
Type: String
Label:
en: VSwitch 2 CIDR Block
zh-cn: 交换机2子网段
Description:
en: Must be a sub-network segment of the proprietary network and is not occupied
by other v-switches.
zh-cn: 必须是所属专有网络的子网段,并且没有被其他交换机占用。
Default: 10.0.20.0/24
EipBandwidth:
Type: Number
Label:
en: EIP Bandwidth
zh-cn: 弹性公网IP带宽值
Description:
en: 'Elastic Public network IP bandwidth,unit: Mbps.'
zh-cn: 弹性公网IP带宽值,单位:Mbps。
Default: 5
LoadBalancerSpec:
Type: String
Label:
en: Instance Specification
zh-cn: 实例规格
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>
Default: slb.s1.small
AllowedValues:
- slb.s1.small
- slb.s2.small
- slb.s2.medium
- slb.s3.small
- slb.s3.medium
- slb.s3.large
EcsInstanceType:
Type: String
Label:
en: Instance Type
zh-cn: 实例规格
Description:
en: 'Fill in the specifications that can be used under the VSwitch availability
zone;</b></font><br>general specifications:<font color=''red''><b>ecs.g5.large</b></font><br>note:
a few zones do not support general specifications<br>see detail: <a href=''https://www.alibabacloud.com/help/en/doc-detail/25378.html''
target=''_blank''><b><font color=''blue''>Instance Specification Family</font></a></b>'
zh-cn: 填写VSwitch可用区下可使用的规格;<br>通用规格:<font color='red'><b>ecs.g5.large</b></font><br>注:可用区可能不支持通用规格<br>规格详见:<a
href='https://help.aliyun.com/document_detail/25378.html' target='_blank'><b><font
color='blue'>实例规格族</font></a></b>
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
EcsImageId:
Type: String
Label:
en: Image
zh-cn: 镜像
Description:
en: Image ID,see detail:<b><a href='https://www.alibabacloud.com/help/en/doc-detail/112977.html'
target='_blank'><font color='blue'>Find the mirror</font></a></b>
zh-cn: 镜像ID, 详见:<b><a href='https://help.aliyun.com/document_detail/112977.html'
target='_blank'><font color='blue'>查找镜像</font></a></b>
Default: centos_7
EcsSystemDiskCategory:
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>]'
Default: cloud_ssd
AllowedValues:
- cloud_auto
- cloud_efficiency
- cloud_ssd
- cloud
- cloud_essd
- ephemeral_ssd
EcsSystemDiskSize:
Type: Number
Label:
en: System Disk Space
zh-cn: 系统盘空间
Description:
en: 'System disk size, range of values: 40-500, units: GB.'
zh-cn: 系统盘大小, 取值范围:[40, 500], 单位:GB。
Default: 40
MinValue: 40
MaxValue: 500
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
DBInstanceEngineAndVersion:
Type: String
Label:
en: Type And Version
zh-cn: 类型与版本号
Description:
en: Database type and version number.
zh-cn: 数据库类型与版本号。
Default: MySQL-5.6
AllowedValues:
- MySQL-5.5
- MySQL-5.6
- MySQL-5.7
- MySQL-8.0
- PPAS-9.3
- PostgreSQL-9.4
- SQLServer-2008r2
DBInstanceClass:
Type: String
Label:
en: Instance Specification
zh-cn: 实例规格
Description:
en: Instance specifications, see detail:</b><a href='https://www.alibabacloud.com/help/doc-detail/26312.html'
target='_blank'><b><font color='blue'>Performance support type</b></font></a>
zh-cn: 实例规格,详见:</b><a href='https://help.aliyun.com/document_detail/26312.html'
target='_blank'><b><font color='blue'>性能保障型</b></font></a>
Default: rds.mysql.t1.small
AllowedValues:
- rds.mysql.t1.small
- rds.mysql.s2.large
- rds.mysql.s2.xlarge
- rds.mysql.s3.large
- rds.mysql.m1.medium
- rds.mysql.c1.large
- rds.mysql.c1.xlarge
DBInstanceStorage:
Type: Number
Label:
en: Storage Space
zh-cn: 存储空间
Description:
en: 'Database storage space, units: GB, per 5GB increment, value range: 5-1000.'
zh-cn: 数据库存储空间, 单位:GB, 每5GB进行递增,取值范围:5-1000。
Default: 5
Resources:
EcsVpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock:
Ref: VpcCidrBlock
VpcName:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
EcsSecurityGroup3:
Type: ALIYUN::ECS::SecurityGroup
Condition: IsCreateManageEnv
Properties:
VpcId:
Ref: EcsVpc
SecurityGroupIngress:
- IpProtocol: all
NicType: internet
PortRange: -1/-1
Priority: 1
SourceCidrIp: 0.0.0.0/0
SecurityGroupName:
Fn::Join:
- '-'
- - SecurityGroup3
- StackId
- Ref: ALIYUN::StackId
EcsVSwitch1:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: VSwitch1ZoneId
VpcId:
Ref: EcsVpc
CidrBlock:
Ref: VSwitch1CidrBlock
VSwitchName:
Fn::Join:
- '-'
- - VSwitch1
- StackId
- Ref: ALIYUN::StackId
EcsInstance5Manage:
Type: ALIYUN::ECS::Instance
Condition: IsCreateManageEnv
Properties:
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch1
SecurityGroupId:
Ref: EcsSecurityGroup3
ImageId:
Ref: EcsImageId
AllocatePublicIP: false
InstanceType:
Ref: EcsInstanceType
Password:
Ref: EcsPassword
SystemDiskCategory:
Ref: EcsSystemDiskCategory
SystemDiskSize:
Ref: EcsSystemDiskSize
Tags:
- Key: best_practice
Value: 029
VpcEip3:
Type: ALIYUN::VPC::EIP
Condition: IsCreateManageEnv
Properties:
Bandwidth:
Ref: EipBandwidth
InternetChargeType: PayByTraffic
VpcNatGateway:
Type: ALIYUN::VPC::NatGateway
Condition: IsCreateManageEnv
Properties:
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch1
NatGatewayName:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
EipBindNatGatewayToDNat:
Type: ALIYUN::VPC::EIPAssociation
Condition: IsCreateManageEnv
Properties:
InstanceId:
Ref: VpcNatGateway
AllocationId:
Ref: VpcEip3
EcsForwardEntry:
Type: ALIYUN::ECS::ForwardEntry
Condition: IsCreateManageEnv
Properties:
ExternalIp:
Fn::GetAtt:
- VpcEip3
- EipAddress
ExternalPort: '5555'
ForwardTableId:
Fn::GetAtt:
- VpcNatGateway
- ForwardTableId
InternalIp:
Fn::GetAtt:
- EcsInstance5Manage
- PrivateIp
InternalPort: '3389'
IpProtocol: TCP
DependsOn:
- EipBindNatGatewayToDNat
- VpcEip3
- VpcNatGateway
EcsSecurityGroup1:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: EcsVpc
SecurityGroupIngress:
- IpProtocol: tcp
NicType: intranet
PortRange: 22/22
Priority: 1
SourceCidrIp: 0.0.0.0/0
- IpProtocol: tcp
NicType: intranet
PortRange: 80/80
Priority: 1
SourceCidrIp: 0.0.0.0/0
- IpProtocol: tcp
NicType: intranet
PortRange: 443/443
Priority: 1
SourceCidrIp: 0.0.0.0/0
- IpProtocol: icmp
NicType: intranet
PortRange: -1/-1
Priority: 1
SourceCidrIp: 0.0.0.0/0
- IpProtocol: all
NicType: intranet
Policy: drop
PortRange: -1/-1
Priority: 10
SourceCidrIp: 0.0.0.0/0
SecurityGroupName:
Fn::Join:
- '-'
- - SecurityGroup1
- StackId
- Ref: ALIYUN::StackId
EcsInstance1:
Type: ALIYUN::ECS::Instance
Properties:
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch1
SecurityGroupId:
Ref: EcsSecurityGroup1
ImageId:
Ref: EcsImageId
AllocatePublicIP: false
InstanceType:
Ref: EcsInstanceType
Password:
Ref: EcsPassword
SystemDiskCategory:
Ref: EcsSystemDiskCategory
SystemDiskSize:
Ref: EcsSystemDiskSize
Tags:
- Key: best_practice
Value: 029
UserData:
Fn::Join:
- ''
- - "#!/bin/sh \n"
- "sudo yum check-update \n"
- "sudo yum -y install httpd php \n"
- "cd /var/www/html \n"
- "echo 'hello world,This is ECS1.' > index.html \n"
- "service httpd start \n"
EcsVSwitch2:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: VSwitch2ZoneId
VpcId:
Ref: EcsVpc
CidrBlock:
Ref: VSwitch2CidrBlock
VSwitchName:
Fn::Join:
- '-'
- - VSwitch2
- StackId
- Ref: ALIYUN::StackId
EcsInstance2:
Type: ALIYUN::ECS::Instance
Properties:
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch2
SecurityGroupId:
Ref: EcsSecurityGroup1
ImageId:
Ref: EcsImageId
AllocatePublicIP: false
InstanceType:
Ref: EcsInstanceType
Password:
Ref: EcsPassword
SystemDiskCategory:
Ref: EcsSystemDiskCategory
SystemDiskSize:
Ref: EcsSystemDiskSize
Tags:
- Key: best_practice
Value: 029
UserData:
Fn::Join:
- ''
- - "#!/bin/sh \n"
- "sudo yum check-update \n"
- "sudo yum -y install httpd php \n"
- "cd /var/www/html \n"
- "echo 'hello world,This is ECS2.' > index.html \n"
- "service httpd start \n"
EcsSecurityGroup2:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: EcsVpc
SecurityGroupIngress:
- IpProtocol: tcp
NicType: intranet
PortRange: 1024/1024
Priority: 1
SourceGroupId:
Ref: EcsSecurityGroup1
- IpProtocol: udp
NicType: intranet
PortRange: 2000/2048
Priority: 1
SourceGroupId:
Ref: EcsSecurityGroup1
- IpProtocol: tcp
NicType: intranet
PortRange: 22/22
Priority: 1
SourceCidrIp: 0.0.0.0/0
- IpProtocol: icmp
NicType: intranet
PortRange: -1/-1
Priority: 1
SourceCidrIp: 0.0.0.0/0
- IpProtocol: all
NicType: intranet
Policy: drop
PortRange: -1/-1
Priority: 10
SourceCidrIp: 0.0.0.0/0
SecurityGroupName:
Fn::Join:
- '-'
- - SecurityGroup2
- StackId
- Ref: ALIYUN::StackId
EcsInstance3:
Type: ALIYUN::ECS::Instance
Properties:
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch1
SecurityGroupId:
Ref: EcsSecurityGroup2
ImageId:
Ref: EcsImageId
AllocatePublicIP: false
InstanceType:
Ref: EcsInstanceType
Password:
Ref: EcsPassword
SystemDiskCategory:
Ref: EcsSystemDiskCategory
SystemDiskSize:
Ref: EcsSystemDiskSize
Tags:
- Key: best_practice
Value: 029
UserData:
Fn::Join:
- ''
- - "#!/bin/sh \n"
- "sudo yum check-update \n"
- "sudo yum -y install httpd php \n"
- "cd /var/www/html \n"
- "echo 'hello world,This is ECS3.' > index.html \n"
- "service httpd start \n"
EcsInstance4:
Type: ALIYUN::ECS::Instance
Properties:
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch2
SecurityGroupId:
Ref: EcsSecurityGroup2
ImageId:
Ref: EcsImageId
AllocatePublicIP: false
InstanceType:
Ref: EcsInstanceType
Password:
Ref: EcsPassword
SystemDiskCategory:
Ref: EcsSystemDiskCategory
SystemDiskSize:
Ref: EcsSystemDiskSize
Tags:
- Key: best_practice
Value: 029
UserData:
Fn::Join:
- ''
- - "#!/bin/sh \n"
- "sudo yum check-update \n"
- "sudo yum -y install httpd php \n"
- "cd /var/www/html \n"
- "echo 'hello world,This is ECS4.' > index.html \n"
- "service httpd start \n"
VpcEip2:
Type: ALIYUN::VPC::EIP
Condition: IsCreateManageEnv
Properties:
Bandwidth:
Ref: EipBandwidth
InternetChargeType: PayByTraffic
EipBindNatGatewayToSNat:
Type: ALIYUN::VPC::EIPAssociation
Condition: IsCreateManageEnv
Properties:
InstanceId:
Ref: VpcNatGateway
AllocationId:
Ref: VpcEip2
RdsDatabase:
Type: ALIYUN::RDS::DBInstance
Properties:
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch1
DBInstanceClass:
Ref: DBInstanceClass
DBInstanceNetType: Intranet
DBInstanceStorage:
Ref: DBInstanceStorage
Engine:
Fn::Select:
- '0'
- Fn::Split:
- '-'
- Ref: DBInstanceEngineAndVersion
EngineVersion:
Fn::Select:
- '1'
- Fn::Split:
- '-'
- Ref: DBInstanceEngineAndVersion
PayType: Postpaid
SecurityIPList:
Ref: VpcCidrBlock
Tags:
Key: best_practice
Value: 029
SlbLoadBalancer:
Type: ALIYUN::SLB::LoadBalancer
Properties:
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch1
AddressType: intranet
InternetChargeType: paybytraffic
LoadBalancerName:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
LoadBalancerSpec:
Ref: LoadBalancerSpec
MasterZoneId:
Ref: VSwitch1ZoneId
Tags:
- Key: best_practice
Value: 029
SlbBackendServerAttachment:
Type: ALIYUN::SLB::BackendServerAttachment
Properties:
BackendServerList:
- Ref: EcsInstance1
- Ref: EcsInstance2
- Ref: EcsInstance3
- Ref: EcsInstance4
BackendServerWeightList:
- 100
LoadBalancerId:
Ref: SlbLoadBalancer
DependsOn:
- EcsInstance1
- EcsInstance2
- EcsInstance3
- EcsInstance4
SlbListener:
Type: ALIYUN::SLB::Listener
Properties:
BackendServerPort: 80
Bandwidth: 1
HealthCheck:
HealthyThreshold: 3
HttpCode: http_2xx,http_3xx,http_4xx,http_5xx
Interval: 2
Timeout: 5
UnhealthyThreshold: 3
ListenerPort: 80
LoadBalancerId:
Ref: SlbLoadBalancer
Protocol: http
Scheduler: wrr
VpcEip1:
Type: ALIYUN::VPC::EIP
Properties:
Bandwidth:
Ref: EipBandwidth
InternetChargeType: PayByTraffic
VpcEipAssociation:
Type: ALIYUN::VPC::EIPAssociation
Properties:
InstanceId:
Ref: SlbLoadBalancer
AllocationId:
Ref: VpcEip1
VpcSnatEntry:
Type: ALIYUN::VPC::SnatEntry
Condition: IsCreateManageEnv
Properties:
SourceVSwitchIds:
- Ref: EcsVSwitch1
SnatIp:
Fn::GetAtt:
- VpcEip2
- EipAddress
SnatTableId:
Fn::GetAtt:
- VpcNatGateway
- SNatTableId
DependsOn:
- EipBindNatGatewayToSNat
- VpcEip2
- VpcNatGateway
Outputs:
Ecs1InstanceId:
Description:
en: Instance ID of cloud server 1
zh-cn: 云服务器1的实例ID。
Value:
Fn::GetAtt:
- EcsInstance1
- InstanceId
Ecs2InstanceId:
Description:
en: Instance ID of cloud server 2
zh-cn: 云服务器2的实例ID。
Value:
Fn::GetAtt:
- EcsInstance2
- InstanceId
Ecs3InstanceId:
Description:
en: Instance ID of cloud server 3
zh-cn: 云服务器3的实例ID。
Value:
Fn::GetAtt:
- EcsInstance3
- InstanceId
Ecs4InstanceId:
Description:
en: Instance ID of cloud server 4
zh-cn: 云服务器4的实例ID。
Value:
Fn::GetAtt:
- EcsInstance4
- InstanceId
Ecs5InstanceId:
Description:
en: Instance ID of cloud server 5
zh-cn: 云服务器5的实例ID。
Condition: IsCreateManageEnv
Value:
Fn::GetAtt:
- EcsInstance5Manage
- InstanceId
RdsDatabaseInnerConnectionString:
Description:
en: Database Intranet connection string
zh-cn: 数据库内网连接串。
Value:
Fn::GetAtt:
- RdsDatabase
- InnerConnectionString
VpcEip1Address:
Description:
en: Binding load balancing elastic public network IP
zh-cn: 绑定负载均衡弹性公网IP。
Value:
Fn::GetAtt:
- VpcEip1
- EipAddress
VpcId:
Description:
en: Proprietary network instance Id
zh-cn: 专有网络实例Id。
Value:
Fn::GetAtt:
- EcsVpc
- VpcId
VpcNatGatewayId:
Description:
en: Nat gateway instance ID
zh-cn: Nat网关实例ID。
Condition: IsCreateManageEnv
Value:
Fn::GetAtt:
- VpcNatGateway
- NatGatewayId
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- CreateManageEnv
Label:
default: ''
- Parameters:
- VpcCidrBlock
- VSwitch1ZoneId
- VSwitch1CidrBlock
- VSwitch2ZoneId
- VSwitch2CidrBlock
- EipBandwidth
Label:
default: VPC
- Parameters:
- LoadBalancerSpec
Label:
default: SLB
- Parameters:
- EcsInstanceType
- EcsImageId
- EcsSystemDiskCategory
- EcsSystemDiskSize
- EcsPassword
Label:
default: ECS
- Parameters:
- DBInstanceEngineAndVersion
- DBInstanceClass
- DBInstanceStorage
Label:
default: RDS
TemplateTags:
- acs:solution:网络组网:在线教育全球部署网络规划-搭建单个区域资源环境