-
Notifications
You must be signed in to change notification settings - Fork 35
/
rds-with-ecs-in-iplist.yml
421 lines (421 loc) · 12.1 KB
/
rds-with-ecs-in-iplist.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
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建RDS实例搭配ECS实例,配置内网访问,含VPC、交换机及安全组设置。
en: Create an RDS instance paired with an ECS instance, configured for internal
network access, including VPC, switch, and security group settings.
Parameters:
VpcName:
Type: String
Label:
en: VPC Name
zh-cn: 虚拟专有网络名称
Description:
en: VPC name, 2 to 128 characters in length, beginning with size letters or
Chinese characters, including Numbers, '_' or '-'.
zh-cn: VPC名称,长度为2-128个字符,以大小字母或中文开头,可包含数字、“_”或“-”。
ConstraintDescription:
en: '[2, 128] English or Chinese characters'
zh-cn: '[2, 128] 英文或中文字符'
Default: MyVpc
MinLength: 2
MaxLength: 128
VpcCidrBlock:
Type: String
Label:
en: VPC Cidrblock
zh-cn: VPC网段
Description:
en: 'The IP address range of the VPC in the CIDR block form. You can use the
following IP address ranges and their subnets: 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16'
zh-cn: 专有网络的网段,可选值:10.0.0.0/8,172.16.0.0/12,192.168.0.0/16。
Default: 192.168.0.0/16
AllowedValues:
- 192.168.0.0/16
- 172.16.0.0/12
- 10.0.0.0/8
VSwitchCidrBlock:
Type: String
Label:
en: VSwitch CidrBlock
zh-cn: VSwitch网段
Description:
en: VSwitch subnet which is within VPC.
zh-cn: 交换机网段,必须为VPC子网段。
Default: 192.168.1.0/24
ZoneId:
Type: String
Label:
en: Zone ID
zh-cn: 可用区ID
Description:
en: The available zone ID, you should confirm the zone support ECS、VPC、VSwitch
or not.
zh-cn: 可用区ID,需确认所选可用区下是否支持ECS、VPC、VSwitch等资源。
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
ImageId:
Type: String
Label:
en: Image ID
zh-cn: 镜像ID
Description:
en: Image ID, represents the image resource to startup one ECS instance, <font><a
href='https://www.alibabacloud.com/help/doc-detail/112977.html' target='_blank'><b>View
image resources</b></font color='blue'></a>
zh-cn: 镜像ID,ECS实例的镜像资源, <font><a href='https://help.aliyun.com/document_detail/112977.html'
target='_blank'><b>查看镜像资源</b></font color='blue'></a>
AssociationProperty: ALIYUN::ECS::Image::ImageId
AssociationPropertyMetadata:
InstanceType: ${InstanceType}
SupportedImageOwnerAlias:
- system
- self
- others
Default: centos_7_04_64_20G_alibase_201701015.vhd
InstanceType:
Type: String
Label:
en: Instance Type
zh-cn: 实例规格
Description:
en: <font color='blue'><b>1.Before selecting the model please confirm that the
current available zone under the model is in stock, some models need to be
reported in advance</b></font><br><font color='blue'><b>2.List of optional
models</font><br></b></font>[ecs.c5.large <font color='green'>2vCPU 4GiB Intranet
bandwidth1Gbps In-grid sending and receiving packages30MillionPPS</font>]<br></b>[ecs.c5.xlarge
<font color='green'>4vCPU 8GiB Intranet bandwidth1.5Gbps In-grid sending and
receiving packages50MillionPPS</font>]<br></b>[ecs.c5.2xlarge <font color='green'>8vCPU
16GiB Intranet bandwidth2.5Gbps In-grid sending and receiving packages80MillionPPS</font>]
zh-cn: <font color='blue'><b>1.选择机型前请先确认当前可用区下该机型是否有货,部分机型需要提前报备</b></font><br><font
color='blue'><b>2.可选机型列表</font><br></b></font>[ecs.c5.large <font color='green'>2vCPU
4GiB 内网带宽1Gbps 内网收发包30万PPS</font>]<br></b>[ecs.c5.xlarge <font color='green'>4vCPU
8GiB 内网带宽1.5Gbps 内网收发包50万PPS</font>]<br></b>[ecs.c5.2xlarge <font color='green'>8vCPU
16GiB 内网带宽2.5Gbps 内网收发包80万PPS</font>]
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
AssociationPropertyMetadata:
ZoneId: ZoneId
InstanceName:
Type: String
Label:
en: Instance Name
zh-cn: 实例名称
Description:
en: The Instance Name,A maximum of 16 characters, consisting of lowercase letters,
Numbers, underscores, letters beginning, letters or Numbers ending.
zh-cn: 实例名称,最多16个字符,由小写字母、数字、下划线、字母开头、字母或数字结尾。
Default: TestName
MinLength: 1
MaxLength: 16
SystemDiskName:
Type: String
Label:
en: System Disk Name
zh-cn: 系统磁盘名称
Description:
en: The name of system disk
zh-cn: 系统磁盘名称
Default: systemdiskname
SystemDiskCategory:
Type: String
Label:
en: System Disk Category
zh-cn: 系统磁盘类别
AssociationProperty: ALIYUN::ECS::Disk::SystemDiskCategory
AssociationPropertyMetadata:
InstanceType: InstanceType
ZoneId: ZoneId
Password:
Type: String
Label:
en: Instance Password
zh-cn: 实例密码
Description:
en: The Instance Name,A maximum of 16 characters, consisting of lowercase letters,
Numbers, underscores, letters beginning, letters or Numbers ending.
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: '[a-zA-Z0-9-\(\)\`\~\!@\#\$%\^&\*-+=\|\{\}\[\]\:\;\‘\,\.\?\/]*'
MinLength: 8
MaxLength: 30
NoEcho: true
Category:
AssociationPropertyMetadata:
LocaleKey: RDSCategory
Default: Null
Required: false
AllowedValues:
- Basic
- HighAvailability
- cluster
Label:
zh-cn: 实例系列
en: Category
Type: String
EngineVersion:
Type: String
Label:
zh-cn: 数据库版本号
en: EngineVersion
AssociationProperty: ALIYUN::RDS::Engine::EngineVersion
AssociationPropertyMetadata:
Engine: MySQL
Default: '8.0'
Required: true
DBInstanceClass:
Type: String
Label:
en: Instance Class
zh-cn: 实例类型
Description:
en: The RDS instance class.
zh-cn: 数据库实例类型
AssociationProperty: ALIYUN::RDS::Instance::InstanceType
AssociationPropertyMetadata:
Engine: MySQL
Category: ${Category}
EngineVersion: ${EngineVersion}
ZoneId: ${VSwitchZoneId}
Default: rds.mysql.s1.small
DBInstanceStorage:
Type: Number
Label:
en: Instance Storage
zh-cn: 实例存储
Description:
en: 'Incrementing in every 5G, unit: GB'
zh-cn: 每5G递增,单位:GB
ConstraintDescription:
en: '[5, 2000] Incrementing in every 5G, unit: GB'
zh-cn: '[5, 2000] 每 5G 递增,单位:GB'
Default: 50
MinValue: 5
MaxValue: 2000
DBInstanceNetType:
Type: String
Label:
en: Instance Net Type
zh-cn: 实例网络类型
Description:
en: Instance Net Type
zh-cn: 实例网络类型
AssociationPropertyMetadata:
LocaleKey: NetType
Default: Intranet
AllowedValues:
- Intranet
- Internet
Resources:
Vpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock:
Ref: VpcCidrBlock
VpcName:
Ref: VpcName
Metadata:
ALIYUN::ROS::Designer:
id: ab903ec0-53ea-452e-b042-d8364e663835
VSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: Vpc
CidrBlock:
Ref: VSwitchCidrBlock
Metadata:
ALIYUN::ROS::Designer:
id: f91d2a99-b358-4a91-8341-b0d0dd78ca55
SecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: Vpc
SecurityGroupName: MySecurityGroup
Metadata:
ALIYUN::ROS::Designer:
id: e5921d70-d3ba-4222-bcaa-0792552a4977
WebServer:
Type: ALIYUN::ECS::Instance
Properties:
VpcId:
Fn::GetAtt:
- Vpc
- VpcId
VSwitchId:
Ref: VSwitch
SecurityGroupId:
Ref: SecurityGroup
ImageId:
Ref: ImageId
DiskMappings:
- Category: cloud_ssd
Size: 20
- DiskName: ecs_disk
Size: 20
InstanceName:
Ref: InstanceName
InstanceType:
Ref: InstanceType
Password:
Ref: Password
SystemDiskCategory:
Ref: SystemDiskCategory
SystemDiskDescription: systemdiskdescription
SystemDisk_DiskName:
Ref: SystemDiskName
Metadata:
ALIYUN::ROS::Designer:
id: d9968214-ffbd-405d-88d9-7fbadfd7d2d5
Database:
Type: ALIYUN::RDS::DBInstance
Properties:
VpcId:
Ref: Vpc
VSwitchId:
Ref: VSwitch
DBInstanceClass:
Ref: DBInstanceClass
DBInstanceNetType:
Ref: DBInstanceNetType
DBInstanceStorage:
Ref: DBInstanceStorage
Engine: MySQL
Category:
Ref: Category
EngineVersion:
Ref: EngineVersion
SecurityIPList:
Fn::GetAtt:
- WebServer
- PrivateIp
Metadata:
ALIYUN::ROS::Designer:
id: 3ef60566-6c25-47bf-9c37-a44f1d74ac0b
Outputs:
DBInstanceId:
Value:
Fn::GetAtt:
- Database
- DBInstanceId
PublicConnectionString:
Value:
Fn::GetAtt:
- Database
- PublicConnectionString
PublicPort:
Value:
Fn::GetAtt:
- Database
- PublicPort
WebServerId:
Value:
Fn::GetAtt:
- WebServer
- InstanceId
WebServerPrivateIp:
Value:
Fn::GetAtt:
- WebServer
- PrivateIp
WebServerPublicIp:
Value:
Fn::GetAtt:
- WebServer
- PublicIp
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- VpcName
- VpcCidrBlock
- VSwitchCidrBlock
- ZoneId
Label:
default:
en: VPC
zh-cn: 专有网络
- Parameters:
- ImageId
- InstanceType
- InstanceName
- SystemDiskName
- SystemDiskCategory
- Password
Label:
default:
en: ECS
zh-cn: 云服务器
- Parameters:
- Category
- EngineVersion
- DBInstanceClass
- DBInstanceStorage
- DBInstanceNetType
Label:
default:
en: RDS
zh-cn: 数据库
TemplateTags:
- acs:example:弹性计算:创建ECS和RDS并将ECS加入RDS白名单
ALIYUN::ROS::Designer:
36bcf0d0-f726-4ed7-9406-556d981e00ad:
source:
id: 3ef60566-6c25-47bf-9c37-a44f1d74ac0b
target:
id: d9968214-ffbd-405d-88d9-7fbadfd7d2d5
z: 1
3ef60566-6c25-47bf-9c37-a44f1d74ac0b:
position:
x: 444
y: 143
size:
height: 60
width: 60
z: 0
67d50fd1-1d91-4fcc-b1ec-85ad50798223:
source:
id: d9968214-ffbd-405d-88d9-7fbadfd7d2d5
target:
id: e5921d70-d3ba-4222-bcaa-0792552a4977
z: 1
ab903ec0-53ea-452e-b042-d8364e663835:
embeds:
- f91d2a99-b358-4a91-8341-b0d0dd78ca55
- e5921d70-d3ba-4222-bcaa-0792552a4977
position:
x: 197
y: 66
size:
height: 290
width: 222
z: 0
d9968214-ffbd-405d-88d9-7fbadfd7d2d5:
position:
x: 279
y: 143
size:
height: 60
width: 60
z: 2
e5921d70-d3ba-4222-bcaa-0792552a4977:
position:
x: 279
y: 272
size:
height: 60
width: 60
z: 1
f91d2a99-b358-4a91-8341-b0d0dd78ca55:
embeds:
- d9968214-ffbd-405d-88d9-7fbadfd7d2d5
position:
x: 224
y: 91
size:
height: 156
width: 170
z: 1