-
Notifications
You must be signed in to change notification settings - Fork 35
/
cross-the-available-zone-epidemic-control.yml
855 lines (855 loc) · 24 KB
/
cross-the-available-zone-epidemic-control.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
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 同城跨区域容灾方案,自动部署疫情应用服务,含VPC、ECS、SLB、RDS、NAT网关及OTS,确保高可用与数据安全。
en: Intra-city cross-regional disaster recovery plan, automatically deploying pandemic
response application services, encompassing VPC, ECS, SLB, RDS, NAT Gateway, and
OTS, ensuring high availability and data security.
Parameters:
VpcCidrBlock:
Type: String
Label:
en: 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: <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: 192.168.0.0/16
AllowedValues:
- 192.168.0.0/16
- 172.16.0.0/12
- 10.0.0.0/8
VSwitchZoneId1:
Type: String
Label:
en: Switch1 located 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
ECS resources</font></b>
zh-cn: 可用区ID,<br><b>注: <font color='blue'>选择可用区前请确认该可用区是否支持创建ECS资源的规格</font></b>
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
VSwitch1CidrBlock:
Type: String
Label:
en: Subnet Segment of Switch1
zh-cn: 交换机1子网网段
Description:
en: Subnet of the created virtual switch,must be a sub-network segment of the
proprietary network and is not occupied by other VSwitches.
zh-cn: 创建的虚拟交换机的子网,必须是所属专有网络的子网段,并且没有被其他交换机占用。
VSwitchZoneId2:
Type: String
Label:
en: Switch2 located Zone
zh-cn: 交换机2所在可用区
Description:
en: Availability zone ID,<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,<br><b>注: <font color='blue'>选择可用区前请确认该可用区是否支持创建ECS资源的规格</font></b>
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
VSwitch2CidrBlock:
Type: String
Label:
en: Subnet Segment of Switch2
zh-cn: 交换机2子网网段
Description:
en: Subnet of the created virtual switch,must be a sub-network segment of the
proprietary network and is not occupied by other VSwitches.
zh-cn: 创建的虚拟交换机的子网,必须是所属专有网络的子网段,并且没有被其他交换机占用。
NatGatewayBandwidth:
Type: Number
Label:
en: NAT Gateway Bandwidth
zh-cn: NAT网关带宽
Description:
en: 'NAT Gateway Bandwidth,Allowed value: 5~500.'
zh-cn: Nat网关带宽,允许值:5M~500M,建议10M以上
Default: 10
MinValue: 5
MaxValue: 5000
EcsInstanceType:
Type: String
Label:
en: Instance Specification
zh-cn: 实例规格
Description:
en: 'The ECS instance type,go to the product console to ensure the current instance
is available,</b></font><br>recommended specifications:<font color=''red''><b>ecs.c5.large</b></font><br>note:
a few zones do not support recommended 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: ECS实例类型,进入产品控制台确保当前实例可用;<br>推荐规格:<font color='red'><b>ecs.c5.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
ImageId:
Type: String
Label:
en: Image ID
zh-cn: 镜像ID
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
NumberOfNginxServer1:
Type: Number
Label:
en: Nginx Server located in Zone1
zh-cn: 可用区1 Nginx服务器数量
Description:
en: 'Nginx Server, Allowed value: 1~5.'
zh-cn: 可用区1 Nginx服务器数量,允许值:1~5。
Default: 1
MinValue: 1
MaxValue: 5
NumberOfNginxServer2:
Type: Number
Label:
en: Nginx Server located in Zone2
zh-cn: 可用区2 Nginx服务器数量
Description:
en: 'Nginx Server, Allowed value: 1~5.'
zh-cn: 可用区2 Nginx服务器数量,允许值:1~5。
Default: 1
MinValue: 1
MaxValue: 5
NumberOfTomcatServer1:
Type: Number
Label:
en: Tomcat Server located in Zone1
zh-cn: 可用区1 Tomcat服务器数量
Description:
en: 'Tomcat Server,Allowed value: 1~5.'
zh-cn: 可用区1Tomcat服务器数量,允许值:1~5。
Default: 1
MinValue: 1
MaxValue: 5
NumberOfTomcatServer2:
Type: Number
Label:
en: Tomcat Server located in Zone2
zh-cn: 可用区2 Tomcat服务器数量
Description:
en: 'Tomcat Server,Allowed value: 1~5.'
zh-cn: 可用区2Tomcat服务器数量,允许值:1~5。
Default: 1
MinValue: 1
MaxValue: 5
NumberOfEngineServer1:
Type: Number
Label:
en: Business Server located in Zone1
zh-cn: 可用区1后端应用服务器数量
Description:
en: 'Business AppEngine Server,Allowed value: 1~5.'
zh-cn: 可用区1后端应用服务器数量,允许值:1~5。
Default: 2
MinValue: 1
MaxValue: 5
NumberOfEngineServer2:
Type: Number
Label:
en: Business Server located in Zone2
zh-cn: 可用区2后端应用服务器数量
Description:
en: 'Business AppEngine Server,Allowed value: 1~5.'
zh-cn: 可用区2后端应用服务器数量,允许值:1~5。
Default: 2
MinValue: 1
MaxValue: 5
Password:
Type: String
Label:
en: Password of ECS Instance
zh-cn: 实例密码
Description:
en: The 8-30 long login password of instance, consists of the uppercase, lowercase
letter and number. <br> special characters include()`~!@#$%^&*_-+=|{}[]:;'<>,.?/
zh-cn: 长度8-30,必须包含大写字母、小写字母、数字、特殊符号三个;<br>特殊字符包括:()`~!@#$%^&*_-+=|{}[]:;'<>,.?/
ConstraintDescription:
en: 'Length 8-30, must contain upper case letters, lower case letters, Numbers,
special symbols three;<br>special characters include: ()''~!@#$%^&*_-+=|{}[]:;''<>,.?/'
zh-cn: 长度8-30,必须包含大写字母、小写字母、数字、特殊符号三种;<br>特殊字符包括:()'~!@#$%^&*_-+=|{}[] :;'<>,.?/
AllowedPattern: '[a-zA-Z0-9-\(\)\`\~\!@\#\$%\^&\*-+=\|\{\}\[\]\:\;\‘\,\.\?\/]*'
MinLength: 8
MaxLength: 30
NoEcho: true
DBInstanceClass:
Type: String
Label:
en: Instance Class
zh-cn: 实例规格
Description:
en: 'Select the instance specification based on the type of database engine
and the available area support;<br>see detail: <a href=''https://www.alibabacloud.com/help/en/doc-detail/26312.htm''
target=''_blank''><b><font color=''blue''>Instance specification sheet</font></b></a>'
zh-cn: 根据数据库引擎的类型和可用的区域支持选择实例规格;<br>请参见详细信息:<a href='https://help.aliyun.com/document_detail/26312.html'
target='_blank'><b><font color='blue'>实例规格表</font></b></a>
Default: rds.mysql.t1.small
AllowedValues:
- rds.mysql.t1.small
- rds.mysql.s1.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
- rds.mysql.c2.xlarge
- rds.mysql.c2.xlp2
- rds.mysql.c2.2xlarge
- rds.mysql.st.d13
DBInstanceEngineAndVersion:
Type: String
Label:
en: DB Engine
zh-cn: 数据库引擎
Description:
en: Database Instance engine type and version.
zh-cn: 数据库引擎类型及版本。
Default: MySQL-5.6
AllowedValues:
- MySQL-5.5
- MySQL-5.6
- MySQL-5.7
- MySQL-8.0
DBInstanceStorage:
Type: Number
Label:
en: Instance Storage
zh-cn: 实例存储空间
Description:
en: 'Incrementing in every 5G, unit: GB,Allowed value: 5~2000.'
zh-cn: 数据库存储空间,每5GB进行递增,允许值:5~2000。
ConstraintDescription:
en: 'Incrementing in every 5G, unit: GB'
zh-cn: 每5G递增,单位:GB
Default: 5
MinValue: 5
MaxValue: 2000
DBUser:
Type: String
Label:
en: Username
zh-cn: 数据库账号
Description:
en: Username of Database
zh-cn: 数据库账号
ConstraintDescription:
en: Consist of 2 to 16 characters of lowercase letters, underline. Must begin
with a letter and be end with an alphanumeric character
zh-cn: 由 2 到 16 个小写字母组成,下划线。必须以字母开头,以字母数字字符结尾
Default: mydatabase
MinLength: 2
MaxLength: 16
DBPassword:
Type: String
Label:
en: Password
zh-cn: 数据库密码
Description:
en: Database Password, consisting of letters, numbers, and underline(_), is
8 to 32 characters long
zh-cn: 数据库密码,由字母、数字、下划线(_)组成,长度为8~32个字符
ConstraintDescription:
en: Consisting of letters, numbers, and underline(_), 8 to 32 characters in
length
zh-cn: 由字母、数字和下划线(_)组成,长度为8到32个字符
MinLength: 8
MaxLength: 32
NoEcho: true
OTSInstanceName:
Type: String
Label:
en: Instance Name
zh-cn: 实例名称
Description:
en: Instance Name
zh-cn: 表格存储实例名称
AllowedPattern: '[a-zA-Z][-a-zA-Z0-9]{1,14}[a-zA-Z0-9]'
OTSClusterType:
Type: String
Label:
en: Table Storage Type
zh-cn: 表格存储类别
Description:
en: Tablestore(OTS) Type,SSD (high performance) is selected by default.
zh-cn: 表格存储类别, 默认为SSD(高性能).
Default: SSD
AllowedValues:
- SSD
- HYBRID
Resources:
Vpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock:
Ref: VpcCidrBlock
VpcName: AppVPC
AppVswitch1:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: VSwitchZoneId1
VpcId:
Ref: Vpc
CidrBlock:
Ref: VSwitch1CidrBlock
VSwitchName: AppVSwitch1
SecurityGroup1:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: Vpc
SecurityGroupEgress:
- DestCidrIp: 0.0.0.0/0
IpProtocol: tcp
NicType: intranet
PortRange: 22/22
Priority: 1
SecurityGroupIngress:
- IpProtocol: all
NicType: intranet
PortRange: -1/-1
Priority: 1
SourceCidrIp: 0.0.0.0/0
AppDeployServer:
Type: ALIYUN::ECS::Instance
Properties:
VpcId:
Fn::GetAtt:
- Vpc
- VpcId
VSwitchId:
Fn::GetAtt:
- AppVswitch1
- VSwitchId
SecurityGroupId:
Ref: SecurityGroup1
ImageId:
Ref: ImageId
AllocatePublicIP: true
Description: AppDeployServer
InstanceName: AppDeployServer
InstanceType:
Ref: EcsInstanceType
IoOptimized: optimized
Password:
Ref: Password
SystemDiskCategory: cloud_ssd
AppEngineServers1:
Type: ALIYUN::ECS::InstanceGroup
Properties:
VpcId:
Fn::GetAtt:
- Vpc
- VpcId
VSwitchId:
Fn::GetAtt:
- AppVswitch1
- VSwitchId
SecurityGroupId:
Ref: SecurityGroup1
ImageId:
Ref: ImageId
AllocatePublicIP: false
Description: AppEngineServer
InstanceName: AppEngineServer[1,1]
InstanceType:
Ref: EcsInstanceType
IoOptimized: optimized
MaxAmount:
Ref: NumberOfEngineServer1
Password:
Ref: Password
SystemDiskCategory: cloud_ssd
AppVswitch2:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: VSwitchZoneId2
VpcId:
Ref: Vpc
CidrBlock:
Ref: VSwitch2CidrBlock
VSwitchName: AppVswitch2
SecurityGroup2:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: Vpc
SecurityGroupEgress:
- DestCidrIp: 0.0.0.0/0
IpProtocol: tcp
NicType: intranet
PortRange: 22/22
Priority: 1
SecurityGroupIngress:
- IpProtocol: all
NicType: intranet
PortRange: -1/-1
Priority: 1
SourceCidrIp: 0.0.0.0/0
AppEngineServers2:
Type: ALIYUN::ECS::InstanceGroup
Properties:
VpcId:
Fn::GetAtt:
- Vpc
- VpcId
VSwitchId:
Fn::GetAtt:
- AppVswitch2
- VSwitchId
SecurityGroupId:
Ref: SecurityGroup2
ImageId:
Ref: ImageId
AllocatePublicIP: false
Description: AppEngineServer
InstanceName: AppEngineServer[2,1]
InstanceType:
Ref: EcsInstanceType
IoOptimized: optimized
MaxAmount:
Ref: NumberOfEngineServer2
Password:
Ref: Password
SystemDiskCategory: cloud_ssd
AppNginxServers1:
Type: ALIYUN::ECS::InstanceGroup
Properties:
VpcId:
Fn::GetAtt:
- Vpc
- VpcId
VSwitchId:
Fn::GetAtt:
- AppVswitch1
- VSwitchId
SecurityGroupId:
Ref: SecurityGroup1
ImageId:
Ref: ImageId
AllocatePublicIP: false
Description: AppNginxServer
InstanceName: AppNginxServer[1,1]
InstanceType:
Ref: EcsInstanceType
IoOptimized: optimized
MaxAmount:
Ref: NumberOfNginxServer1
Password:
Ref: Password
SystemDiskCategory: cloud_ssd
AppNginxServers2:
Type: ALIYUN::ECS::InstanceGroup
Properties:
VpcId:
Fn::GetAtt:
- Vpc
- VpcId
VSwitchId:
Fn::GetAtt:
- AppVswitch2
- VSwitchId
SecurityGroupId:
Ref: SecurityGroup2
ImageId:
Ref: ImageId
AllocatePublicIP: false
Description: AppNginxServer
InstanceName: AppNginxServer[2,1]
InstanceType:
Ref: EcsInstanceType
IoOptimized: optimized
MaxAmount:
Ref: NumberOfNginxServer2
Password:
Ref: Password
SystemDiskCategory: cloud_ssd
AppTomcatServers1:
Type: ALIYUN::ECS::InstanceGroup
Properties:
VpcId:
Fn::GetAtt:
- Vpc
- VpcId
VSwitchId:
Fn::GetAtt:
- AppVswitch1
- VSwitchId
SecurityGroupId:
Ref: SecurityGroup1
ImageId:
Ref: ImageId
AllocatePublicIP: false
Description: AppTomcatServer
InstanceName: AppTomcatServer[1,1]
InstanceType:
Ref: EcsInstanceType
IoOptimized: optimized
MaxAmount:
Ref: NumberOfTomcatServer1
Password:
Ref: Password
SystemDiskCategory: cloud_ssd
AppTomcatServers2:
Type: ALIYUN::ECS::InstanceGroup
Properties:
VpcId:
Fn::GetAtt:
- Vpc
- VpcId
VSwitchId:
Fn::GetAtt:
- AppVswitch2
- VSwitchId
SecurityGroupId:
Ref: SecurityGroup2
ImageId:
Ref: ImageId
AllocatePublicIP: false
Description: AppTomcatServer
InstanceName: AppTomcatServer[2,1]
InstanceType:
Ref: EcsInstanceType
IoOptimized: optimized
MaxAmount:
Ref: NumberOfTomcatServer2
Password:
Ref: Password
SystemDiskCategory: cloud_ssd
App_EIP:
Type: ALIYUN::VPC::EIP
Properties:
Bandwidth: 20
InternetChargeType: PayByTraffic
NatGateway:
Type: ALIYUN::VPC::NatGateway
Properties:
VpcId:
Ref: Vpc
VSwitchId:
Ref: AppVswitch1
Description: My NAT Gateway
NatGatewayName: App-NatGw
App_EIPAssociation:
Type: ALIYUN::VPC::EIPAssociation
Properties:
InstanceId:
Fn::GetAtt:
- NatGateway
- NatGatewayId
AllocationId:
Fn::GetAtt:
- App_EIP
- AllocationId
BackendLoadBalancer:
Type: ALIYUN::SLB::LoadBalancer
Properties:
VpcId:
Fn::GetAtt:
- Vpc
- VpcId
VSwitchId:
Fn::GetAtt:
- AppVswitch1
- VSwitchId
AddressType: intranet
LoadBalancerName: App-Backend-LoadBalancer
LoadBalancerSpec: slb.s3.large
MasterZoneId:
Ref: VSwitchZoneId1
SlaveZoneId:
Ref: VSwitchZoneId2
BackendLoadBalancerListener7001:
Type: ALIYUN::SLB::Listener
Properties:
BackendServerPort: '7001'
Bandwidth: -1
HealthCheck:
HealthyThreshold: '2'
Interval: '5'
Port: '7001'
Timeout: '2'
UnhealthyThreshold: '4'
ListenerPort: '7001'
LoadBalancerId:
Ref: BackendLoadBalancer
Persistence:
PersistenceTimeout: 600
StickySession: 'on'
Protocol: tcp
DependsOn: BackendLoadBalancer
BackendSLBAttachment:
Type: ALIYUN::SLB::BackendServerAttachment
Properties:
BackendServerList:
Fn::ListMerge:
- Fn::GetAtt:
- AppEngineServers1
- InstanceIds
- Fn::GetAtt:
- AppEngineServers2
- InstanceIds
LoadBalancerId:
Ref: BackendLoadBalancer
DependsOn:
- AppEngineServers1
- AppEngineServers2
Database:
Type: ALIYUN::RDS::DBInstance
Properties:
VPCId:
Ref: Vpc
VSwitchId:
Ref: AppVswitch1
DBInstanceClass:
Ref: DBInstanceClass
DBInstanceDescription: DataBase
DBInstanceStorage:
Ref: DBInstanceStorage
Engine:
Fn::Select:
- '0'
- Fn::Split:
- '-'
- Ref: DBInstanceEngineAndVersion
EngineVersion:
Fn::Select:
- '1'
- Fn::Split:
- '-'
- Ref: DBInstanceEngineAndVersion
MasterUserPassword:
Ref: DBPassword
MasterUsername:
Ref: DBUser
SecurityIPList: 0.0.0.0/0
FrontLoadBalancer:
Type: ALIYUN::SLB::LoadBalancer
Properties:
AddressType: internet
LoadBalancerName: App-Front-LoadBalancer
LoadBalancerSpec: slb.s3.large
MasterZoneId:
Ref: VSwitchZoneId1
SlaveZoneId:
Ref: VSwitchZoneId2
FrontLoadBalancerListener80:
Type: ALIYUN::SLB::Listener
Properties:
BackendServerPort: '8080'
Bandwidth: -1
HealthCheck:
HealthyThreshold: '2'
Interval: '5'
Port: '8080'
Timeout: '2'
UnhealthyThreshold: '4'
ListenerPort: '80'
LoadBalancerId:
Ref: FrontLoadBalancer
Persistence:
PersistenceTimeout: 600
StickySession: 'on'
Protocol: tcp
DependsOn: FrontLoadBalancer
FrontSLBAttachment:
Type: ALIYUN::SLB::BackendServerAttachment
Properties:
BackendServerList:
Fn::ListMerge:
- Fn::GetAtt:
- AppNginxServers1
- InstanceIds
- Fn::GetAtt:
- AppNginxServers2
- InstanceIds
LoadBalancerId:
Ref: FrontLoadBalancer
DependsOn:
- AppNginxServers1
- AppNginxServers2
NatGatewayEIP:
Type: ALIYUN::VPC::EIP
Properties:
Bandwidth:
Ref: NatGatewayBandwidth
InternetChargeType: PayByTraffic
NatGatewayEIPBind:
Type: ALIYUN::VPC::EIPAssociation
Properties:
InstanceId:
Ref: NatGateway
AllocationId:
Ref: NatGatewayEIP
DependsOn:
- NatGateway
- NatGatewayEIP
OTSInstance:
Type: ALIYUN::OTS::Instance
Properties:
ClusterType:
Ref: OTSClusterType
InstanceName:
Ref: OTSInstanceName
SNatEntry1:
Type: ALIYUN::ECS::SNatEntry
Properties:
SNatIp:
Fn::GetAtt:
- NatGatewayEIP
- EipAddress
SNatTableId:
Fn::GetAtt:
- NatGateway
- SNatTableId
SourceVSwitchId:
Ref: AppVswitch1
DependsOn:
- NatGatewayEIPBind
SNatEntry2:
Type: ALIYUN::ECS::SNatEntry
Properties:
SNatIp:
Fn::GetAtt:
- NatGatewayEIP
- EipAddress
SNatTableId:
Fn::GetAtt:
- NatGateway
- SNatTableId
SourceVSwitchId:
Ref: AppVswitch2
DependsOn:
- NatGatewayEIPBind
Outputs:
App_DeployServer_Private_IP:
Description: The ip address of the Deploy Server.
Value:
Fn::GetAtt:
- AppDeployServer
- PrivateIp
App_DeployServer_Public_IP:
Description: The ip address of the Deploy Server.
Value:
Fn::GetAtt:
- AppDeployServer
- PublicIp
App_EngineServer1_Private_IP:
Description: The ip address of the Engine Server.
Value:
Fn::GetAtt:
- AppEngineServers1
- PrivateIps
App_EngineServer2_Private_IP:
Description: The ip address of the Engine Server.
Value:
Fn::GetAtt:
- AppEngineServers2
- PrivateIps
App_EngineServer_SLB_IP:
Description: The ip address of the front load balancer.
Value:
Fn::GetAtt:
- BackendLoadBalancer
- IpAddress
App_Http_URL:
Description: App Access Http URL
Value:
Fn::Join:
- ''
- - http://
- Fn::GetAtt:
- FrontLoadBalancer
- IpAddress
- :80
App_NginxServer1_Private_IP:
Description: The ip address of the Nginx Server.
Value:
Fn::GetAtt:
- AppNginxServers1
- PrivateIps
App_NginxServer2_Private_IP:
Description: The ip address of the Nginx Server.
Value:
Fn::GetAtt:
- AppNginxServers2
- PrivateIps
App_TomcatServer1_Private_IP:
Description: The ip address of the Tomcat Server.
Value:
Fn::GetAtt:
- AppTomcatServers1
- PrivateIps
App_TomcatServer2_Private_IP:
Description: The ip address of the Tomcat Server.
Value:
Fn::GetAtt:
- AppTomcatServers2
- PrivateIps
OTS_EndPoint:
Description: The Endpoint of the OTS.
Value:
Fn::GetAtt:
- OTSInstance
- VpcEndpoint
OTS_InstanceName:
Description: The InstanceName of the OTS.
Value:
Fn::GetAtt:
- OTSInstance
- InstanceName
Region:
Value:
Ref: ALIYUN::Region
UserID:
Value:
Ref: ALIYUN::AccountId
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- VpcCidrBlock
- VSwitchZoneId1
- VSwitch1CidrBlock
- VSwitchZoneId2
- VSwitch2CidrBlock
- NatGatewayBandwidth
Label:
default: VPC
- Parameters:
- EcsInstanceType
- ImageId
- NumberOfNginxServer1
- NumberOfNginxServer2
- NumberOfTomcatServer1
- NumberOfTomcatServer2
- NumberOfEngineServer1
- NumberOfEngineServer2
- Password
Label:
default: ECS
- Parameters:
- DBInstanceClass
- DBInstanceEngineAndVersion
- DBInstanceStorage
- DBUser
- DBPassword
Label:
default: RDS
- Parameters:
- OTSInstanceName
- OTSClusterType
Label:
default: OTS
TemplateTags:
- acs:solution:备份&容灾:同地域跨可用区容灾-云上稳定性保障-疫情护航项目基础设施搭建