forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
create-ddh-and-deploy-cloud-server.yml
377 lines (377 loc) · 12.9 KB
/
create-ddh-and-deploy-cloud-server.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
ROSTemplateFormatVersion: '2015-09-01'
Description:
en: This template demonstrates the best practices for migrating VMware systems that
are deployed or hosted in an on-premises data center to DDH. You can use DDH to
build a resource pool composed of dedicated physical servers on the cloud, and
use ECS to take full advantage of the resource elasticity and pay-as-you-go billing
model on the cloud. This way, you can build a highly reliable and scalable high-performance
virtualization system that can meet enterprise-level requirements such as security,
compliance, custom deployment, and Bring Your Own License (BYOL). This template
helps create a dedicated host and deploy ECS instances.
zh-cn: 介绍本地部署或托管在IDC环境的 VMware系统迁移上云至独立宿主机(DDH)的最佳实践。使用DDH在云端构建由独享物理服务器组成的资源池,同时配合ECS成熟稳定的虚拟化技术体系,充分利用云上资源弹性、按使用付费的优势,快速构建高性能、高可靠和可快速动态伸缩的虚拟化系统,满足安全、合规、自定义部署、自带许可证(BYOL)等企业级需求;此模板完成创建DDH并部署云服务器。
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: 10.0.0.0/8
AllowedValues:
- 192.168.0.0/16
- 172.16.0.0/12
- 10.0.0.0/8
ZoneId:
Type: String
Label:
en: VSwitch Availability Zone
zh-cn: 交换机可用区
Description:
en: Availability zone id.<br><b>note: <font color='blue'>Before selecting the
available zone, verify that the available zone supports the host that created
the specification.</font></b>
zh-cn: 可用区Id。<br><b>注: <font color='blue'>选择可用区前请确认该可用区是否支持创建该规格的宿主机。</font></b>
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
VSwitchCidrBlock:
Type: String
Label:
en: VSwitch CIDR Block
zh-cn: 交换机网段
Description:
en: Must be a sub-network segment of the proprietary network and is not occupied
by other VSwitches.
zh-cn: 必须是所属专有网络的子网段,并且没有被其他交换机占用。
Default: 10.2.0.0/16
DedicatedHostType:
Type: String
Label:
en: DDH Type
zh-cn: 规格
Description:
en: 'Please confirm the inventory of this specification under the Availability
Zone in the product console,<br>general specifications:<font color=''red''><b>ddh.c5</b></font><br>See
Detail: <a href=''https://www.alibabacloud.com/help/zh/doc-detail/68564.htm''
target=''_blank''><b><font color=''blue''>Host specifications</font></a></b>'
zh-cn: 请在该产品控制台确认此规格在可用区下的库存情况,<br>通用规格:<font color='red'><b>ddh.c5</b></font><br>注:可用区可能不支持通用规格<br>详见:<a
href='https://help.aliyun.com/document_detail/68564.html' target='_blank'><b><font
color='blue'>宿主机规格</font></a></b>
AutoPlacement:
Type: String
Label:
en: Automatic Deployment
zh-cn: 允许自动部署
Description:
en: Whether the host machine is allowed to join the pool of resources that are
automatically deployed.
zh-cn: 是否允许该宿主机加入自动部署的资源池。
Default: 'on'
AllowedValues:
- 'on'
- 'off'
MaxAmount:
Type: Number
Label:
en: ECS Amount
zh-cn: 实例数量
Description:
en: 'The number of servers created in combination with the specifications of
the host machine, the value range: 1 to 100.'
zh-cn: 结合宿主机的规格创建服务器的数量,取值范围:1~100。
ConstraintDescription:
en: 'The number of servers created in combination with the specifications of
the host machine, the value range: 1 to 100.'
zh-cn: 结合宿主机的规格创建服务器的数量,取值范围:1~100。
Default: 1
MinValue: 1
MaxValue: 100
ImageId:
Type: String
Label:
en: Image
zh-cn: 镜像
Description:
en: 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: 镜像Id, 详见:<b><a href='https://help.aliyun.com/document_detail/112977.html'
target='_blank'><font color='blue'>查找镜像</font></a></b>
AssociationProperty: ALIYUN::ECS::Instance:ImageId
InstanceType:
Type: String
Label:
en: Instance Type
zh-cn: 实例规格
Description:
en: 'Please confirm that an instance of this specification is appropriate under
the host;</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: 请确认在该宿主机下适合创建该规格的实例;<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
DiskCategory:
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
SystemDiskSize:
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: 40
Password:
Type: String
Label:
en: Instance 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
Resources:
EcsDedicatedHost:
Type: ALIYUN::ECS::DedicatedHost
Properties:
ZoneId:
Ref: ZoneId
AutoPlacement:
Ref: AutoPlacement
ChargeType: PostPaid
DedicatedHostName: DDH
DedicatedHostType:
Ref: DedicatedHostType
Tags:
- Key: best_practice
Value: '064'
Metadata:
ALIYUN::ROS::Designer:
id: cdc03921-a7e4-47de-a64b-97af864a3ea0
EcsVpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock:
Ref: VpcCidrBlock
VpcName:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
Metadata:
ALIYUN::ROS::Designer:
id: 4592e1d7-0ede-4611-9d66-7cfd781953f7
EcsSecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: EcsVpc
SecurityGroupIngress:
- IpProtocol: icmp
NicType: internet
PortRange: -1/-1
Priority: 1
SourceCidrIp: 0.0.0.0/0
- IpProtocol: tcp
NicType: internet
PortRange: 80/80
Priority: 1
SourceCidrIp: 0.0.0.0/0
- IpProtocol: tcp
NicType: internet
PortRange: 443/443
Priority: 1
SourceCidrIp: 0.0.0.0/0
- IpProtocol: tcp
NicType: internet
PortRange: 22/22
Priority: 1
SourceCidrIp: 0.0.0.0/0
SecurityGroupName:
Fn::Join:
- _
- - StackId
- Ref: ALIYUN::StackId
Metadata:
ALIYUN::ROS::Designer:
id: 3cd0aced-8ece-4126-a94f-523a2e70aea9
EcsVSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: EcsVpc
CidrBlock:
Ref: VSwitchCidrBlock
VSwitchName:
Fn::Join:
- _
- - StackId
- Ref: ALIYUN::StackId
Metadata:
ALIYUN::ROS::Designer:
id: 1a5f1fe2-2f59-4fb2-b31c-cd4f890e4f4b
EcsInstanceGroup:
Type: ALIYUN::ECS::InstanceGroup
Properties:
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch
SecurityGroupId:
Ref: EcsSecurityGroup
ImageId:
Ref: ImageId
AllocatePublicIP: false
DedicatedHostId:
Ref: EcsDedicatedHost
InstanceType:
Ref: InstanceType
MaxAmount:
Ref: MaxAmount
Password:
Ref: Password
SystemDiskCategory:
Ref: DiskCategory
SystemDiskSize:
Ref: SystemDiskSize
Tags:
- Key: best_practice
Value: '064'
DependsOn:
- EcsDedicatedHost
Metadata:
ALIYUN::ROS::Designer:
id: b79a99b8-b531-476d-ae04-d95986922e07
Outputs:
EcsDedicatedHostId:
Value:
Fn::GetAtt:
- EcsDedicatedHost
- DedicatedHostIds
EcsInstanceIds:
Value:
Fn::GetAtt:
- EcsInstanceGroup
- InstanceIds
EcsInstancePrivateIps:
Value:
Fn::GetAtt:
- EcsInstanceGroup
- PrivateIps
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- VpcCidrBlock
- ZoneId
- VSwitchCidrBlock
Label:
default: VPC
- Parameters:
- DedicatedHostType
- AutoPlacement
- MaxAmount
- ImageId
- InstanceType
- DiskCategory
- SystemDiskSize
- Password
Label:
default: ECS
TemplateTags:
- acs:solution:业务上云:VMware迁移DDH-创建DDH并部署云服务器
ALIYUN::ROS::Designer:
0dede038-6d47-4788-bdc1-35410496519d:
source:
id: b79a99b8-b531-476d-ae04-d95986922e07
target:
id: cdc03921-a7e4-47de-a64b-97af864a3ea0
z: 1
1a5f1fe2-2f59-4fb2-b31c-cd4f890e4f4b:
embeds:
- b79a99b8-b531-476d-ae04-d95986922e07
position:
x: 279
y: 72
size:
height: 162
width: 124
z: 1
3cd0aced-8ece-4126-a94f-523a2e70aea9:
position:
x: 314
y: 277
size:
height: 60
width: 60
z: 1
4592e1d7-0ede-4611-9d66-7cfd781953f7:
embeds:
- 1a5f1fe2-2f59-4fb2-b31c-cd4f890e4f4b
- 3cd0aced-8ece-4126-a94f-523a2e70aea9
position:
x: 193
y: 51
size:
height: 323
width: 297.0537109375
z: 0
b79a99b8-b531-476d-ae04-d95986922e07:
position:
x: 314
y: 112
size:
height: 60
width: 60
z: 2
cdc03921-a7e4-47de-a64b-97af864a3ea0:
position:
x: 558
y: 112
size:
height: 60
width: 60
z: 0
e07aab87-b3f2-40fb-aaea-212b7b3f0676:
source:
id: b79a99b8-b531-476d-ae04-d95986922e07
target:
id: 3cd0aced-8ece-4126-a94f-523a2e70aea9
z: 1