-
Notifications
You must be signed in to change notification settings - Fork 35
/
scaling-simple-ha-infrastructure.yml
152 lines (152 loc) · 5.15 KB
/
scaling-simple-ha-infrastructure.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
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 克隆ECS实例模板:根据源ECS实例配置,创建相同配置的ECS实例组,支持指定数量、负载均衡、新镜像ID等,自动加入SLB。
en: 'Clone ECS Instance Template: Create a group of ECS instances with identical
configurations based on a source ECS instance, supporting specifications such
as quantity, load balancing, and new image ID, with automatic integration into
the SLB.'
Parameters:
LoadBalancerIdToAttach:
Type: String
Label:
en: Load Balancer ID
zh-cn: 负载均衡实例的ID
Description:
en: The existing SLB ID
zh-cn: ECS实例将加入到的负载均衡实例的ID
BackendServerWeight:
Type: Number
Label:
en: Backend Server Weight
zh-cn: 负载均衡器实例权重
Description:
en: The weight of backend server added to SLB
zh-cn: ECS实例在负载均衡器实例中权重
Default: 100
MinValue: 1
MaxValue: 100
SourceInstanceId:
Type: String
Label:
en: Source Instance ID
zh-cn: 源实例 ID
Description:
en: The source ECS instance ID to be cloned
zh-cn: 需要克隆的ECS实例ID
AssociationProperty: ALIYUN::ECS::Instance::InstanceId
NewImageId:
Type: String
Label:
en: ECS Image ID
zh-cn: 镜像ID
Description:
en: Image ID, represents the image resource to startup one ECS instance, <a
href='https://help.aliyun.com/document_detail/112977.html' target='_blank'>View
image resources</a>
zh-cn: '镜像ID,详情请参考: <a href=''https://www.alibabacloud.com/help/doc-detail/112977.html''
target=''_blank''>公共镜像</a>'
AssociationProperty: ALIYUN::ECS::Image::ImageId
AssociationPropertyMetadata:
SupportedImageOwnerAlias:
- system
- self
- others
Default: centos_7_04_64_20G_alibase_201701015.vhd
InstanceName:
Type: String
Label:
en: ECS Instance Name
zh-cn: 实例名称
Description:
en: '[2, 128] alphanumeric letters, underline, dot or hyphen'
zh-cn: 实例名称。最长128个字符,可包含英文、中文、数字、下划线(_)、点号(.)和连字符(-)。
ConstraintDescription:
en: '[2, 128] characters, consists of uppercase letter, lowercase letter, number
or special characters.'
zh-cn: '[2, 128] 个字符,由大写字母、小写字母、数字或特殊字符组成。'
Default: ClonedECS
MinLength: 2
MaxLength: 128
MaxAmount:
Type: Number
Label:
en: The Max Amount of ECS Instances
zh-cn: 实例的最大数量
Description:
en: The maximum of ECS instances, must be greater than or equal to the minimum.
zh-cn: 一次性创建ECS实例的最大个数,必须大于或等于一次性创建ECS实例的最小个数。
ConstraintDescription:
en: An integer within [1, 100]
zh-cn: '[1, 100] 内的整数'
Default: 1
MinValue: 1
MaxValue: 100
Password:
Type: String
Label:
en: ECS Instance Password
zh-cn: ECS实例密码
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; special characters include: ()`~!@#$%^&*_-+=|{}[]:;''<>,.?/'
zh-cn: 长度8-30,必须包含大写字母、小写字母、数字、特殊符号三种;特殊字符包括:()`~!@#$%^&*_-+=|{}[]:;' <>,.?/
AllowedPattern: '[0-9A-Za-z\_\-&:;''<>,=%`~!@#\(\)\$\^\*\+\|\{\}\[\]\.\?\/]+$'
MinLength: 8
MaxLength: 30
NoEcho: true
Resources:
ECSInstanceGroup:
Type: ALIYUN::ECS::InstanceGroupClone
Properties:
ImageId:
Ref: NewImageId
BackendServerWeight:
Ref: BackendServerWeight
InstanceName:
Ref: InstanceName
LoadBalancerIdToAttach:
Ref: LoadBalancerIdToAttach
MaxAmount:
Ref: MaxAmount
Password:
Ref: Password
SourceInstanceId:
Ref: SourceInstanceId
Outputs:
InstanceIds:
Description: The instance id list of created ecs instance
Value:
Fn::GetAtt:
- ECSInstanceGroup
- InstanceIds
PublicIps:
Description: Public IP address list of created ecs instance.
Value:
Fn::GetAtt:
- ECSInstanceGroup
- PublicIps
ZoneIds:
Description: Zone id of created instance.
Value:
Fn::GetAtt:
- ECSInstanceGroup
- ZoneIds
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- LoadBalancerIdToAttach
- BackendServerWeight
- SourceInstanceId
- NewImageId
- InstanceName
- MaxAmount
- Password
Label:
default: ECS
TemplateTags:
- acs:example:弹性计算:指定数量克隆ECS实例的数量并加入到指定的SLB中