@@ -108,7 +108,7 @@ Parameters:
108108 InstanceType :
109109 Description : DLE EC2 instance type
110110 Type : String
111- Default : m5.4xlarge
111+ Default : m5.2xlarge
112112 AllowedValues :
113113 - r5.large
114114 - r5.xlarge
@@ -126,13 +126,6 @@ Parameters:
126126 - m5.12xlarge
127127 - m5.16xlarge
128128 - m5.24xlarge
129- - t3.nano
130- - t3.micro
131- - t3.small
132- - t3.medium
133- - t3.large
134- - t3.xlarge
135- - t3.2xlarge
136129 ConstraintDescription : must be a valid EC2 instance type.
137130 SSHLocation :
138131 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
@@ -253,58 +246,46 @@ Mappings:
253246 Arch : HVM64
254247 m5.24xlarge :
255248 Arch : HVM64
256- t3.nano :
257- Arch : HVM64
258- t3.micro :
259- Arch : HVM64
260- t3.small :
261- Arch : HVM64
262- t3.medium :
263- Arch : HVM64
264- t3.large :
265- Arch : HVM64
266- t3.xlarge :
267- Arch : HVM64
268- t3.2xlarge :
269- Arch : HVM64
270249 AWSRegionArch2AMI :
271250 eu-north-1 :
272- HVM64 : ami-0665ae2cfbd4e342d
251+ HVM64 : ami-0888261a1eacb636e
273252 ap-south-1 :
274- HVM64 : ami-0e374efc30e300f09
253+ HVM64 : ami-00539bfa7a6926e1b
275254 eu-west-3 :
276- HVM64 : ami-0efda6ea87e5c4d96
255+ HVM64 : ami-038d1f1d1ef71112b
277256 eu-west-2 :
278- HVM64 : ami-0687cbc11ebc16691
257+ HVM64 : ami-07c2bca027887871b
279258 eu-west-1 :
280- HVM64 : ami-0d50368f3e8f1ccc0
259+ HVM64 : ami-0e38f0f4f0acd49c2
281260 ap-northeast-3 :
282- HVM64 : ami-0e65633c1b72de22f
261+ HVM64 : ami-01cd2976ef1688c25
283262 ap-northeast-2 :
284- HVM64 : ami-02f4e02a76c68579d
263+ HVM64 : ami-049c608703690f99e
285264 ap-northeast-1 :
286- HVM64 : ami-04603eedf1f55b4cb
265+ HVM64 : ami-0cb59515cd67fdc93
287266 sa-east-1 :
288- HVM64 : ami-05267d11294fbeb12
267+ HVM64 : ami-0b3aeaa58412025de
289268 ca-central-1 :
290- HVM64 : ami-0504c9f745022749a
269+ HVM64 : ami-075d0aae6fdd356b1
291270 ap-southeast-1 :
292- HVM64 : ami-0fdf327ea5e077df4
271+ HVM64 : ami-054e735ba76985f92
293272 ap-southeast-2 :
294- HVM64 : ami-01e5c77c1fbc46669
273+ HVM64 : ami-06558ef4fedcf3c2f
295274 eu-central-1 :
296- HVM64 : ami-0793f98b004f79c42
275+ HVM64 : ami-048a27a74e4c1239d
297276 us-east-1 :
298- HVM64 : ami-07ed8ca1867e9803a
277+ HVM64 : ami-0ed40b8023c788775
299278 us-east-2 :
300- HVM64 : ami-042693a1c63d12800
279+ HVM64 : ami-0d6a0bd053962b66f
301280 us-west-1 :
302- HVM64 : ami-0484ba45ecb22a99e
281+ HVM64 : ami-0ef7453c037b624ec
303282 us-west-2 :
304- HVM64 : ami-04859f68862a8bcfd
283+ HVM64 : ami-0bdf048f8e10f02eb
305284Conditions :
306285 CreateSubDomain :
307286 !Not [!Equals [!Ref CertificateHostedZone, '']]
287+ NotCreateSubDomain :
288+ !Not [Condition: CreateSubDomain]
308289
309290Resources :
310291 LambdaExecutionRole :
@@ -446,7 +427,7 @@ Resources:
446427 --volume $postgres_conf_path:/home/dblab/standard/postgres/control \
447428 --env DOCKER_API_VERSION=1.39 \
448429 --restart always \
449- registry.gitlab.com/postgres-ai/database-lab/dblab-server:3.1.0
430+ registry.gitlab.com/postgres-ai/database-lab/dblab-server:3.1.1
450431
451432 if [ ! -z "${CertificateHostedZone}" ]; then
452433 export DOMAIN=${CertificateSubdomain}.${CertificateHostedZone}
@@ -470,6 +451,18 @@ Resources:
470451 sudo systemctl enable envoy
471452 sudo systemctl start envoy
472453 fi
454+
455+ while ! echo "UI started" | nc localhost 2346; do sleep 10; done
456+ /opt/aws/bin/cfn-signal -e $? -d "DLE UI is available" -r "DLE Deploy Process Complete" '${WaitHandle}'
457+
458+ WaitHandle :
459+ Type : AWS::CloudFormation::WaitConditionHandle
460+ WaitCondition :
461+ Type : AWS::CloudFormation::WaitCondition
462+ DependsOn : DLEInstance
463+ Properties :
464+ Handle : !Ref 'WaitHandle'
465+ Timeout : ' 600'
473466
474467 MountPoint :
475468 Type : AWS::EC2::VolumeAttachment
@@ -539,49 +532,52 @@ Resources:
539532 VpcId : !Ref VPC
540533
541534Outputs :
542- VerificationToken :
535+ 02VerificationToken :
543536 Description : ' DLE verification token'
544537 Value : !Ref DLEVerificationToken
545538
546- DLE :
539+ 08DLEInstance :
547540 Description : URL for newly created DLE instance
548541 Value : !Sub 'https://${CertificateSubdomain}.${CertificateHostedZone}'
549542 Condition : CreateSubDomain
550543
551- UI :
544+ 01WebUIUrl :
552545 Description : UI URL with a domain for newly created DLE instance
553546 Value : !Sub 'https://${CertificateSubdomain}.${CertificateHostedZone}:446'
554547 Condition : CreateSubDomain
548+ 01WebUIUrl :
549+ Description : UI URL with a domain for newly created DLE instance
550+ Value : !Sub 'http://localhost:2346'
551+ Condition : NotCreateSubDomain
555552
556- EBSVolume :
553+ 07EBSVolumeSize :
557554 Description : Size of provisioned EBS volume
558555 Value : !GetAtt SizeCalculate.Value
559556
560- DNSName :
557+ 03DNSName :
561558 Description : Public DNS name
562559 Value : !GetAtt DLEInstance.PublicDnsName
563560
564- EC2SSH :
561+ 06EC2SSH :
565562 Description : SSH connection to the EC2 instance with Database Lab Engine
566563 Value : !Sub
567- - ' ssh -i YOUR_PRIVATE_KEY ubuntu@${DNSName}'
564+ - ' ssh ubuntu@${DNSName} -i YOUR_PRIVATE_KEY '
568565 - DNSName : !GetAtt DLEInstance.PublicDnsName
569566
570- DLETunnel :
567+ 05DLETunnel :
571568 Description : Create an SSH-tunnel to Database Lab Engine
572569 Value : !Sub
573- - ' ssh -N -L 2345:${DNSName}:2345 -i YOUR_PRIVATE_KEY ubuntu@${DNSName}'
570+ - ' ssh -N -L 2345:${DNSName}:2345 ubuntu@${DNSName} -i YOUR_PRIVATE_KEY '
574571 - DNSName : !GetAtt DLEInstance.PublicDnsName
575572
576- UITunnel :
577- Description : Create an SSH-tunnel to Database Lab UI
573+ 00UITunnel :
574+ Description : Use SSH port forwarding to be able to access DLE UI
578575 Value : !Sub
579- - ' ssh -N -L 2346:${DNSName}:2346 -i YOUR_PRIVATE_KEY ubuntu@${DNSName}'
576+ - ' ssh -N -L 2346:${DNSName}:2346 ubuntu@${DNSName} -i YOUR_PRIVATE_KEY '
580577 - DNSName : !GetAtt DLEInstance.PublicDnsName
581578
582- CloneTunnel :
583- Description : Create an SSH-tunnel to Database Lab clones
579+ 04CloneTunnel :
580+ Description : Use SSH port forwarding to be able to access a database clone
584581 Value : !Sub
585- - ' ssh -N -L CLONE_PORT:${DNSName}:CLONE_PORT -i YOUR_PRIVATE_KEY ubuntu@${DNSName}'
582+ - ' ssh -N -L CLONE_PORT:${DNSName}:CLONE_PORT ubuntu@${DNSName} -i YOUR_PRIVATE_KEY '
586583 - DNSName : !GetAtt DLEInstance.PublicDnsName
587-
0 commit comments