-
Notifications
You must be signed in to change notification settings - Fork 35
/
aliyun-kafka-instance.yml
280 lines (280 loc) · 7.57 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
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建一个可定制的阿里云Kafka实例,支持VPC、安全组、磁盘和付费模式配置,自动处理网络和安全资源。
en: Create a customizable Alibaba Cloud Kafka instance that supports VPC, security group, disk and paid mode configuration, and automatically handles network and security resources.
Parameters:
VpcId:
Default: null
AssociationProperty: ALIYUN::ECS::VPC::VPCId
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Equals:
- ${WhetherCreateVpc}
- false
Type: String
Label:
zh-cn: 专有网络VPC实例ID
en: VPC ID
WhetherCreateVpc:
Default: false
Type: Boolean
Label:
zh-cn: 是否新建VPC
en: WhetherCreateVpc
SpecType:
AssociationPropertyMetadata:
ValueLabelMapping:
professional: 专业版(高写版)
normal: 标准版(高写版)
professionalForHighRead: 专业版(高读版)
Label:
zh-cn: 规格类型
en: SpecType
Type: String
AllowedValues:
- normal
- professional
- professionalForHighRead
PayType:
Default: Hour
AssociationPropertyMetadata:
ValueLabelMapping:
Hour: 后付费(按量计费)
Month: 预付费(包年包月)
Label:
zh-cn: 付费类型
en: PayType
Type: String
AllowedValues:
- Hour
- Month
VpcCidrBlock:
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Equals:
- ${WhetherCreateVpc}
- true
Description:
zh-cn: VPC的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>
en: 'The ip address range of the VPC in the CidrBlock form; <br>You can use the following ip address ranges and their subnets: <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
Label:
zh-cn: 专有网络IPv4网段
en: VPC CIDR IPv4 Block
AssociationProperty: ALIYUN::VPC::VPC::CidrBlock
Type: String
DiskType:
AssociationPropertyMetadata:
ValueLabelMapping:
'0': 高效云盘
'1': SSD
Label:
zh-cn: 磁盘类型
en: DiskType
Type: String
AllowedValues:
- '0'
- '1'
VSwitchId:
Default: null
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Equals:
- ${WhetherCreateVpc}
- false
VpcId: ${VpcId}
ZoneId: ${VSwitchZoneId}
Type: String
Label:
zh-cn: 交换机实例ID
en: VSwitch ID
VSwitchZoneId:
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
Type: String
Description:
zh-cn: 现有交换机的可用区ID
en: Availability ID for existing switches
Label:
zh-cn: 交换机可用区
en: VSwitch Zone ID
IoMaxSpec:
Default: alikafka.hw.2xlarge
Type: String
Description:
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>
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>
Label:
zh-cn: 流量规格
en: IoMaxSpec
VSwitchCidrBlock:
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Equals:
- ${WhetherCreateVpc}
- true
VpcCidrBlock: VpcCidrBlock
Description:
zh-cn: 必须属于VPC的子网段。
en: Must belong to the subnet segment of VPC.
Default: 192.168.1.0/24
Label:
zh-cn: 交换机子网网段
en: VSwitch CIDR Block
AssociationProperty: ALIYUN::VPC::VSwitch::CidrBlock
Type: String
TopicQuota:
Default: 50
Label:
zh-cn: Topic的数量
en: TopicQuota
Type: Number
MaxValue: 79
MinValue: 50
DiskSize:
Description:
zh-cn: 单位:GB。
en: 'Unit: GB.'
Default: 500
MaxValue: 96000
MinValue: 500
Label:
zh-cn: 磁盘容量
en: DiskSize
Type: Number
Outputs:
KafkaInstanceId:
Value:
Fn::GetAtt:
- KafkaInstance
- InstanceId
Conditions:
CreateVpcCondition:
Fn::Equals:
- true
- Ref: WhetherCreateVpc
Resources:
VSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
VpcId:
Ref: Vpc
CidrBlock:
Ref: VSwitchCidrBlock
ZoneId:
Ref: VSwitchZoneId
Condition: CreateVpcCondition
Metadata:
ALIYUN::ROS::Designer:
id: cc854ba9-a556-4503-8c21-e52165d2ecde
KafkaInstance:
Type: ALIYUN::KAFKA::Instance
Properties:
DeployType: 5
DeployOption:
VpcId:
Fn::If:
- CreateVpcCondition
- Ref: Vpc
- Ref: VpcId
Name:
Fn::Join:
- '-'
- - StackId
- Ref: ALIYUN::StackId
- Kafka
SecurityGroup:
Ref: SecurityGroup
ZoneId:
Ref: VSwitchZoneId
VSwitchId:
Fn::If:
- CreateVpcCondition
- Ref: VSwitch
- Ref: VSwitchId
DeployModule: vpc
PayType:
Ref: PayType
DiskType:
Ref: DiskType
DiskSize:
Ref: DiskSize
IoMaxSpec:
Ref: IoMaxSpec
TopicQuota:
Ref: TopicQuota
SpecType:
Ref: SpecType
SecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Properties:
SecurityGroupIngress:
- Priority: 1
IpProtocol: all
NicType: internet
SourceCidrIp: 0.0.0.0/0
PortRange: '-1/-1'
- Priority: 1
IpProtocol: all
NicType: intranet
SourceCidrIp: 0.0.0.0/0
PortRange: '-1/-1'
VpcId:
Fn::If:
- CreateVpcCondition
- Ref: Vpc
- Ref: VpcId
SecurityGroupEgress:
- Priority: 1
IpProtocol: all
DestCidrIp: 0.0.0.0/0
NicType: internet
PortRange: '-1/-1'
- Priority: 1
IpProtocol: all
DestCidrIp: 0.0.0.0/0
NicType: intranet
PortRange: '-1/-1'
Metadata:
ALIYUN::ROS::Designer:
id: de0e55c1-4cf9-4647-bbdd-6e1c8deba4cd
Vpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock:
Ref: VpcCidrBlock
Condition: CreateVpcCondition
Metadata:
ALIYUN::ROS::Designer:
id: ccfeb4a0-28d4-4c68-949e-d7d920b5256c
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- WhetherCreateVpc
- VpcId
- VSwitchZoneId
- VSwitchId
- VpcCidrBlock
- VSwitchCidrBlock
Label:
default:
zh-cn: 基础资源配置(必填)
en: Infrastructure Configuration
- Parameters:
- PayType
- SpecType
- IoMaxSpec
- DiskType
- DiskSize
- TopicQuota
Label:
default:
zh-cn: Kafka 配置(必填)
en: Kafka Configuration
TemplateTags:
- acs:example:弹性计算:创建商业版Kafka实例