forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
zero-loss-of-trading-system-data.yml
928 lines (924 loc) · 28 KB
/
zero-loss-of-trading-system-data.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
ROSTemplateFormatVersion: '2015-09-01'
Description:
en: Best Practices for Zero Loss of Data in Small and Medium-sized Company Trading
Systems - Environment Deployment on the Cloud.
zh-cn: 中小型公司交易系统数据零丢失最佳实践 - 云上环境部署。
Parameters:
CidrBlock:
Type: String
Label:
en: VPC CIDR Block
zh-cn: 专有网络网段
Description:
en: 'The IP address range of the VPC in the CIDR Block form, 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地址段范围,您可以使用以下的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
VswCidrBlock:
Type: String
Label:
en: VSwitch CIDR Block
zh-cn: 交换机网段
Description:
en: Must be a subnet segment that belongs to a proprietary network and is not
occupied by another VSwitch.
zh-cn: 必须是所属专有网络的子网段,并且没有被其他交换机占用。
Default: 192.168.0.0/24
ZoneId:
Type: String
Label:
en: Available Zone
zh-cn: 可用区
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、SLB resources</font></b>
zh-cn: 可用区ID。<br><b>注: <font color='blue'>选择可用区前请确认该可用区是否支持创建ECS、RDS、SLB资源的规格</font></b>
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
ImageId:
Type: String
Label:
en: Image
zh-cn: 镜像
Description:
en: 'Server instance Image ID. see detail: <b><a href=''https://www.alibabacloud.com/help/doc-detail/112977.html''
target=''_blank''><font color=''blue''>Find the mirror</font></a></b>'
zh-cn: 服务器镜像,详见:<b><a href='https://help.aliyun.com/document_detail/112977.html'
target='_blank'><font color='blue'>查找镜像</font></a></b>
AssociationProperty: ALIYUN::ECS::Instance:ImageId
Default: centos_7_06_64_20G_alibase_20190711.vhd
InstanceType:
Type: String
Label:
en: Specifications
zh-cn: 规格
Description:
en: 'Fill in specifications that can be used under the VSwitch availability
zone;</b></font><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: 填写VSwitch可用区下可使用的规格;<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: ZoneId
LoginPassword:
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: Server login password, 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
ECSAmount:
Type: Number
Label:
en: ECS Amount
zh-cn: ECS实例数量
Description:
en: 'Amount of ECS, Valid values: 1~100.'
zh-cn: 取值范围:1~100
ConstraintDescription:
en: 'Amount of ECS, Valid values: 1~100.'
zh-cn: 取值范围:1~100
Default: 3
MinValue: 1
MaxValue: 100
DiskSize:
Type: Number
Label:
en: Data Disk Size
zh-cn: 数据盘空间
Description:
en: 'Data disk size, Valid values: 40~500, unit: GB. '
zh-cn: 数据盘大小,取值范围:40~500,单位:GB。
ConstraintDescription:
en: 'Data disk size, Valid values: 40~500, unit: GB. '
zh-cn: 数据盘大小,取值范围:40~500,单位:GB。
Default: 40
MinValue: 40
MaxValue: 500
DiskCategory:
Type: String
Label:
en: Data 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
SystemDiskSize:
Type: Number
Label:
en: System Disk Size
zh-cn: 系统盘空间
Description:
en: 'System disk size, Valid values: 40~500. Unit: GB'
zh-cn: 系统盘大小,取值范围:40~500。单位:GB
ConstraintDescription:
en: 'System disk size, Valid values: 40~500. Unit: GB'
zh-cn: 系统盘大小,取值范围:40~500。单位:GB
Default: 40
MinValue: 20
MaxValue: 500
SystemDiskCategory:
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_efficiency
- cloud_ssd
- cloud
- cloud_essd
- ephemeral_ssd
InstanceNamePrefix:
Type: String
Label:
en: Instance Name
zh-cn: 实例名称
Description:
en: 2-125 characters, beginning with upper or lower case English or Chinese,
may contain Numbers, underscores (_), dots (.), or hyphens (-).
zh-cn: 2-125个字符,以大小写英文或中文开头,可包含数字、下划线(_)、点(.)或连字符(-)。
ConstraintDescription:
en: 2-125 characters, beginning with upper or lower case English or Chinese,
may contain Numbers, underscores (_), dots (.), or hyphens (-).
zh-cn: 2-125个字符,以大小写英文或中文开头,可包含数字、下划线(_)、点(.)或连字符(-)。
Default: App
MinLength: 2
MaxLength: 125
HostNamePrefix:
Type: String
Label:
en: Host Name
zh-cn: 主机名
Description:
en: 2-61 characters, beginning with upper or lower case English or Chinese,
may contain Numbers, underscores (_), dots (.), or hyphens (-).
zh-cn: 2-61个字符,以大小写英文或中文开头,可包含数字、下划线(_)、点(.)或连字符(-)。
ConstraintDescription:
en: 2-61 characters, beginning with upper or lower case English or Chinese,
may contain Numbers, underscores (_), dots (.), or hyphens (-).
zh-cn: 2-61个字符,以大小写英文或中文开头,可包含数字、下划线(_)、点(.)或连字符(-)。
Default: App
MinLength: 2
MaxLength: 61
PayType:
Type: String
Label:
en: Pay Type
zh-cn: 付费方式
Description:
en: Pay type of SLB.
zh-cn: SLB实例的计费类型。
Default: PayOnDemand
AllowedValues:
- PayOnDemand
- PrePay
AddressType:
Type: String
Label:
en: SLB Address Type
zh-cn: 负载均衡地址类型
Description:
en: AddressType of SLB
zh-cn: 负载均衡地址类型
Default: internet
AllowedValues:
- internet
- intranet
SLB_InternetChargeType:
Type: String
Label:
en: Internet ChargeType
zh-cn: 公网类型实例付费方式
Description:
en: ' Allowed Values: <br>[paybybandwidth: <font color=''green''>pay by bandwidth</font>]<br>[paybytraffic:
<font color=''green''>pay by traffic</font>]'
zh-cn: '可选值:<br>[paybybandwidth: <font color=''green''>按固定带宽计费</font>]<br>[paybytraffic:<font
color=''green''>按使用流量计费</font>]'
Default: paybytraffic
AllowedValues:
- paybybandwidth
- paybytraffic
LoadBalancerSpec:
Type: String
Label:
en: Specifications
zh-cn: 规格
Description:
en: Specification for SLB, for more info, please refer to <a href='https://www.alibabacloud.com/help/doc-detail/85931.htm'
target='_blank'>SLB Instance Overview<a>.
zh-cn: 负载均衡实例的规格,详情请参见<a href='https://help.aliyun.com/document_detail/85931.html'
target='_blank'>实例概述<a>。
Default: slb.s2.medium
LoadBalancerName:
Type: String
Label:
en: SLB Name
zh-cn: 负载均衡名称
Description:
en: SLB Name, contains of 1 to 80 characters, can contains underlines.
zh-cn: 负载均衡实例的名称,长度为1~80个字符,可以包含下划线。
ConstraintDescription:
en: SLB Name, contains of 1 to 80 characters, can contains underlines.
zh-cn: 负载均衡实例的名称,长度为1~80个字符,可以包含下划线。
Default: SLB_HZ_APP01
MinLength: 1
MaxLength: 80
Protocol:
Type: String
Label:
en: SLB IP Protocol
zh-cn: 负载均衡协议
Description:
en: IP Protocol
zh-cn: IP协议
Default: tcp
AllowedValues:
- tcp
- udp
- http
- https
ListenerPort:
Type: Number
Label:
en: Listener Port
zh-cn: 监听端口
Description:
en: 'Port of SLB Listening to, Value range: 1~65535.'
zh-cn: 负载均衡监听端口,可选值:1~65535
ConstraintDescription:
en: 'Port of SLB Listening to, Valid values: 1~65535.'
zh-cn: 负载均衡监听端口,可选值:1~65535
Default: 80
MinValue: 1
MaxValue: 65535
SLBBackendServerPort:
Type: Number
Label:
en: SLB Backend Server Port
zh-cn: 负载均衡对外服务的端口
Description:
en: 'The ports used at the back end of the load balancing instance, Valid values:
1~65535.'
zh-cn: 负载均衡实例后端使用的端口,可选值:1-65535。
ConstraintDescription:
en: 'The ports used at the back end of the load balancing instance, Valid values:
1~65535.'
zh-cn: 负载均衡实例后端使用的端口,可选值:1-65535。
Default: 80
MinValue: 1
MaxValue: 65535
DBInstanceEngineAndVersion:
Type: String
Label:
en: DB 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
DBInstanceClass:
Type: String
Label:
en: Specifications
zh-cn: 规格
Description:
en: Before filling in the form, please first confirm the inventory status of
the model under the available area and confirm whether it supports the creation
of an instance of the Enterprise Edition.For more infomation, please refer
to <a href='https://www.alibabacloud.com/help/doc-detail/26312.htm' target='_blank'><b><font
color='blue'>Primary instance types</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.s3.large
DBInstanceStorage:
Type: Number
Label:
en: DB Instance Storage
zh-cn: 存储空间
Description:
en: 'Database storage space, unit: GB, increasing every 5GB, valid value: 50-1000.'
zh-cn: 数据库存储空间, 单位:GB, 每5GB进行递增,取值范围:50-1000。
ConstraintDescription:
en: 'Database storage space, unit: GB, increasing every 5GB, valid value: 50-1000.'
zh-cn: 数据库存储空间, 单位:GB, 每5GB进行递增,取值范围:50-1000。
Default: 50
MinValue: 50
MaxValue: 1000
DBName:
Type: String
Label:
en: DB Name
zh-cn: 数据库名称
Description:
en: Database name, consisting of lowercase letters, Numbers, and special characters
(-_), starting with letters, ending with letters or Numbers, up to 64 characters.
zh-cn: 数据库名称,由小写字母、数字及特殊字符(-_)组成,以字母开头,字母或数字结尾,最多64个字符。
Default: demodb
RdsUserName:
Type: String
Label:
en: RDS Account
zh-cn: 数据库账号
Description:
en: Consists of lowercase letters, Numbers, and underscores, beginning with
letters, ending with letters or Numbers, up to 16 characters, and at least
2 characters.
zh-cn: 由小写字母,数字、下划线组成,以字母开头,字母或数字结尾,最多16个字符,最少2个字符。
ConstraintDescription:
en: Consists of lowercase letters, Numbers, and underscores, beginning with
letters, ending with letters or Numbers, up to 16 characters, and at least
2 characters.
zh-cn: 由小写字母,数字、下划线组成,以字母开头,字母或数字结尾,最多16个字符,最少2个字符。
Default: admin_dba
MinLength: 2
MaxLength: 16
RdsUserType:
Type: String
Label:
en: RDS Account Type
zh-cn: 账号类型
Description:
en: 'Database account type, <b><font color=''blue''>AllowedValues: </font></b><br>[Normal:
<font color=''green''>Ordinary account</font>]<br>[Super: <font color=''green''>High-privilege
account</font>]'
zh-cn: '数据库账号类型,<b><font color=''blue''>可选值:</font></b><br>[Normal: <font color=''green''>普通账号</font>]<br>[Super:
<font color=''green''>高权限账号</font>]'
Default: Super
AllowedValues:
- Super
- Normal
RdsUserPassword:
Type: String
Label:
en: RDS Password
zh-cn: 账号密码
Description:
en: 'Large/lowercase letters, Numbers and special characters take up three kinds,
and the length is 8-32 bits. Special characters included! @ # $% ^ & * ()
_ + - ='
zh-cn: 大/小写字母、数字、特殊字符占三种,长度8-32位;特殊字符包含!@#$%^&*()_+-=
ConstraintDescription:
en: 'Large/lowercase letters, Numbers and special characters take up three kinds,
and the length is 8-32 bits. Special characters included! @ # $% ^ & * ()
_ + - ='
zh-cn: 大/小写字母、数字、特殊字符占三种,长度8-32位;特殊字符包含!@#$%^&*()_+-=
MinLength: 8
MaxLength: 32
NoEcho: true
PublicIP:
Type: Boolean
Label:
en: Allocate Public IP
zh-cn: 分配公网IP
Description:
en: Whether distribution PublicIP
zh-cn: 是否分配公网IP
Default: true
Resources:
EcsVpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock:
Ref: CidrBlock
VpcName:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
Metadata:
ALIYUN::ROS::Designer:
id: 2b70f14b-74e2-4bfe-8443-06dfd4219dbc
EcsSecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: EcsVpc
SecurityGroupEgress:
- DestCidrIp: 0.0.0.0/0
IpProtocol: all
NicType: intranet
PortRange: -1/-1
Priority: 1
SecurityGroupIngress:
- IpProtocol: all
NicType: internet
PortRange: -1/-1
Priority: 1
SourceCidrIp: 0.0.0.0/0
SecurityGroupName:
Fn::Sub: RosStack-${ALIYUN::StackName}
Metadata:
ALIYUN::ROS::Designer:
id: 9382c21e-3a66-4e11-aad4-ffb1772f9c58
EcsVSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: EcsVpc
CidrBlock:
Ref: VswCidrBlock
VSwitchName:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
Metadata:
ALIYUN::ROS::Designer:
id: 928b2c5f-365c-4eb7-855a-12a45e5f9f3d
EcsInstanceGroup:
Type: ALIYUN::ECS::InstanceGroup
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch
SecurityGroupId:
Ref: EcsSecurityGroup
ImageId:
Ref: ImageId
AllocatePublicIP:
Ref: PublicIP
DiskMappings:
- Category:
Ref: DiskCategory
Size:
Ref: DiskSize
HostName:
Fn::Join:
- ''
- - Ref: HostNamePrefix
- '[1,3]'
InstanceName:
Fn::Join:
- ''
- - Ref: InstanceNamePrefix
- '[1,3]'
InstanceType:
Ref: InstanceType
IoOptimized: optimized
MaxAmount:
Ref: ECSAmount
MinAmount:
Ref: ECSAmount
Password:
Ref: LoginPassword
SystemDiskCategory:
Ref: SystemDiskCategory
SystemDiskSize:
Ref: SystemDiskSize
Tags:
- Key: best_practice
Value: '005 '
UserData:
Fn::Join:
- ''
- - '#!/bin/sh
'
- 'yum -y install httpd
'
- 'systemctl start httpd
'
- 'yum install -y mysql
'
Metadata:
ALIYUN::ROS::Designer:
id: 8e35afe6-2dba-40bb-a350-822f9230a869
Rds:
Type: ALIYUN::RDS::DBInstance
Properties:
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch
DBInstanceClass:
Ref: DBInstanceClass
DBInstanceStorage:
Ref: DBInstanceStorage
DBMappings:
- CharacterSetName: utf8
DBName:
Ref: DBName
Engine:
Fn::Select:
- '0'
- Fn::Split:
- '-'
- Ref: DBInstanceEngineAndVersion
EngineVersion:
Fn::Select:
- '1'
- Fn::Split:
- '-'
- Ref: DBInstanceEngineAndVersion
MultiAZ: true
SecurityIPList:
Ref: CidrBlock
Tags:
Key: best_practice
Value: '005 '
Metadata:
ALIYUN::ROS::Designer:
id: 97fd9b05-583d-4f89-9ab7-8446413394ae
RdsReadOnlyInstance2:
Type: ALIYUN::RDS::ReadOnlyDBInstance
Properties:
ZoneId:
Ref: ZoneId
VPCId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch
DBInstanceClass:
Ref: DBInstanceClass
DBInstanceId:
Ref: Rds
DBInstanceStorage:
Ref: DBInstanceStorage
EngineVersion:
Fn::Select:
- '1'
- Fn::Split:
- '-'
- Ref: DBInstanceEngineAndVersion
DependsOn: Rds
Metadata:
ALIYUN::ROS::Designer:
id: 857dbcb9-4cd8-45f5-8a38-882b076ea35c
RdsAccount:
Type: ALIYUN::RDS::Account
Properties:
AccountName:
Ref: RdsUserName
AccountPassword:
Ref: RdsUserPassword
AccountType:
Ref: RdsUserType
DBInstanceId:
Ref: Rds
DependsOn: RdsReadOnlyInstance2
Metadata:
ALIYUN::ROS::Designer:
id: 1d28fbc8-4ddd-48b2-b3db-5f467f558197
RdsReadOnlyInstance1:
Type: ALIYUN::RDS::ReadOnlyDBInstance
Properties:
ZoneId:
Ref: ZoneId
VPCId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch
DBInstanceClass:
Ref: DBInstanceClass
DBInstanceId:
Ref: Rds
DBInstanceStorage:
Ref: DBInstanceStorage
EngineVersion:
Fn::Select:
- '1'
- Fn::Split:
- '-'
- Ref: DBInstanceEngineAndVersion
DependsOn: Rds
Metadata:
ALIYUN::ROS::Designer:
id: 59cfa484-a841-43cd-964e-a16753a3e65c
SlbLoadBalancer:
Type: ALIYUN::SLB::LoadBalancer
Properties:
AddressType:
Ref: AddressType
InternetChargeType:
Ref: SLB_InternetChargeType
LoadBalancerName:
Ref: LoadBalancerName
LoadBalancerSpec:
Ref: LoadBalancerSpec
MasterZoneId:
Ref: ZoneId
PayType:
Ref: PayType
Tags:
- Key: best_practice
Value: '005 '
Metadata:
ALIYUN::ROS::Designer:
id: dfa453ed-c50e-4a49-b9b0-22d76bc4047a
SlbBackendServerAttachment:
Type: ALIYUN::SLB::BackendServerAttachment
Properties:
BackendServerList:
Fn::GetAtt:
- EcsInstanceGroup
- InstanceIds
LoadBalancerId:
Fn::GetAtt:
- SlbLoadBalancer
- LoadBalancerId
DependsOn: EcsInstanceGroup
Metadata:
ALIYUN::ROS::Designer:
id: 47fbafff-a71f-4b37-a6ac-c702884a372c
SlbListener:
Type: ALIYUN::SLB::Listener
Properties:
BackendServerPort:
Ref: SLBBackendServerPort
Bandwidth: -1
ListenerPort:
Ref: ListenerPort
LoadBalancerId:
Fn::GetAtt:
- SlbLoadBalancer
- LoadBalancerId
Protocol:
Ref: Protocol
Metadata:
ALIYUN::ROS::Designer:
id: 55505d3b-ab9c-4d07-8e5f-d0018aa644ef
Outputs:
EcsPublicIps:
Value:
Fn::GetAtt:
- EcsInstanceGroup
- PublicIps
RdsAccountName:
Value:
Fn::GetAtt:
- RdsAccount
- AccountName
RdsPublicConnectionString:
Value:
Fn::GetAtt:
- Rds
- PublicConnectionString
RdsPublicPort:
Value:
Fn::GetAtt:
- Rds
- PublicPort
RdsReadOnlyInstance1ConnectionString:
Value:
Fn::GetAtt:
- RdsReadOnlyInstance1
- ConnectionString
RdsReadOnlyInstance1Port:
Value:
Fn::GetAtt:
- RdsReadOnlyInstance1
- Port
RdsReadOnlyInstance2ConnectionString:
Value:
Fn::GetAtt:
- RdsReadOnlyInstance2
- ConnectionString
RdsReadOnlyInstance2Port:
Value:
Fn::GetAtt:
- RdsReadOnlyInstance2
- Port
SlbIpAddress:
Value:
Fn::GetAtt:
- SlbLoadBalancer
- IpAddress
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- CidrBlock
- VswCidrBlock
- ZoneId
Label:
default: VPC
- Parameters:
- ImageId
- InstanceType
- LoginPassword
- ECSAmount
- DiskSize
- DiskCategory
- SystemDiskSize
- SystemDiskCategory
- InstanceNamePrefix
- HostNamePrefix
Label:
default: ECS
- Parameters:
- PayType
- AddressType
- SLB_InternetChargeType
- LoadBalancerSpec
- LoadBalancerName
- Protocol
- ListenerPort
- SLBBackendServerPort
Label:
default: SLB
- Parameters:
- DBInstanceEngineAndVersion
- DBInstanceClass
- DBInstanceStorage
- DBName
- RdsUserName
- RdsUserType
- RdsUserPassword
Label:
default: RDS
TemplateTags:
- 中小型公司交易系统数据零丢失最佳实践 - 云上环境部署
ALIYUN::ROS::Designer:
1d28fbc8-4ddd-48b2-b3db-5f467f558197:
position:
x: 446
y: 10
size:
height: 60
width: 60
z: 0
2b70f14b-74e2-4bfe-8443-06dfd4219dbc:
embeds:
- 928b2c5f-365c-4eb7-855a-12a45e5f9f3d
- 9382c21e-3a66-4e11-aad4-ffb1772f9c58
position:
x: 183
y: 77
size:
height: 481
width: 481.0537109375
z: 0
47fbafff-a71f-4b37-a6ac-c702884a372c:
position:
x: 65
y: 251
size:
height: 60
width: 60
z: 0
55505d3b-ab9c-4d07-8e5f-d0018aa644ef:
position:
x: 65
y: 452
size:
height: 60
width: 60
z: 0
59cfa484-a841-43cd-964e-a16753a3e65c:
position:
x: 518
y: 307
size:
height: 60
width: 60
z: 2
63874fc2-0433-4e01-a3ba-9e2423b96a3c:
source:
id: 55505d3b-ab9c-4d07-8e5f-d0018aa644ef
target:
id: dfa453ed-c50e-4a49-b9b0-22d76bc4047a
z: 1
6b24ae1e-e95a-44ef-a6a3-3b4049c3ee3e:
source:
id: 47fbafff-a71f-4b37-a6ac-c702884a372c
target:
id: 8e35afe6-2dba-40bb-a350-822f9230a869
z: 1
81f13b19-befb-46a8-973b-c96d83c0e5cf:
source:
id: 59cfa484-a841-43cd-964e-a16753a3e65c
target:
id: 97fd9b05-583d-4f89-9ab7-8446413394ae
z: 1
857dbcb9-4cd8-45f5-8a38-882b076ea35c:
position:
x: 377
y: 307
size:
height: 60
width: 60
z: 2
85902be2-f1f2-4ba5-9fd4-c1e842ca6ec2:
source:
id: 857dbcb9-4cd8-45f5-8a38-882b076ea35c
target:
id: 97fd9b05-583d-4f89-9ab7-8446413394ae
z: 1
8e35afe6-2dba-40bb-a350-822f9230a869:
position:
x: 287
y: 251
size:
height: 60
width: 60
z: 2
928b2c5f-365c-4eb7-855a-12a45e5f9f3d:
embeds:
- 8e35afe6-2dba-40bb-a350-822f9230a869
- 97fd9b05-583d-4f89-9ab7-8446413394ae
- 59cfa484-a841-43cd-964e-a16753a3e65c
- 857dbcb9-4cd8-45f5-8a38-882b076ea35c
position:
x: 224
y: 117
size:
height: 324
width: 397
z: 1
9382c21e-3a66-4e11-aad4-ffb1772f9c58:
position:
x: 287
y: 457
size:
height: 60
width: 60
z: 1
97fd9b05-583d-4f89-9ab7-8446413394ae:
position:
x: 446
y: 189
size:
height: 60
width: 60
z: 2
a49220bb-1b99-404c-aed1-d1686818beda:
source:
id: 1d28fbc8-4ddd-48b2-b3db-5f467f558197
target:
id: 97fd9b05-583d-4f89-9ab7-8446413394ae
z: 1
a7323ec2-3782-4924-8b3b-67ee6d569bb8:
source:
id: 8e35afe6-2dba-40bb-a350-822f9230a869
target:
id: 9382c21e-3a66-4e11-aad4-ffb1772f9c58
z: 1
decd2481-c9fc-4b96-abed-6fdfac244edd:
source:
id: 47fbafff-a71f-4b37-a6ac-c702884a372c
target:
id: dfa453ed-c50e-4a49-b9b0-22d76bc4047a
z: 1
dfa453ed-c50e-4a49-b9b0-22d76bc4047a:
position:
x: 65
y: 355
size:
height: 60
width: 60
z: 0