forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
move-server-using-custom-mirror.yml
295 lines (295 loc) · 9.55 KB
/
move-server-using-custom-mirror.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
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 迁移Windows/Linux服务器至阿里云ECS,支持P2V/V2V,配置VPC、安全组、ECS实例,自定义镜像与规格。
en: Migrate Windows/Linux servers to Alibaba Cloud ECS, supporting P2V/V2V migrations.
Configure Virtual Private Cloud (VPC), security groups, Elastic Compute Service
(ECS) instances, customize images, and instance specifications.
Parameters:
VpcCidrBlock:
Type: String
Label:
en: VPC Network Segment
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
VSwZoneId:
Type: String
Label:
en: VSwitch Availability Zone
zh-cn: 交换机可用区
Description:
en: Availability zone id.<br><b>note: <font color='blue'>Before selecting the
availability zone, confirm that the availability Zone supports the creation
of ECS resources.</font></b>
zh-cn: 可用区Id。<br><b>注: <font color='blue'>选择可用区前请确认该可用区是否支持创建ECS资源。</font></b>
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
VSwCidrBlock:
Type: String
Label:
en: VSwitch Network Segment
zh-cn: 交换机网段
Description:
en: Must be a sub-network segment of the proprietary network and is not occupied
by other switches.
zh-cn: 必须是所属专有网络的子网段,并且没有被其他交换机占用。
Default: 192.168.0.0/16
EcsGroupMaxAmount:
Type: Number
Label:
en: ECS Amount
zh-cn: 实例数量
Description:
en: Number of instances, with values ranging from 1 to 100.
zh-cn: 实例数量,取值范围:1~100。
ConstraintDescription:
en: 'Valid value: 1 - 100.'
zh-cn: 取值范围:1~100。
Default: 1
MinValue: 1
MaxValue: 100
EcsGroupCustomImageId:
Type: String
Label:
en: Image
zh-cn: 镜像
Description:
en: The image created by the source server
zh-cn: 源服务器创建的镜像
EcsGroupInstanceType:
Type: String
Label:
en: Specifications
zh-cn: 规格
Description:
en: 'Fill in the 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: VSwZoneId
EcsGroupAllocatePublicIP:
Type: Boolean
Label:
en: Whether Assign a Public IP
zh-cn: 是否分配公网Ip
Description:
en: Whether to assign a public ip.
zh-cn: 是否分配公网Ip。
Default: true
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_ssd
AllowedValues:
- cloud_efficiency
- cloud_ssd
- cloud
- cloud_essd
- ephemeral_ssd
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。
ConstraintDescription:
en: 'Range of values: 40-500, units: GB.'
zh-cn: 取值范围:[40, 500], 单位:GB。
Default: 40
MinValue: 40
MaxValue: 500
EcsGroupLoginPassword:
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
Resources:
EcsVpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock:
Ref: VpcCidrBlock
VpcName:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
Metadata:
ALIYUN::ROS::Designer:
id: 8b2251ee-8139-4768-b9ab-22d16a44231c
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
Metadata:
ALIYUN::ROS::Designer:
id: fe2adbb4-e7bf-400c-9bee-0718863798f0
EcsVSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: VSwZoneId
VpcId:
Ref: EcsVpc
CidrBlock:
Ref: VSwCidrBlock
Metadata:
ALIYUN::ROS::Designer:
id: 1c94cc19-e1a4-4644-8b93-96d7a0e66fd8
EcsInstanceGroup:
Type: ALIYUN::ECS::InstanceGroup
Properties:
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch
SecurityGroupId:
Ref: EcsSecurityGroup
ImageId:
Ref: EcsGroupCustomImageId
AllocatePublicIP:
Ref: EcsGroupAllocatePublicIP
InstanceType:
Ref: EcsGroupInstanceType
IoOptimized: optimized
MaxAmount:
Ref: EcsGroupMaxAmount
Password:
Ref: EcsGroupLoginPassword
SystemDiskCategory:
Ref: EcsGroupSystemDiskCategory
SystemDiskSize:
Ref: EcsGroupSystemDiskSize
Metadata:
ALIYUN::ROS::Designer:
id: 03382861-628e-474b-b74c-67a74c1a9870
Outputs:
ECSInstanceIds:
Value:
Fn::GetAtt:
- EcsInstanceGroup
- InstanceIds
ECSPrivateIps:
Value:
Fn::GetAtt:
- EcsInstanceGroup
- PrivateIps
ECSPublicIps:
Value:
Fn::GetAtt:
- EcsInstanceGroup
- PublicIps
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- VpcCidrBlock
- VSwZoneId
- VSwCidrBlock
Label:
default: VPC
- Parameters:
- EcsGroupMaxAmount
- EcsGroupCustomImageId
- EcsGroupInstanceType
- EcsGroupAllocatePublicIP
- EcsGroupSystemDiskCategory
- EcsGroupSystemDiskSize
- EcsGroupLoginPassword
Label:
default: ECS
TemplateTags:
- acs:solution:业务上云:服务器迁移-使用自定义镜像创建服务器
ALIYUN::ROS::Designer:
03382861-628e-474b-b74c-67a74c1a9870:
position:
x: 250
y: 130
size:
height: 60
width: 60
z: 2
1c94cc19-e1a4-4644-8b93-96d7a0e66fd8:
embeds:
- 03382861-628e-474b-b74c-67a74c1a9870
position:
x: 212
y: 90
size:
height: 140
width: 132
z: 1
66a75955-a6e4-46db-8bf1-8be20a6c829f:
source:
id: 03382861-628e-474b-b74c-67a74c1a9870
target:
id: fe2adbb4-e7bf-400c-9bee-0718863798f0
z: 1
8b2251ee-8139-4768-b9ab-22d16a44231c:
embeds:
- 1c94cc19-e1a4-4644-8b93-96d7a0e66fd8
- fe2adbb4-e7bf-400c-9bee-0718863798f0
position:
x: 192
y: 50
size:
height: 215
width: 318.0537109375
z: 0
fe2adbb4-e7bf-400c-9bee-0718863798f0:
position:
x: 415
y: 130
size:
height: 60
width: 60
z: 1