Skip to content

Commit 31cbce0

Browse files
committed
bug-fix: ZFS pool creation on different EC2 types
1 parent 1ef5174 commit 31cbce0

File tree

1 file changed

+73
-157
lines changed

1 file changed

+73
-157
lines changed

Diff for: cloudformation/dle_cf_template.yaml

+73-157
Original file line numberDiff line numberDiff line change
@@ -101,62 +101,31 @@ Parameters:
101101
InstanceType:
102102
Description: DLE EC2 instance type
103103
Type: String
104-
Default: t2.small
104+
Default: m5.4xlarge
105105
AllowedValues:
106-
- t1.micro
107-
- t2.nano
108-
- t2.micro
109-
- t2.small
110-
- t2.medium
111-
- t2.large
112-
- m1.small
113-
- m1.medium
114-
- m1.large
115-
- m1.xlarge
116-
- m2.xlarge
117-
- m2.2xlarge
118-
- m2.4xlarge
119-
- m3.medium
120-
- m3.large
121-
- m3.xlarge
122-
- m3.2xlarge
123-
- m4.large
124-
- m4.xlarge
125-
- m4.2xlarge
126-
- m4.4xlarge
127-
- m4.10xlarge
128-
- c1.medium
129-
- c1.xlarge
130-
- c3.large
131-
- c3.xlarge
132-
- c3.2xlarge
133-
- c3.4xlarge
134-
- c3.8xlarge
135-
- c4.large
136-
- c4.xlarge
137-
- c4.2xlarge
138-
- c4.4xlarge
139-
- c4.8xlarge
140-
- g2.2xlarge
141-
- g2.8xlarge
142-
- r3.large
143-
- r3.xlarge
144-
- r3.2xlarge
145-
- r3.4xlarge
146-
- r3.8xlarge
147-
- i2.xlarge
148-
- i2.2xlarge
149-
- i2.4xlarge
150-
- i2.8xlarge
151-
- d2.xlarge
152-
- d2.2xlarge
153-
- d2.4xlarge
154-
- d2.8xlarge
155-
- hi1.4xlarge
156-
- hs1.8xlarge
157-
- cr1.8xlarge
158-
- cc2.8xlarge
159-
- cg1.4xlarge
106+
- r5.large
107+
- r5.xlarge
108+
- r5.2xlarge
109+
- r5.4xlarge
110+
- r5.8xlarge
111+
- r5.12xlarge
112+
- r5.16xlarge
113+
- r5.24xlarge
114+
- m5.large
115+
- m5.xlarge
116+
- m5.2xlarge
117+
- m5.4xlarge
118+
- m5.8xlarge
119+
- m5.12xlarge
120+
- m5.16xlarge
121+
- m5.24xlarge
122+
- t3.nano
123+
- t3.micro
124+
- t3.small
125+
- t3.medium
126+
- t3.large
127+
- t3.xlarge
128+
- t3.2xlarge
160129
ConstraintDescription: must be a valid EC2 instance type.
161130
SSHLocation:
162131
Description: CIDR in format x.x.x.x/32 to allow one specific IP address access, 0.0.0.0/0 to allow all IP addresses access, or another CIDR range
@@ -170,13 +139,13 @@ Parameters:
170139
Type: Number
171140
Default: 40
172141
CertificateSubdomain:
173-
Description: Subdomain to obtain a TLS certificate for (for example, dle)
142+
Description: Subdomain to obtain a TLS certificate for (for example, dle). Leave it empty if you don't need SSL connection or don't have Route 53 hosted zone.
174143
Type: String
175144
CertificateHostedZone:
176-
Description: Hosted zone to obtain a TLS certificate for (for example, example.com)
145+
Description: Hosted zone to obtain a TLS certificate for (for example, example.com). Leave it empty if you don't need SSL connection or don't have Route 53 hosted zone.
177146
Type: String
178147
CertificateEmail:
179-
Description: Email address for important account notifications about the issued TLS certificate
148+
Description: Email address for important account notifications about the issued TLS certificate. Leave it empty if you don't need SSL connection or don't have Route 53 hosted zone.
180149
Type: String
181150
AllowedPattern: '^$|[^\s@]+@[^\s@]+\.[^\s@]+'
182151
Default: ''
@@ -205,7 +174,7 @@ Parameters:
205174
SourcePostgresVersion:
206175
Description: Source database Postgres version
207176
Type: String
208-
Default: 12
177+
Default: 14
209178
AllowedValues:
210179
- 9.6
211180
- 10
@@ -246,144 +215,87 @@ Parameters:
246215
Default: ''
247216
Mappings:
248217
AWSInstanceType2Arch:
249-
t1.micro:
218+
r5.large:
250219
Arch: HVM64
251-
t2.nano:
220+
r5.xlarge:
252221
Arch: HVM64
253-
t2.micro:
222+
r5.2xlarge:
254223
Arch: HVM64
255-
t2.small:
224+
r5.4xlarge:
256225
Arch: HVM64
257-
t2.medium:
226+
r5.8xlarge:
258227
Arch: HVM64
259-
t2.large:
228+
r5.12xlarge:
260229
Arch: HVM64
261-
m1.small:
230+
r5.16xlarge:
262231
Arch: HVM64
263-
m1.medium:
232+
r5.24xlarge:
264233
Arch: HVM64
265-
m1.large:
234+
m5.large:
266235
Arch: HVM64
267-
m1.xlarge:
236+
m5.xlarge:
268237
Arch: HVM64
269-
m2.xlarge:
238+
m5.2xlarge:
270239
Arch: HVM64
271-
m2.2xlarge:
240+
m5.4xlarge:
272241
Arch: HVM64
273-
m2.4xlarge:
242+
m5.8xlarge:
274243
Arch: HVM64
275-
m3.medium:
244+
m5.12xlarge:
276245
Arch: HVM64
277-
m3.large:
246+
m5.16xlarge:
278247
Arch: HVM64
279-
m3.xlarge:
248+
m5.24xlarge:
280249
Arch: HVM64
281-
m3.2xlarge:
250+
t3.nano:
282251
Arch: HVM64
283-
m4.large:
252+
t3.micro:
284253
Arch: HVM64
285-
m4.xlarge:
254+
t3.small:
286255
Arch: HVM64
287-
m4.2xlarge:
256+
t3.medium:
288257
Arch: HVM64
289-
m4.4xlarge:
258+
t3.large:
290259
Arch: HVM64
291-
m4.10xlarge:
260+
t3.xlarge:
292261
Arch: HVM64
293-
c1.medium:
294-
Arch: HVM64
295-
c1.xlarge:
296-
Arch: HVM64
297-
c3.large:
298-
Arch: HVM64
299-
c3.xlarge:
300-
Arch: HVM64
301-
c3.2xlarge:
302-
Arch: HVM64
303-
c3.4xlarge:
304-
Arch: HVM64
305-
c3.8xlarge:
306-
Arch: HVM64
307-
c4.large:
308-
Arch: HVM64
309-
c4.xlarge:
310-
Arch: HVM64
311-
c4.2xlarge:
312-
Arch: HVM64
313-
c4.4xlarge:
314-
Arch: HVM64
315-
c4.8xlarge:
316-
Arch: HVM64
317-
r3.large:
318-
Arch: HVM64
319-
r3.xlarge:
320-
Arch: HVM64
321-
r3.2xlarge:
322-
Arch: HVM64
323-
r3.4xlarge:
324-
Arch: HVM64
325-
r3.8xlarge:
326-
Arch: HVM64
327-
i2.xlarge:
328-
Arch: HVM64
329-
i2.2xlarge:
330-
Arch: HVM64
331-
i2.4xlarge:
332-
Arch: HVM64
333-
i2.8xlarge:
334-
Arch: HVM64
335-
d2.xlarge:
336-
Arch: HVM64
337-
d2.2xlarge:
338-
Arch: HVM64
339-
d2.4xlarge:
340-
Arch: HVM64
341-
d2.8xlarge:
342-
Arch: HVM64
343-
hi1.4xlarge:
344-
Arch: HVM64
345-
hs1.8xlarge:
346-
Arch: HVM64
347-
cr1.8xlarge:
348-
Arch: HVM64
349-
cc2.8xlarge:
262+
t3.2xlarge:
350263
Arch: HVM64
351264
AWSRegionArch2AMI:
352265
eu-north-1:
353-
HVM64: ami-034e4aed1f3ca0c3c
266+
HVM64: ami-0665ae2cfbd4e342d
354267
ap-south-1:
355-
HVM64: ami-0e659eacedfb041d7
268+
HVM64: ami-0e374efc30e300f09
356269
eu-west-3:
357-
HVM64: ami-08e35ca54e9190c97
270+
HVM64: ami-0efda6ea87e5c4d96
358271
eu-west-2:
359-
HVM64: ami-0ecae7aba70abc116
272+
HVM64: ami-0687cbc11ebc16691
360273
eu-west-1:
361-
HVM64: ami-042f1da51ef5fd484
274+
HVM64: ami-0d50368f3e8f1ccc0
362275
ap-northeast-3:
363-
HVM64: ami-01e9e9d567c32dd8f
276+
HVM64: ami-0e65633c1b72de22f
364277
ap-northeast-2:
365-
HVM64: ami-090fe41b7122583e1
278+
HVM64: ami-02f4e02a76c68579d
366279
ap-northeast-1:
367-
HVM64: ami-071b0fe046bc270b3
280+
HVM64: ami-04603eedf1f55b4cb
368281
sa-east-1:
369-
HVM64: ami-07a47547657f8dc18
282+
HVM64: ami-05267d11294fbeb12
370283
ca-central-1:
371-
HVM64: ami-0578cffaf594ab219
284+
HVM64: ami-0504c9f745022749a
372285
ap-southeast-1:
373-
HVM64: ami-0f151d9dcf524c7c2
286+
HVM64: ami-0fdf327ea5e077df4
374287
ap-southeast-2:
375-
HVM64: ami-005263d8988e47a47
288+
HVM64: ami-01e5c77c1fbc46669
376289
eu-central-1:
377-
HVM64: ami-0b32ee6d741554a21
290+
HVM64: ami-0793f98b004f79c42
378291
us-east-1:
379-
HVM64: ami-088b2214cd2a232dc
292+
HVM64: ami-07ed8ca1867e9803a
380293
us-east-2:
381-
HVM64: ami-033774769e0f3cfc7
294+
HVM64: ami-042693a1c63d12800
382295
us-west-1:
383-
HVM64: ami-07215a5d464906c4c
296+
HVM64: ami-0484ba45ecb22a99e
384297
us-west-2:
385-
HVM64: ami-05b2a489e553d9f0c
386-
298+
HVM64: ami-04859f68862a8bcfd
387299
Conditions:
388300
CreateSubDomain:
389301
!Not [!Equals [!Ref CertificateHostedZone, '']]
@@ -430,6 +342,10 @@ Resources:
430342
set -ex
431343

432344
sleep 30
345+
346+
347+
# This code tested and works on Ubuntu 20.04 (current base AMI)
348+
disk=$(lsblk -e7 --output PATH,NAME,FSTYPE --json | jq -r '.blockdevices[] | select(.children == null and .fstype == null) | .path ')
433349

434350
sudo zpool create -f \
435351
-O compression=on \
@@ -438,7 +354,7 @@ Resources:
438354
-O logbias=throughput \
439355
-m /var/lib/dblab/dblab_pool \
440356
dblab_pool \
441-
/dev/xvdh
357+
$disk
442358

443359
dle_config_path="/home/ubuntu/.dblab/engine/configs"
444360
dle_meta_path="/home/ubuntu/.dblab/engine/meta"

0 commit comments

Comments
 (0)