Skip to content

Commit 9876cb6

Browse files
authored
Merge pull request #247 from xiao201208/feature/add_4_template_for_aiops
add 4 template for ai ops and 1 template for ecs document
2 parents c131002 + a835295 commit 9876cb6

File tree

6 files changed

+913
-0
lines changed

6 files changed

+913
-0
lines changed
Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
ROSTemplateFormatVersion: '2015-09-01'
2+
Description:
3+
zh-cn: 在ECS实例上搭建WordPress博客平台。
4+
en: Build a WordPress blog platform.
5+
Parameters:
6+
InstanceSource:
7+
Type: String
8+
Default: CreateNew
9+
Label:
10+
zh-cn: 实例来源
11+
en: Instance Source
12+
AllowedValues:
13+
- CreateNew
14+
- UseExisted
15+
AssociationPropertyMetadata:
16+
ValueLabelMapping:
17+
CreateNew:
18+
zh-cn: 创建新实例
19+
en: Create New Instance
20+
UseExisted:
21+
zh-cn: 选择已有实例
22+
en: Select Existed Instance
23+
ZoneId:
24+
Type: String
25+
Default: null
26+
Required: true
27+
Label:
28+
en: Availability Zone
29+
zh-cn: 可用区
30+
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
31+
AssociationPropertyMetadata:
32+
AutoSelectFirst: true
33+
Visible:
34+
Condition:
35+
Fn::Equals:
36+
- ${InstanceSource}
37+
- CreateNew
38+
ImageId:
39+
Type: String
40+
Default: aliyun_3_9_x64_20G_alibase_20231219.vhd
41+
Required: true
42+
Label:
43+
en: Image of Instance
44+
zh-cn: 实例镜像
45+
AssociationProperty: ALIYUN::ECS::Image::ImageId
46+
AssociationPropertyMetadata:
47+
SupportedImageOwnerAlias:
48+
- system
49+
IsSupportCloudinit: true
50+
Visible:
51+
Condition:
52+
Fn::Equals:
53+
- ${InstanceSource}
54+
- CreateNew
55+
InstanceType:
56+
Type: String
57+
Default: null
58+
Required: true
59+
Label:
60+
en: Instance Type
61+
zh-cn: 实例类型
62+
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
63+
AssociationPropertyMetadata:
64+
ZoneId: ${ZoneId}
65+
SpotStrategy: SpotAsPriceGo
66+
InstanceChargeType: PostPaid
67+
SystemDiskCategory: cloud_essd
68+
Visible:
69+
Condition:
70+
Fn::Equals:
71+
- ${InstanceSource}
72+
- CreateNew
73+
InstancePassword:
74+
Type: String
75+
NoEcho: true
76+
Default: null
77+
Confirm: true
78+
Description:
79+
en: >-
80+
Server login password, Length 8-30, must contain three(Capital letters,
81+
lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special
82+
symbol in)
83+
zh-cn: >-
84+
服务器登录密码,长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/
85+
中的特殊符号)
86+
Label:
87+
en: Instance Password
88+
zh-cn: 实例密码
89+
ConstraintDescription:
90+
en: >-
91+
Length 8-30, must contain three(Capital letters, lowercase letters,
92+
numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in)
93+
zh-cn: '长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;''<>,.?/ 中的特殊符号)'
94+
AssociationProperty: 'ALIYUN::ECS::Instance::Password'
95+
AssociationPropertyMetadata:
96+
Visible:
97+
Condition:
98+
Fn::Equals:
99+
- ${InstanceSource}
100+
- CreateNew
101+
EcsInstanceId:
102+
Type: String
103+
Default: null
104+
Label:
105+
en: ECS Instance ID
106+
zh-cn: ECS实例ID
107+
AssociationProperty: ALIYUN::ECS::Instance::InstanceId
108+
AssociationPropertyMetadata:
109+
Status: Running
110+
Visible:
111+
Condition:
112+
Fn::Equals:
113+
- ${InstanceSource}
114+
- UseExisted
115+
CommonName:
116+
Type: String
117+
Default: wordpress
118+
Conditions:
119+
CreateInstance:
120+
Fn::Equals:
121+
- Ref: InstanceSource
122+
- CreateNew
123+
UseExistedInstance:
124+
Fn::Equals:
125+
- Ref: InstanceSource
126+
- UseExisted
127+
Resources:
128+
Vpc:
129+
Type: 'ALIYUN::ECS::VPC'
130+
Condition: CreateInstance
131+
Properties:
132+
CidrBlock: 192.168.0.0/16
133+
VpcName:
134+
Fn::Sub: ${CommonName}-vpc
135+
VSwitch:
136+
Type: 'ALIYUN::ECS::VSwitch'
137+
Condition: CreateInstance
138+
Properties:
139+
VpcId:
140+
Ref: Vpc
141+
CidrBlock: 192.168.0.0/24
142+
ZoneId:
143+
Ref: ZoneId
144+
VSwitchName:
145+
Fn::Sub: ${CommonName}-vsw
146+
SecurityGroup:
147+
Type: 'ALIYUN::ECS::SecurityGroup'
148+
Condition: CreateInstance
149+
Properties:
150+
VpcId:
151+
Ref: Vpc
152+
SecurityGroupName:
153+
Fn::Sub: ${CommonName}-sg
154+
SecurityGroupIngress:
155+
- PortRange: 22/22
156+
SourceCidrIp: 0.0.0.0/0
157+
IpProtocol: tcp
158+
- PortRange: 3389/3389
159+
SourceCidrIp: 0.0.0.0/0
160+
IpProtocol: tcp
161+
- PortRange: 80/80
162+
SourceCidrIp: 0.0.0.0/0
163+
IpProtocol: tcp
164+
- PortRange: '-1/-1'
165+
SourceCidrIp: 0.0.0.0/0
166+
IpProtocol: icmp
167+
EcsInstance:
168+
Type: 'ALIYUN::ECS::InstanceGroup'
169+
Condition: CreateInstance
170+
Properties:
171+
VpcId:
172+
Ref: Vpc
173+
ZoneId:
174+
Ref: ZoneId
175+
VSwitchId:
176+
Ref: VSwitch
177+
SecurityGroupId:
178+
Ref: SecurityGroup
179+
ImageId:
180+
Ref: ImageId
181+
InstanceName:
182+
Fn::Sub: ${CommonName}-ecs
183+
InstanceType:
184+
Ref: InstanceType
185+
SystemDiskCategory: cloud_essd
186+
MaxAmount: 1
187+
InternetMaxBandwidthOut: 100
188+
SpotStrategy: SpotAsPriceGo
189+
Password:
190+
Ref: InstancePassword
191+
ModuleInstallWordpress:
192+
Version: default
193+
Type: 'MODULE::ACS::OOS::Extension'
194+
Properties:
195+
EcsInstanceIds:
196+
- Fn::If:
197+
- UseExistedInstance
198+
- Ref: EcsInstanceId
199+
- Ref: EcsInstance
200+
PackageName: ACS-Extension-WordPress-One-Click-1853370294850618
201+
DsEcs:
202+
Type: 'DATASOURCE::ECS::Instances'
203+
Properties:
204+
InstanceIds:
205+
- Fn::If:
206+
- UseExistedInstance
207+
- Ref: EcsInstanceId
208+
- Ref: EcsInstance
209+
Outputs:
210+
EcsLoginAddress:
211+
Description:
212+
en: Ecs login address.
213+
zh-cn: ECS登录地址。
214+
Value:
215+
Fn::Sub:
216+
- https://ecs-workbench.aliyun.com/?from=EcsConsole&instanceType=ecs&regionId=${ALIYUN::Region}&instanceId=${InstanceId}
217+
- InstanceId:
218+
Fn::If:
219+
- UseExistedInstance
220+
- Ref: EcsInstanceId
221+
- Ref: EcsInstance
222+
Metadata:
223+
ALIYUN::ROS::Interface:
224+
ParameterGroups:
225+
- Parameters:
226+
- InstanceSource
227+
- ZoneId
228+
- ImageId
229+
- InstanceType
230+
- InstancePassword
231+
- EcsInstanceId
232+
Hidden:
233+
- CommonName
234+
- Ipv6CidrBlockNumber
235+
TemplateTags:
236+
- acs:document-help:ecs:在ECS实例上搭建WordPress博客平台

documents/solution/high-availability-architecture/highly-available-web-services.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,16 @@ Outputs:
168168
- FileSystemId
169169
region:
170170
Ref: 'ALIYUN::Region'
171+
MountInfo1:
172+
Description:
173+
zh-cn: NAS在ECS上的挂载目录1
174+
en: NAS mounting directory 1 on ECS
175+
Value: '/nas_master'
176+
MountInfo2:
177+
Description:
178+
zh-cn: NAS在ECS上的挂载目录2
179+
en: NAS mounting directory 2 on ECS
180+
Value: '/nas_backup'
171181
Resources:
172182
SlbListener:
173183
Type: 'ALIYUN::SLB::Listener'
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
ROSTemplateFormatVersion: '2015-09-01'
2+
Description:
3+
zh-cn: 基于已有网络创建一个 ECS 实例。
4+
en: Create an ECS instance based on an existing VPC.
5+
Parameters:
6+
Vpc:
7+
Type: String
8+
Label:
9+
en: VPC ID
10+
zh-cn: 专有网络VPC实例ID
11+
Description:
12+
en: Please search the ID starting with (vpc-xxx) from console-Virtual Private Cloud
13+
zh-cn: 现有虚拟专有网络的实例ID,控制台-VPC-专有网络下查询
14+
AssociationProperty: ALIYUN::ECS::VPC::VPCId
15+
Default: null
16+
Vsw:
17+
Type: String
18+
Label:
19+
en: VSwitch ID
20+
zh-cn: 交换机实例ID
21+
Description:
22+
en: >-
23+
Existing VSwitch ID, query under console-VPC-VSwitch, <font color='red'>VSwitch
24+
must be under VPC, ECS will be created under this VSwitch.</font>
25+
zh-cn: 现有交换机ID,控制台-VPC-交换机下查询,<font color='red'>交换机必须在VPC下,ECS将创建在此交换机下。</font>
26+
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
27+
AssociationPropertyMetadata:
28+
VpcId: Vpc
29+
InstanceType:
30+
Type: String
31+
Default: null
32+
Required: true
33+
Label:
34+
en: Instance Type
35+
zh-cn: 实例类型
36+
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
37+
AssociationPropertyMetadata:
38+
ZoneId: ${ZoneId}
39+
SpotStrategy: SpotAsPriceGo
40+
InstanceChargeType: PostPaid
41+
SystemDiskCategory: cloud_essd
42+
InstancePassword:
43+
Type: String
44+
NoEcho: true
45+
Default: null
46+
Description:
47+
en: >-
48+
Server login password, Length 8-30, must contain three(Capital letters,
49+
lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special
50+
symbol in)
51+
zh-cn: >-
52+
服务器登录密码,长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/
53+
中的特殊符号)
54+
Label:
55+
en: Instance Password
56+
zh-cn: 实例密码
57+
ConstraintDescription:
58+
en: >-
59+
Length 8-30, must contain three(Capital letters, lowercase letters,
60+
numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in)
61+
zh-cn: 长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;''<>,.?/ 中的特殊符号)
62+
AssociationProperty: 'ALIYUN::ECS::Instance::Password'
63+
CommonName:
64+
Type: String
65+
Default: simple
66+
Resources:
67+
SecurityGroup:
68+
Type: 'ALIYUN::ECS::SecurityGroup'
69+
Properties:
70+
VpcId:
71+
Ref: Vpc
72+
SecurityGroupName:
73+
Fn::Sub: ${CommonName}-sg
74+
SecurityGroupIngress:
75+
- PortRange: 22/22
76+
SourceCidrIp: 0.0.0.0/0
77+
IpProtocol: tcp
78+
- PortRange: 3389/3389
79+
SourceCidrIp: 0.0.0.0/0
80+
IpProtocol: tcp
81+
- PortRange: 80/80
82+
SourceCidrIp: 0.0.0.0/0
83+
IpProtocol: tcp
84+
- PortRange: '-1/-1'
85+
SourceCidrIp: 0.0.0.0/0
86+
IpProtocol: icmp
87+
EcsInstance:
88+
Type: 'ALIYUN::ECS::InstanceGroup'
89+
Properties:
90+
VpcId:
91+
Ref: Vpc
92+
VSwitchId:
93+
Ref: Vsw
94+
SecurityGroupId:
95+
Ref: SecurityGroup
96+
ImageId: aliyun_3_9_x64_20G_alibase_
97+
InstanceName:
98+
Fn::Sub: ${CommonName}-ecs
99+
InstanceType:
100+
Ref: InstanceType
101+
SystemDiskCategory: cloud_essd
102+
MaxAmount: 1
103+
InternetMaxBandwidthOut: 5
104+
SpotStrategy: SpotAsPriceGo
105+
Password:
106+
Ref: InstancePassword
107+
Outputs:
108+
EcsLoginAddress:
109+
Description:
110+
en: Ecs login address.
111+
zh-cn: ECS登录地址。
112+
Value:
113+
Fn::Sub: https://ecs-workbench.aliyun.com/?from=EcsConsole&instanceType=ecs&regionId=${ALIYUN::Region}&instanceId=${EcsInstance}
114+
Metadata:
115+
ALIYUN::ROS::Interface:
116+
ParameterGroups:
117+
- Parameters:
118+
- Vpc
119+
- Vsw
120+
- InstanceType
121+
- InstancePassword
122+
Hidden:
123+
- CommonName
124+
TemplateTags:
125+
- acs:example:弹性计算:基于已有网络创建一个 ECS 实例

0 commit comments

Comments
 (0)