forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
cross-the-available-zone-disaster.yml
1023 lines (1023 loc) · 30.9 KB
/
cross-the-available-zone-disaster.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 shows the basic procedure of a disaster recovery drill across
zones in a region. This template uses an existing e-commerce website image to
build an e-commerce website.
zh-cn: 本文介绍同城跨区域容灾演练的基本操作步骤,以云市场镜像Magento电子商务系统镜像搭建电商网站环境。
Parameters:
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: <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:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
VSwitchZoneId1:
Type: String
Label:
en: VSwitch 1 Available 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,RDS and SLB resources</font></b>
zh-cn: 可用区ID。<br><b>注: <font color='blue'>选择可用区前请确认该可用区是否支持创建ECS、RDS及SLB资源的规格</font></b>
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
VSw1CidrBlock:
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 VSwitches.
zh-cn: 必须是所属专有网络的子网段,并且没有被其他交换机占用。
Default: 192.168.0.0/24
VSwitchZoneId2:
Type: String
Label:
en: VSwitch 2 Available Zone
zh-cn: 交换机2可用区
Description:
en: Availability Zone ID, <font color='red'><b>select a different Availability
Zone than VSwitch 1</b></font><br><b>note: <font color='blue'>Before selecting,
please confirm that the Availability Zone supports the creation of ECS specification
instances</font></b>
zh-cn: 可用区ID,<font color='red'><b>选择与交换机1不同的可用区</b></font><br><b>注: <font color='blue'>选择前请确认该可用区是否支持创建ECS的规格实例</font></b>
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
VSw2CidrBlock:
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 VSwitches.
zh-cn: 必须是所属专有网络的子网段,并且没有被其他交换机占用。
Default: 192.168.1.0/24
Ecs1GroupMaxAmount:
Type: Number
Label:
en: Amount
zh-cn: 交换机1下的实例数量
Description:
en: Number of instances under VSwitch 1
zh-cn: 交换机1下的实例数量
Default: 1
AllowedValues:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Ecs2GroupMaxAmount:
Type: Number
Label:
en: Amount
zh-cn: 交换机2下的实例数量
Description:
en: Number of instances under VSwitch 2
zh-cn: 交换机2下的实例数量
Default: 1
AllowedValues:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
EcsGroupImageId:
Type: String
Label:
en: Image
zh-cn: 镜像
Description:
en: 'Server instance Image ID. <br>Hangzhou Magento Image: m-bp1d9e2n6iw68exr0z9h<br>Shenzhen
Magento Image: m-wz9g8nzni5lkutmmj5jrjr<br>Beijing Magento Image: m-2zefvtmu
9vljd06ll1u<br>Qingdao Magento Image: m-m5e92ot9nf1rm9c8neob<br>Shanghai Magento
Image: m-uf67vlqunx 6ldjsaaxo2<br>note: If the above image does not provide
a image of the geographical region, please use the supported magento free
image; see detail: <b><a href=''https://marketplace.alibabacloud.com/products?keywords=magento''
target=''_blank''><font color=''blue''>Magento Image</font></a></b>'
zh-cn: 服务器镜像<br>云市场镜像名称: Magento电子商务系统(Centos 7.2 64位)<br>版本:v1.0<br>杭州Magento镜像:m-bp1d9e2n6iw68exr0z9h<br>深圳Magento镜像:m-wz9g8nzni5lkutmmj5jr<br>北京Magento镜像:m-2zefvttmu9vljd06ll1u<br>青岛Magento镜像:m-m5e92ot9nf1rm9c8neob<br>上海Magento镜像:m-uf67vlqunx6ldjsaaxo2<br>注:以上镜像如未提供该地域的镜像,请使用支持的magento免费镜像;详见:<b><a
href='https://market.aliyun.com/products/?keywords=Magento' target='_blank'><font
color='blue'>Magento镜像</font></a></b>
EcsGroupInstanceType1:
Type: String
Label:
en: Available Zone 1 Specifications
zh-cn: 可用区1规格
Description:
en: 'Fill in the specifications that can be used under the availability zone
of Switch 1; <br>general specifications:<font color=''red''><b>ecs.c5.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: 填写交换机1的可用区下可使用的规格;<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
AssociationPropertyMetadata:
ZoneId: VSwitchZoneId1
EcsGroupInstanceType2:
Type: String
Label:
en: Available Zone 2 Specifications
zh-cn: 可用区2规格
Description:
en: 'Fill in the specifications that can be used under the availability zone
of Switch 2; <br>general specifications:<font color=''red''><b>ecs.c5.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: 填写交换机2的可用区下可使用的规格;<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
AssociationPropertyMetadata:
ZoneId: VSwitchZoneId2
EcsGroupSystemDiskSize:
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: 200
EcsGroupSystemDiskCategory:
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_efficiency
AllowedValues:
- cloud_efficiency
- cloud_ssd
- cloud
- cloud_essd
- ephemeral_ssd
EcsGroupPassword:
Type: String
Label:
en: Login 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
EcsGroupName:
Type: String
Label:
en: Instance/Host Name Prefix
zh-cn: 实例名/主机名前缀
Description:
en: 'The server name created: prefix +StackId.'
zh-cn: 创建出的服务器名称是:前缀+StackId。
Default: DR001
LoadBalancerSpec:
Type: String
Label:
en: Specifications
zh-cn: 规格
Description:
en: Instance specifications, see detail:</b><a href='https://www.alibabacloud.com/help/en/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
SlbListenerPort:
Type: Number
Label:
en: Listening Port
zh-cn: 监听端口
Description:
en: SLB externally provided ports.range of values:1~65535
zh-cn: 负载均衡对外提供的端口。取值范围:1~65535。
Default: 80
MinValue: 1
MaxValue: 65535
SlbListenerBackendServerPort:
Type: Number
Label:
en: Backend Server Port
zh-cn: 后端服务器的端口
Description:
en: 'The ports used at the backend of the SLB instance. value range: 1-65535.'
zh-cn: 负载均衡实例后端使用的端口。取值范围1-65535。
Default: 80
RdsDBInstanceClass:
Type: String
Label:
en: Specifications
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.s2.large
AllowedValues:
- rds.mysql.s2.large
- rds.mysql.s2.xlarge
- rds.mysql.s3.large
- rds.mysql.m1.medium
- rds.mysql.c1.large
- rds.mysql.c1.xlarge
RdsDBInstanceStorage:
Type: Number
Label:
en: Storage Space
zh-cn: 存储空间
Description:
en: 'Database storage space, units: GB, per 5GB increment, value range: 20-1000.'
zh-cn: 数据库存储空间, 单位:GB, 每5GB进行递增,取值范围:20-1000。
Default: 100
MinValue: 20
MaxValue: 1000
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
RdsDBName:
Type: String
Label:
en: Database Name
zh-cn: 数据库名称
Description:
en: The database name created by the instance, consisting of lowercase letters,
numbers, underscores, and middle lines, beginning with letters, ending with
letters or numbers, up to 64 characters.
zh-cn: 实例创建的数据库名称,由小写字母、数字、下划线、中划线组成,以字母开头,字母或数字结尾,最多64个字符。
Default: disaster_recovery
DBCharacterSetName:
Type: String
Label:
en: Database Character Set
zh-cn: 数据库字符集
Description:
en: See details: <a href= 'https://www.alibabacloud.com/help/en/doc-detail/99716.html
' target='_blank' ><b><font color='blue'>Set the table</font></b></a>
zh-cn: 详见: <a href= 'https://help.aliyun.com/document_detail/99716.html ' target='_blank'
><b><font color='blue'>字符集表</font></b></a>
Default: utf8
RdsAccountName:
Type: String
Label:
en: Database Account
zh-cn: 数据库账号
Description:
en: Database read-write account with a maximum of 16 characters, consisting
of lowercase letters, Numbers, underscores, beginning letters, and ending
letters or Numbers.
zh-cn: 数据库可读写的账号,最长16个字符, 由小写字母,数字、下划线组成、字母开头,字母或数字结尾。
Default: rds_db_test_name
RdsAccountPwd:
Type: String
Label:
en: Account Password
zh-cn: 数据库帐号密码
Description:
en: 'Length 8-32 characters, can contain size letters, Numbers and special symbols
(including:!@ # $% ^ & * - + = _).'
zh-cn: 长度8-32个字符,可包含大小字母、数字及特殊符号(包含:!@#$%^&*-+=_)。
ConstraintDescription:
en: '8-32 characters, can contain size letters, Numbers and special symbols
(including:!@ # $% ^ & * - + = _).'
zh-cn: 8-32个字符,可包含大小字母、数字及特殊符号(包含:!@#$%^&*-+=_)。
MinLength: '8'
MaxLength: '32'
NoEcho: true
SecurityGroupName:
Type: String
Label:
en: Security Group Name
zh-cn: 安全组名称
Description:
en: English or Chinese characters of length [2, 128] must begin with a large
or small letter or Chinese characters, and may contain letters, characters,
Numbers, dots (.), underscores (_), and hyphens (-).You cannot begin with
http:// and https://.
zh-cn: 长度为 [2, 128] 英文或中文字符,必须以大小字母或中文开头,可包含字母,汉字、数字,点(.)、下划线(_)、和连字符(-)。不能以
http:// 和 https:// 开头。
Default: Backup_Sg
VSwitch2Name:
Type: String
Label:
en: Name of VSw-2
zh-cn: VSw-2名称
Description:
en: Vsw-2 name, length [2, 128], starting with upper and lower case letters
or Chinese characters, can contain English letters, Chinese characters, Numbers,
underscores (_) and hyphens (-), not http:// or https://.
zh-cn: VSw-2名称,长度为[2, 128],以大小写字母或汉字开头,可包含英文字母、汉字、数字、下划线(_)和连字符(-),不能以http://或https://开头。
Default: switch002
Resources:
Vpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock:
Ref: VpcCidrBlock
VpcName:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
Metadata:
ALIYUN::ROS::Designer:
id: 64ce5a7e-106a-4179-b395-298b5bd120d0
EcsSecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: Vpc
SecurityGroupName:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
Tags:
- Key: best_practice
Value: '016'
DependsOn: Vpc
Metadata:
ALIYUN::ROS::Designer:
id: c41cca8e-45b3-42ff-b29d-8cd345fc3453
VSwitch1:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: VSwitchZoneId1
VpcId:
Ref: Vpc
CidrBlock:
Ref: VSw1CidrBlock
VSwitchName:
Fn::Join:
- '-'
- - VSwitch1
- StackId
- Ref: ALIYUN::StackId
DependsOn: Vpc
Metadata:
ALIYUN::ROS::Designer:
id: 1b6561cb-706a-4ffc-82e2-cd48689be472
EcsInstanceGroup1:
Type: ALIYUN::ECS::InstanceGroup
Properties:
VpcId:
Ref: Vpc
VSwitchId:
Ref: VSwitch1
SecurityGroupId:
Ref: EcsSecurityGroup
ImageId:
Ref: EcsGroupImageId
AllocatePublicIP: false
HostName:
Fn::Join:
- ''
- - Group1
- Ref: EcsGroupName
- -[0,3]
InstanceChargeType: PostPaid
InstanceName:
Fn::Join:
- ''
- - Group1
- Ref: EcsGroupName
- -[0,3]
InstanceType:
Ref: EcsGroupInstanceType1
IoOptimized: optimized
MaxAmount:
Ref: Ecs1GroupMaxAmount
Password:
Ref: EcsGroupPassword
SystemDiskCategory:
Ref: EcsGroupSystemDiskCategory
SystemDiskSize:
Ref: EcsGroupSystemDiskSize
Tags:
- Key: best_practice
Value: '016'
Metadata:
ALIYUN::ROS::Designer:
id: 21352596-550a-435c-831a-0b600703dbc8
VSwitch2:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: VSwitchZoneId2
VpcId:
Ref: Vpc
CidrBlock:
Ref: VSw2CidrBlock
VSwitchName:
Fn::Join:
- '-'
- - VSwitch2
- StackId
- Ref: ALIYUN::StackId
DependsOn: Vpc
Metadata:
ALIYUN::ROS::Designer:
id: ae55b240-ef17-441b-b580-fefaf5e30cfe
EcsInstanceGroup2:
Type: ALIYUN::ECS::InstanceGroup
Properties:
VpcId:
Ref: Vpc
VSwitchId:
Ref: VSwitch2
SecurityGroupId:
Ref: EcsSecurityGroup
ImageId:
Ref: EcsGroupImageId
AllocatePublicIP: false
HostName:
Fn::Join:
- ''
- - Group2
- Ref: EcsGroupName
- -[0,3]
InstanceChargeType: PostPaid
InstanceName:
Fn::Join:
- ''
- - Group2
- Ref: EcsGroupName
- -[0,3]
InstanceType:
Ref: EcsGroupInstanceType2
IoOptimized: optimized
MaxAmount:
Ref: Ecs2GroupMaxAmount
Password:
Ref: EcsGroupPassword
SystemDiskCategory:
Ref: EcsGroupSystemDiskCategory
SystemDiskSize:
Ref: EcsGroupSystemDiskSize
Tags:
- Key: best_practice
Value: '016'
Metadata:
ALIYUN::ROS::Designer:
id: 0cf2173b-54f4-4b48-937f-a17218ee65bf
Rds:
Type: ALIYUN::RDS::DBInstance
Properties:
VpcId:
Ref: Vpc
VSwitchId:
Ref: VSwitch1
DBInstanceClass:
Ref: RdsDBInstanceClass
DBInstanceStorage:
Ref: RdsDBInstanceStorage
DBMappings:
- CharacterSetName:
Ref: DBCharacterSetName
DBName:
Ref: RdsDBName
Engine:
Fn::Select:
- '0'
- Fn::Split:
- '-'
- Ref: DBInstanceEngineAndVersion
EngineVersion:
Fn::Select:
- '1'
- Fn::Split:
- '-'
- Ref: DBInstanceEngineAndVersion
SecurityIPList:
Ref: VpcCidrBlock
Tags:
Key: best_practice
Value: '016'
Metadata:
ALIYUN::ROS::Designer:
id: 2e9aa3b4-6252-4ec0-a81d-412a2af5a27d
RdsAccount:
Type: ALIYUN::RDS::Account
Properties:
AccountName:
Ref: RdsAccountName
AccountPassword:
Ref: RdsAccountPwd
AccountType: Normal
DBInstanceId:
Ref: Rds
DependsOn: Rds
Metadata:
ALIYUN::ROS::Designer:
id: 5db194e4-be20-4069-b433-288d42efd6fa
RdsAccountPrivilege:
Type: ALIYUN::RDS::AccountPrivilege
Properties:
AccountName:
Ref: RdsAccountName
AccountPrivilege: ReadWrite
DBInstanceId:
Ref: Rds
DBName:
Ref: RdsDBName
DependsOn: RdsAccount
Metadata:
ALIYUN::ROS::Designer:
id: 4c35ff7b-7d63-49a5-9f86-da92587749b3
Slb:
Type: ALIYUN::SLB::LoadBalancer
Properties:
VpcId:
Ref: Vpc
AddressType: internet
LoadBalancerName:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
LoadBalancerSpec:
Ref: LoadBalancerSpec
MasterZoneId:
Ref: VSwitchZoneId1
Tags:
- Key: best_practice
Value: '016'
Metadata:
ALIYUN::ROS::Designer:
id: be6329df-2d7f-420d-89ee-8f674a3aabde
SlbBackendServerAttachment:
Type: ALIYUN::SLB::BackendServerAttachment
Properties:
BackendServerList:
Fn::ListMerge:
- Fn::GetAtt:
- EcsInstanceGroup1
- InstanceIds
- Fn::GetAtt:
- EcsInstanceGroup2
- InstanceIds
BackendServerWeightList:
- 100
LoadBalancerId:
Ref: Slb
DependsOn:
- EcsInstanceGroup1
- EcsInstanceGroup2
Metadata:
ALIYUN::ROS::Designer:
id: 1f751543-f3d2-41cc-8978-0e54c92a7480
SlbListener:
Type: ALIYUN::SLB::Listener
Properties:
BackendServerPort:
Ref: SlbListenerBackendServerPort
Bandwidth: -1
HealthCheck:
HealthyThreshold: 3
HttpCode: http_2xx,http_3xx,http_4xx,http_5xx
Interval: 2
Port: 80
Timeout: 5
URI: /
UnhealthyThreshold: 3
ListenerPort:
Ref: SlbListenerPort
LoadBalancerId:
Ref: Slb
Persistence:
CookieTimeout: 60
PersistenceTimeout: 180
StickySession: 'on'
StickySessionType: insert
XForwardedFor: 'off'
Protocol: http
Metadata:
ALIYUN::ROS::Designer:
id: fe7a1b3e-6ad4-4394-8263-6e74f1ebb7f6
Outputs:
Ecs1HostNames:
Description:
en: List of server host names under switch 1
zh-cn: 交换机1下的服务器主机名称列表
Value:
Fn::GetAtt:
- EcsInstanceGroup1
- HostNames
Ecs1InstanceIds:
Description:
en: List of server instance IDs under switch 1
zh-cn: 交换机1下的服务器实例ID列表
Value:
Fn::GetAtt:
- EcsInstanceGroup1
- InstanceIds
Ecs1PrivateIps:
Description:
en: Server private network IP list under switch 1
zh-cn: 交换机1下的服务器私网IP列表
Value:
Fn::GetAtt:
- EcsInstanceGroup1
- PrivateIps
Ecs2HostNames:
Description:
en: List of server host names under switch 2
zh-cn: 交换机2下的服务器主机名称列表
Value:
Fn::GetAtt:
- EcsInstanceGroup2
- HostNames
Ecs2InstanceIds:
Description:
en: List of server IDs under switch 2
zh-cn: 交换机2下的服务器ID列表
Value:
Fn::GetAtt:
- EcsInstanceGroup2
- InstanceIds
Ecs2PrivateIps:
Description:
en: Server private network IP list under switch 2
zh-cn: 交换机2下的服务器私网IP列表
Value:
Fn::GetAtt:
- EcsInstanceGroup2
- PrivateIps
RdsDBInstanceId:
Description:
en: Database Instance ID
zh-cn: 数据库实例ID
Value:
Fn::GetAtt:
- Rds
- DBInstanceId
RdsInnerConnectionString:
Description:
en: Database instance Intranet connection string
zh-cn: 数据库实例内网连接串
Value:
Fn::GetAtt:
- Rds
- InnerConnectionString
RdsInnerIPAddress:
Description:
en: Database instance Intranet Ip
zh-cn: 数据库实例内网Ip
Value:
Fn::GetAtt:
- Rds
- InnerIPAddress
RdsInnerPort:
Description:
en: Intranet port for the database instance
zh-cn: 数据库实例的内网端口
Value:
Fn::GetAtt:
- Rds
- InnerPort
RdsNormalAccountName:
Description:
en: Database common account name
zh-cn: 数据库普通账号名称
Value:
Fn::GetAtt:
- RdsAccount
- AccountName
SLbNetworkType:
Description:
en: SLB Network Type
zh-cn: SLB网络类型
Value:
Fn::GetAtt:
- Slb
- NetworkType
SlbAddressType:
Description:
en: Load balancing address type
zh-cn: 负载均衡地址类型
Value:
Fn::GetAtt:
- Slb
- AddressType
SlbBackendServers:
Description:
en: SLB Backend Servers
zh-cn: 负载均衡后端服务器组
Value:
Fn::GetAtt:
- SlbBackendServerAttachment
- BackendServers
SlbInstanceId:
Description:
en: SLB Instance ID
zh-cn: 负载均衡实例ID
Value:
Fn::GetAtt:
- Slb
- LoadBalancerId
SlbIpAddress:
Description:
en: SLB Ip Address
zh-cn: 负载均衡ip地址
Value:
Fn::GetAtt:
- Slb
- IpAddress
SlbListenerPortsAndProtocol:
Description:
en: Load balancing ports and protocols
zh-cn: 负载均衡端口和协议
Value:
Fn::GetAtt:
- SlbListener
- ListenerPortsAndProtocol
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- VpcCidrBlock
- VSwitchZoneId1
- VSw1CidrBlock
- VSwitchZoneId2
- VSw2CidrBlock
Label:
default: VPC
- Parameters:
- Ecs1GroupMaxAmount
- Ecs2GroupMaxAmount
- EcsGroupImageId
- EcsGroupInstanceType1
- EcsGroupInstanceType2
- EcsGroupSystemDiskSize
- EcsGroupSystemDiskCategory
- EcsGroupPassword
- EcsGroupName
Label:
default: ECS
- Parameters:
- LoadBalancerSpec
- SlbListenerPort
- SlbListenerBackendServerPort
Label:
default: SLB
- Parameters:
- RdsDBInstanceClass
- RdsDBInstanceStorage
- DBInstanceEngineAndVersion
- RdsDBName
- DBCharacterSetName
- RdsAccountName
- RdsAccountPwd
Label:
default: RDS
TemplateTags:
- acs:solution:备份&容灾:同地域跨可用区容灾-搭建电商网站
ALIYUN::ROS::Designer:
00e302ff-f8f5-4f94-ab15-eea62dda87ef:
source:
id: 21352596-550a-435c-831a-0b600703dbc8
target:
id: c41cca8e-45b3-42ff-b29d-8cd345fc3453
z: 1
0cf2173b-54f4-4b48-937f-a17218ee65bf:
position:
x: 250
y: 174
size:
height: 60
width: 60
z: 2
1b6561cb-706a-4ffc-82e2-cd48689be472:
embeds:
- 2e9aa3b4-6252-4ec0-a81d-412a2af5a27d
- 21352596-550a-435c-831a-0b600703dbc8
- be6329df-2d7f-420d-89ee-8f674a3aabde
position:
x: 350
y: 129
size:
height: 170
width: 353
z: 1
1f751543-f3d2-41cc-8978-0e54c92a7480:
position:
x: 303
y: 12
size:
height: 60
width: 60
z: 0
21352596-550a-435c-831a-0b600703dbc8:
position:
x: 364
y: 174
size:
height: 60
width: 60
z: 2
2e9aa3b4-6252-4ec0-a81d-412a2af5a27d:
position:
x: 620
y: 171
size:
height: 60
width: 60
z: 2
4c35ff7b-7d63-49a5-9f86-da92587749b3:
position:
x: 794
y: 115
size:
height: 60
width: 60
z: 0
4dd77bc9-1922-4408-ac5b-668022b3f46e:
source:
id: 1f751543-f3d2-41cc-8978-0e54c92a7480
target:
id: be6329df-2d7f-420d-89ee-8f674a3aabde
z: 1
56b113f9-17a7-462a-839d-67d547fb811b:
source:
id: fe7a1b3e-6ad4-4394-8263-6e74f1ebb7f6
target:
id: be6329df-2d7f-420d-89ee-8f674a3aabde
z: 1
5db194e4-be20-4069-b433-288d42efd6fa:
position:
x: 794
y: 237
size:
height: 60
width: 60
z: 0
64ce5a7e-106a-4179-b395-298b5bd120d0:
embeds:
- ae55b240-ef17-441b-b580-fefaf5e30cfe
- c41cca8e-45b3-42ff-b29d-8cd345fc3453
- 1b6561cb-706a-4ffc-82e2-cd48689be472
position:
x: 204
y: 91
size:
height: 339
width: 558.5
z: 0
64e12d25-3829-429c-85a0-23084b540296:
source:
id: 4c35ff7b-7d63-49a5-9f86-da92587749b3
target:
id: 2e9aa3b4-6252-4ec0-a81d-412a2af5a27d
z: 1
7b4f3b88-38bd-4591-96fa-43503d9d52c2:
source:
id: 1f751543-f3d2-41cc-8978-0e54c92a7480
target:
id: 64ce5a7e-106a-4179-b395-298b5bd120d0
z: 1
7e97134d-6612-4dab-8208-e2184822ba1d:
source:
id: 1f751543-f3d2-41cc-8978-0e54c92a7480
target:
id: 1b6561cb-706a-4ffc-82e2-cd48689be472
z: 1
7f06ead7-0077-43d7-b80b-88eb1d9a8903:
source:
id: 5db194e4-be20-4069-b433-288d42efd6fa
target:
id: 2e9aa3b4-6252-4ec0-a81d-412a2af5a27d
z: 1
99bc412e-2f83-4943-ab98-81cedb703cce:
source:
id: 1f751543-f3d2-41cc-8978-0e54c92a7480
target:
id: 64ce5a7e-106a-4179-b395-298b5bd120d0
z: 1
aa93232b-e272-4736-a2fb-ac9b647e6d6d:
source:
id: 0cf2173b-54f4-4b48-937f-a17218ee65bf
target:
id: c41cca8e-45b3-42ff-b29d-8cd345fc3453
z: 1
ae55b240-ef17-441b-b580-fefaf5e30cfe:
embeds:
- 0cf2173b-54f4-4b48-937f-a17218ee65bf
position:
x: 227
y: 130
size:
height: 170
width: 117
z: 1
b89818f0-7be5-4def-a3b6-9a0d4ff45b15:
source:
id: 1f751543-f3d2-41cc-8978-0e54c92a7480
target:
id: 1b6561cb-706a-4ffc-82e2-cd48689be472
z: 1
bcd81424-671f-4d64-9693-748ab4d645ec:
source:
id: 1f751543-f3d2-41cc-8978-0e54c92a7480
target:
id: 1b6561cb-706a-4ffc-82e2-cd48689be472
z: 1
be6329df-2d7f-420d-89ee-8f674a3aabde:
position:
x: 533
y: 172
size:
height: 60
width: 60
z: 2
c41cca8e-45b3-42ff-b29d-8cd345fc3453:
position:
x: 303
y: 338
size:
height: 60
width: 60
z: 1
eeb5eaad-a867-4932-a60f-567e8f2b0efa:
source:
id: 1f751543-f3d2-41cc-8978-0e54c92a7480