-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtdengine-entrypoint-new-vpc.template.yaml
304 lines (304 loc) · 11.4 KB
/
tdengine-entrypoint-new-vpc.template.yaml
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
AWSTemplateFormatVersion: '2010-09-09'
Description: TDengine Cluster Deployment Partner Solution (qs-1tsfh53cc).
Metadata:
cfn-lint: { config: { ignore_checks: [ W9002, W9003, W9004, W9006 ] } }
LICENSE: Apache License Version 2.0
QuickStartDocumentation:
EntrypointName: Parameters to deploy TDengine Cluster Partner Solution into new VPC.
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: VPC network configuration
Parameters:
- AvailabilityZones
- NumberOfAZs
- VPCCIDR
- PrivateSubnet1ACIDR
- PrivateSubnet2ACIDR
- PublicSubnet1CIDR
- PublicSubnet2CIDR
- Label:
default: Partner Solution configuration
Parameters:
- QSS3BucketName
- QSS3KeyPrefix
- QSS3BucketRegion
- RemoteAccessCIDR
- Label:
default: Amazon EC2 configuration
Parameters:
- KeyPairName
- Label:
default: Bastion configuration
Parameters:
- BastionAMIOS
- BastionInstanceType
- NumBastionHosts
- Label:
default: TDengine general configuration
Parameters:
- ParamBucketName
- EntDownloadLink
- Label:
default: TDengine cluster configuration
Parameters:
# - InstanceAmiId
- InstanceType
- DiskSize
- NumberOfServers
ParameterLabels:
AvailabilityZones:
default: Availability Zones
NumberOfAZs:
default: Number of Availability Zones
PrivateSubnet1ACIDR:
default: Private subnet 1 CIDR
PrivateSubnet2ACIDR:
default: Private subnet 2 CIDR
PublicSubnet1CIDR:
default: Public subnet 1 CIDR
PublicSubnet2CIDR:
default: Public subnet 2 CIDR
VPCCIDR:
default: VPC CIDR
RemoteAccessCIDR:
default: Allowed bastion external access CIDR
KeyPairName:
default: Key pair name
BastionAMIOS:
default: Bastion AMI OS
BastionInstanceType:
default: Bastion instance type
NumBastionHosts:
default: Number of bastion hosts
QSS3BucketName:
default: S3 bucket name
QSS3BucketRegion:
default: S3 bucket Region
QSS3KeyPrefix:
default: S3 key prefix
ParamBucketName:
default: S3 bucket for DataTiering. By default, deploy SSD and S3 bucket two data tiering.
EntDownloadLink:
default: Enterprise download link
#InstanceAmiId:
# default: Instance AmiId
InstanceType:
default: Instance type
DiskSize:
default: Disk size
NumberOfServers:
default: Number of servers
Parameters:
AvailabilityZones:
Description: 'List of Availability Zones (AZs) to use for VPC subnets. More AZs improve availability of the system and fewer AZs reduce cost of data traffic between AZs.'
Type: List<AWS::EC2::AvailabilityZone::Name>
NumberOfAZs:
Type: String
AllowedValues: [ "2" ]
Default: "2"
Description: Number of Availability Zones to use in VPC. This must match the value entered for AvailabilityZones parameter.
PrivateSubnet1ACIDR:
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$
ConstraintDescription: Must be a valid IP range in the format x.x.x.x/x.
Default: 10.0.0.0/19
Description: 'CIDR block for private subnet 1, located in Availability Zone 1.'
Type: String
PrivateSubnet2ACIDR:
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$
ConstraintDescription: Must be a valid IP range in the format x.x.x.x/x.
Default: 10.0.32.0/19
Description: '(Ignore if you chose one Availability Zone) CIDR block for private subnet 2, located in Availability Zone 2.'
Type: String
PublicSubnet1CIDR:
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$
ConstraintDescription: Must be a valid IP range in the format x.x.x.x/x.
Default: 10.0.128.0/20
Description: 'CIDR block for public DMZ subnet 1, located in Availability Zone 1.'
Type: String
PublicSubnet2CIDR:
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$
ConstraintDescription: Must be a valid IP range in the format x.x.x.x/x.
Default: 10.0.144.0/20
Description: (Ignore if you chose one Availability Zone) CIDR block for public DMZ subnet 2, located in Availability Zone 2.
Type: String
VPCCIDR:
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$
ConstraintDescription: Must be a valid IP range in the format x.x.x.x/x.
Default: 10.0.0.0/16
Description: CIDR block for VPC.
Type: String
RemoteAccessCIDR:
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$
ConstraintDescription: CIDR block parameter must be in the format x.x.x.x/x.
Description: Allowed CIDR block for external Secure Shell (SSH) access to bastion hosts.
Default: 10.0.0.0/16
Type: String
KeyPairName:
Description: Key pairs allow you to connect to your instance after it launches.
Type: AWS::EC2::KeyPair::KeyName
BastionAMIOS:
AllowedValues:
- Amazon-Linux2-HVM
- CentOS-7-HVM
- Ubuntu-Server-20.04-LTS-HVM
- SUSE-SLES-15-HVM
Default: Amazon-Linux2-HVM
Description: Linux distribution for AMI used for bastion instances.
Type: String
BastionInstanceType:
AllowedValues:
- t2.nano
- t2.micro
- t2.small
- t2.medium
- t2.large
- t3.micro
- t3.small
- t3.medium
- t3.large
- t3.xlarge
- t3.2xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m4.large
- m4.xlarge
- m4.2xlarge
- m4.4xlarge
Default: t3.micro
Description: Amazon EC2 instance type for bastion instances.
Type: String
NumBastionHosts:
AllowedValues:
- "1"
- "2"
- "3"
- "4"
Default: "1"
Description: Enter number of bastion hosts to create.
Type: String
QSS3BucketName:
AllowedPattern: ^[0-9a-z]+([0-9a-z-\.]*[0-9a-z])*$
ConstraintDescription: >-
The S3 bucket name can include numbers, lowercase letters,
and hyphens (-), but it cannot start or end with a hyphen.
Default: aws-quickstart
Description: >-
Name of the S3 bucket for your copy of the deployment assets. Keep the default
name unless you are customizing the template. Changing the name updates code
references to point to a new location.
MinLength: 3
MaxLength: 63
Type: String
QSS3KeyPrefix:
AllowedPattern: ^([0-9a-zA-Z!-_\.\*'\(\)/]+/)*$
ConstraintDescription: >-
The S3 key prefix can include numbers, lowercase letters, uppercase letters,
hyphens (-), underscores (_), periods (.), asterisks (*), single quotes ('),
open parenthesis ((), close parenthesis ()), and forward slashes (/). End the
prefix with a forward slash.
Default: quickstart-taosdata-tdengine-enterprise/
Description: >-
S3 key prefix that is used to simulate a folder for your copy of the
deployment assets. Keep the default prefix unless you are customizing
the template. Changing the prefix updates code references to point to
a new location.
Type: String
QSS3BucketRegion:
Default: us-east-1
Description: >-
AWS Region where the S3 bucket (QSS3BucketName) is hosted. Keep
the default Region unless you are customizing the template. Changing the Region
updates code references to point to a new location. When using your own bucket,
specify the Region.
Type: String
EntDownloadLink:
Description: Enterprise install package download link. For more information, refer to https://www.taosdata.com/products#enterprise-edition-link.
Type: String
ParamBucketName:
Description: Description of what it's for.
AllowedPattern: '^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$'
Type: String
InstanceType:
Description: EC2 instance type.
Type: String
Default: t3.medium
AllowedValues:
- t3.medium
- t3.large
- t3.xlarge
- t3.2xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.12xlarge
- c5.18xlarge
DiskSize:
Description: Size (in GB) of EBS volume on each node.
Type: Number
Default: 100
MinValue: 10
ConstraintDescription: "Minimum disk size is 10."
NumberOfServers:
Description: Must be 3 or more to form a cluster.
Type: Number
Default: 3
AllowedValues:
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Conditions:
UsingDefaultBucket: !Equals [!Ref QSS3BucketName, 'aws-quickstart']
Resources:
VPCStack:
Type: AWS::CloudFormation::Stack
Metadata:
cfn-lint: { config: { ignore_checks: [ W9901 ] } }
Properties:
TemplateURL: !Sub
- 'https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}submodules/quickstart-aws-vpc/templates/aws-vpc.template.yaml'
- S3Region: !If [ UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion ]
S3Bucket: !If [ UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName ]
Parameters:
AvailabilityZones: !Join [ ',', !Ref 'AvailabilityZones' ]
NumberOfAZs: !Ref NumberOfAZs
PublicSubnet1CIDR: !Ref PublicSubnet1CIDR
PublicSubnet2CIDR: !Ref PublicSubnet2CIDR
PrivateSubnet1ACIDR: !Ref PrivateSubnet1ACIDR
PrivateSubnet2ACIDR: !Ref PrivateSubnet2ACIDR
VPCCIDR: !Ref VPCCIDR
TDEngineStack:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: !Sub
- 'https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/tdengine-entrypoint-existing-vpc.template.yaml'
- S3Region: !If [ UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion ]
S3Bucket: !If [ UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName ]
Parameters:
VPCID: !GetAtt VPCStack.Outputs.VPCID
PublicSubnet1ID: !GetAtt VPCStack.Outputs.PublicSubnet1ID
PublicSubnet2ID: !GetAtt VPCStack.Outputs.PublicSubnet2ID
PrivateSubnet1ID: !GetAtt VPCStack.Outputs.PrivateSubnet1AID
PrivateSubnet2ID: !GetAtt VPCStack.Outputs.PrivateSubnet2AID
KeyPairName: !Ref KeyPairName
QSS3BucketName: !Ref QSS3BucketName
QSS3KeyPrefix: !Ref QSS3KeyPrefix
QSS3BucketRegion: !Ref QSS3BucketRegion
RemoteAccessCIDR: !Ref RemoteAccessCIDR
NumBastionHosts: !Ref NumBastionHosts
BastionInstanceType: !Ref BastionInstanceType
BastionAMIOS: !Ref BastionAMIOS
EntDownloadLink: !Ref EntDownloadLink
ParamBucketName: !Ref ParamBucketName
InstanceAmiId: '{{resolve:ssm:/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2}}'
InstanceType: !Ref InstanceType
NumberOfServers: !Ref NumberOfServers
DiskSize: !Ref DiskSize