forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
aliyun-kafka-instance.yml
306 lines (306 loc) · 8.28 KB
/
aliyun-kafka-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
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
ROSTemplateFormatVersion: '2015-09-01'
Description:
en: Use this template to create an ALICloud message queue Kafka instance.
zh-cn: 使用此模板创建一台阿里云消息队列Kafka实例。
Conditions:
CreateSg:
Fn::Not:
Fn::Equals:
- null
- Ref: SecurityGroupName
CreateVpc:
Fn::Not:
Fn::Equals:
- null
- Ref: VpcCidrBlock
CreateVsw:
Fn::Not:
Fn::Equals:
- null
- Ref: VSwitchCidrBlock
Parameters:
VpcId:
Type: String
Label:
en: Existing VPC ID
zh-cn: 现有VPC的实例ID
Description:
en: Please search the ID starts with (vpc-xxx)from console-Virtual Private Cloud
zh-cn: 控制台-VPC-专有网络下查询
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Default: null
VSwitchZoneId:
Type: String
Label:
en: VSwitch Zone ID
zh-cn: 交换机可用区
Description:
en: Availability ID for existing switches
zh-cn: 现有交换机的可用区ID
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
VSwitchId:
Type: String
Label:
en: VSwitch ID
zh-cn: 网络交换机ID
Description:
en: Please search the business VSwitch ID starts with(vsw-xxx)from console-Virtual
Private Cloud-VSwitches
zh-cn: 现有业务网络交换机的实例ID,控制台-VPC-专有网络-交换机下查询
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
AssociationPropertyMetadata:
VpcId: ${VpcId}
ZoneId: ${VSwitchZoneId}
Default: null
SecurityGroupId:
Type: String
Label:
en: Business Security Group ID
zh-cn: 业务安全组ID
Description:
en: Please search the business security group ID starts with(sg-xxx)from console-ECS-Network
& Security
zh-cn: 现有业务安全组的实例ID,控制台-ECS-网络与安全-安全组下查询
AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
AssociationPropertyMetadata:
VpcId: ${VpcId}
Default: null
VpcCidrBlock:
Type: String
Label:
en: VPC CIDR Block
zh-cn: 专有网络网段
Description:
en: New proprietary network IP address segment range, recommended use of the
following IP address segments<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地址段范围,推荐使用以下的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: null
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: null
SecurityGroupName:
Type: String
Label:
en: Security Group Name
zh-cn: 安全组名称
Description:
en: 2 to 128 English or Chinese characters in length.Must start with size letters
or Chinese, not http:// and https://, can contain Numbers, dots (.), underscores
(_) and hyphens (-).
zh-cn: 长度为2~128个英文或中文字符。必须以大小字母或中文开头,不能以http://和https://开头,可包含数字、点(.)、下划线(_)和连字符(-)。
Default: null
PayType:
Type: String
Label:
en: PayType
zh-cn: 付费类型
AssociationPropertyMetadata:
ValueLabelMapping:
Hour: 后付费(按量计费)
Month: 预付费(包年包月)
Default: Hour
AllowedValues:
- Hour
- Month
SpecType:
Type: String
Label:
en: SpecType
zh-cn: 规格类型
AssociationPropertyMetadata:
ValueLabelMapping:
normal: 标准版(高写版)
professional: 专业版(高写版)
professionalForHighRead: 专业版(高读版)
AllowedValues:
- normal
- professional
- professionalForHighRead
IoMaxSpec:
Type: String
Label:
en: IoMaxSpec
zh-cn: 流量规格
Description:
en: IoMaxSpec,See detail:<b><a href='https://help.aliyun.com/document_detail/299957.htm?spm=a2c4g.11186623.0.0.259a2e02SFaXKD#concept-2102974'
target='_blank'><font color='blue'>Find the IoMaxSpec</font></a></b>
zh-cn: 流量规格, 详见:<b><a href='https://help.aliyun.com/document_detail/299957.htm?spm=a2c4g.11186623.0.0.259a2e02SFaXKD#concept-2102974'
target='_blank'><font color='blue'>查找流量规格</font></a></b>
Default: alikafka.hw.2xlarge
DiskType:
Type: String
Label:
en: DiskType
zh-cn: 磁盘类型
AssociationPropertyMetadata:
ValueLabelMapping:
'0': 高效云盘
'1': SSD
AllowedValues:
- '0'
- '1'
DiskSize:
Type: Number
Label:
en: DiskSize
zh-cn: 磁盘容量
Description:
en: 'Unit: GB.'
zh-cn: 单位:GB。
Default: 500
MinValue: 500
MaxValue: 96000
TopicQuota:
Type: Number
Label:
en: TopicQuota
zh-cn: Topic的数量
Default: 50
MinValue: 50
MaxValue: 79
Resources:
KafkaInstance:
Type: ALIYUN::KAFKA::Instance
Properties:
DeployOption:
DeployModule: vpc
Name:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
- Kafka
SecurityGroup:
Fn::If:
- CreateSg
- Ref: SecurityGroup
- Ref: SecurityGroupId
VSwitchId:
Fn::If:
- CreateVsw
- Ref: VSwitch
- Ref: VSwitchId
VpcId:
Fn::If:
- CreateVpc
- Ref: Vpc
- Ref: VpcId
ZoneId:
Ref: VSwitchZoneId
DeployType: 5
DiskSize:
Ref: DiskSize
DiskType:
Ref: DiskType
IoMaxSpec:
Ref: IoMaxSpec
PayType:
Ref: PayType
SpecType:
Ref: SpecType
TopicQuota:
Ref: TopicQuota
SecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Condition: CreateSg
Properties:
VpcId:
Fn::If:
- CreateVpc
- Ref: Vpc
- Ref: VpcId
SecurityGroupEgress:
- DestCidrIp: 0.0.0.0/0
IpProtocol: all
NicType: internet
PortRange: -1/-1
Priority: 1
- 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
- IpProtocol: all
NicType: intranet
PortRange: -1/-1
Priority: 1
SourceCidrIp: 0.0.0.0/0
SecurityGroupName:
Ref: SecurityGroupName
Metadata:
ALIYUN::ROS::Designer:
id: de0e55c1-4cf9-4647-bbdd-6e1c8deba4cd
VSwitch:
Type: ALIYUN::ECS::VSwitch
Condition: CreateVsw
Properties:
ZoneId:
Ref: VSwitchZoneId
VpcId:
Fn::If:
- CreateVpc
- Ref: Vpc
- Ref: VpcId
CidrBlock:
Ref: VSwitchCidrBlock
Metadata:
ALIYUN::ROS::Designer:
id: cc854ba9-a556-4503-8c21-e52165d2ecde
Vpc:
Type: ALIYUN::ECS::VPC
Condition: CreateVpc
Properties:
CidrBlock:
Ref: VpcCidrBlock
Metadata:
ALIYUN::ROS::Designer:
id: ccfeb4a0-28d4-4c68-949e-d7d920b5256c
Outputs:
KafkaInstanceId:
Value:
Fn::GetAtt:
- KafkaInstance
- InstanceId
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- VpcId
- VSwitchZoneId
- VSwitchId
- SecurityGroupId
- VpcCidrBlock
- VSwitchCidrBlock
- SecurityGroupName
Label:
default:
en: Infrastructure Configuration
zh-cn: 基础资源配置(必填)
- Parameters:
- PayType
- SpecType
- IoMaxSpec
- DiskType
- DiskSize
- TopicQuota
Label:
default:
en: Kafka Configuration
zh-cn: Kafka 配置(必填)
TemplateTags:
- acs:example:弹性计算:创建商业版Kafka实例