forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
simple-ecs-instance.yml
190 lines (190 loc) · 5.91 KB
/
simple-ecs-instance.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
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建VPC、安全组、vSwitch和ECS实例,用户自定义镜像ID,实例规格与密码,输出实例ID与公网IP。
en: Create a VPC, security group, vSwitch, and ECS instance, with user-defined镜像ID,
instance specifications, and password. Output the instance ID and public IP address.
Parameters:
ImageId:
Type: String
Label:
en: Image ID
zh-cn: 镜像ID
Description:
en: '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::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: '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
Password:
Type: String
Label:
en: Login Password
zh-cn: 实例密码
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
ZoneId:
Type: String
Label:
en: Zone ID
zh-cn: 可用区ID
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
Resources:
VPC:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock: 192.168.0.0/16
VpcName: simple_ecs_vpc
Metadata:
ALIYUN::ROS::Designer:
id: 1361cd4d-7ff5-4c6d-9c26-3d089a644b0b
SecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: VPC
Metadata:
ALIYUN::ROS::Designer:
id: 468cb29b-5bba-452e-95f4-4b331727204d
VSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: VPC
CidrBlock: 192.168.0.0/16
Metadata:
ALIYUN::ROS::Designer:
id: 90648756-148d-4692-a3c6-3834c2c80f80
WebServer:
Type: ALIYUN::ECS::Instance
Properties:
VpcId:
Ref: VPC
VSwitchId:
Ref: VSwitch
SecurityGroupId:
Ref: SecurityGroup
ImageId:
Ref: ImageId
InstanceType:
Ref: InstanceType
Password:
Ref: Password
Metadata:
ALIYUN::ROS::Designer:
id: 2b080610-ddab-43ba-b9ab-8e3223668692
Outputs:
InstanceId:
Description:
en: The instance id of created ecs instance
zh-cn: 已创建的ecs实例的实例ID
Value:
Fn::GetAtt:
- WebServer
- InstanceId
PublicIp:
Description:
en: Public IP address of created ecs instance.
zh-cn: 已创建的ecs实例的公共IP地址。
Value:
Fn::GetAtt:
- WebServer
- PublicIp
SecurityGroupId:
Description:
en: Generated security group id for security group.
zh-cn: 为安全组生成的安全组ID。
Value:
Fn::GetAtt:
- SecurityGroup
- SecurityGroupId
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- ZoneId
- InstanceType
- ImageId
- Password
Label:
default: ECS
TemplateTags:
- acs:example:弹性计算:指定ImageId创建一个简单配置的ECS
ALIYUN::ROS::Designer:
1361cd4d-7ff5-4c6d-9c26-3d089a644b0b:
embeds:
- 90648756-148d-4692-a3c6-3834c2c80f80
- 468cb29b-5bba-452e-95f4-4b331727204d
position:
x: 193
y: 63
size:
height: 194
width: 309
z: 0
2b080610-ddab-43ba-b9ab-8e3223668692:
position:
x: 250
y: 130
size:
height: 60
width: 60
z: 2
468cb29b-5bba-452e-95f4-4b331727204d:
position:
x: 406
y: 130
size:
height: 60
width: 60
z: 1
90648756-148d-4692-a3c6-3834c2c80f80:
embeds:
- 2b080610-ddab-43ba-b9ab-8e3223668692
position:
x: 212
y: 90
size:
height: 140
width: 129
z: 1
e776abde-ad3c-4a8d-a999-93fbd2fa37e6:
source:
id: 2b080610-ddab-43ba-b9ab-8e3223668692
target:
id: 468cb29b-5bba-452e-95f4-4b331727204d
z: 1