Skip to content

Commit de6f8ee

Browse files
committed
moved wget from CF to AMI
1 parent 3d3f942 commit de6f8ee

File tree

3 files changed

+31
-29
lines changed

3 files changed

+31
-29
lines changed

cloudformation/dle_cf_template.yaml

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -160,39 +160,39 @@ Mappings:
160160
Arch: HVM64
161161
AWSRegionArch2AMI:
162162
eu-north-1:
163-
HVM64: ami-0888261a1eacb636e
163+
HVM64: ami-09d9e079b37b2cb70
164164
ap-south-1:
165-
HVM64: ami-00539bfa7a6926e1b
165+
HVM64: ami-02724fdeb697971fe
166166
eu-west-3:
167-
HVM64: ami-038d1f1d1ef71112b
167+
HVM64: ami-05d0e3243114ebecd
168168
eu-west-2:
169-
HVM64: ami-07c2bca027887871b
169+
HVM64: ami-04e33af41123d6dda
170170
eu-west-1:
171-
HVM64: ami-0e38f0f4f0acd49c2
171+
HVM64: ami-066433aacb63c1599
172172
ap-northeast-3:
173-
HVM64: ami-01cd2976ef1688c25
173+
HVM64: ami-0a21dfc175a1e7ca6
174174
ap-northeast-2:
175-
HVM64: ami-049c608703690f99e
175+
HVM64: ami-0ae0dd482bbe35b52
176176
ap-northeast-1:
177-
HVM64: ami-0cb59515cd67fdc93
177+
HVM64: ami-0627be691f1d37e46
178178
sa-east-1:
179-
HVM64: ami-0b3aeaa58412025de
179+
HVM64: ami-006f02a26fe6d6dab
180180
ca-central-1:
181-
HVM64: ami-075d0aae6fdd356b1
181+
HVM64: ami-0b6b8f39051e16607
182182
ap-southeast-1:
183-
HVM64: ami-054e735ba76985f92
183+
HVM64: ami-08af0daa0cad9e22c
184184
ap-southeast-2:
185-
HVM64: ami-06558ef4fedcf3c2f
185+
HVM64: ami-0f9db3c26e6c72bf5
186186
eu-central-1:
187-
HVM64: ami-048a27a74e4c1239d
187+
HVM64: ami-02af16e4c00db42d3
188188
us-east-1:
189-
HVM64: ami-0ed40b8023c788775
189+
HVM64: ami-0a30cae8ab4ebfaab
190190
us-east-2:
191-
HVM64: ami-0d6a0bd053962b66f
191+
HVM64: ami-03c6dd9057f62145e
192192
us-west-1:
193-
HVM64: ami-0ef7453c037b624ec
193+
HVM64: ami-044089283cd0a74f8
194194
us-west-2:
195-
HVM64: ami-0bdf048f8e10f02eb
195+
HVM64: ami-0df17c09c98bbed09
196196
Conditions:
197197
CreateSubDomain:
198198
!Not [!Equals [!Ref CertificateHostedZone, '']]
@@ -318,7 +318,7 @@ Resources:
318318

319319
yq e -i '
320320
.embeddedUI.host="" |
321-
.embeddedUI.dockerImage="registry.gitlab.com/postgres-ai/database-lab/ce-ui:$DLE_DOCKER_IMAGE_VERSION" |
321+
.embeddedUI.dockerImage="postgresai/ce-ui:$DLE_DOCKER_IMAGE_VERSION" |
322322
.server.verificationToken="${DLEVerificationToken}" |
323323
.poolManager.mountDir = "/var/lib/dblab/dblab_pool" |
324324
.retrieval.spec.logicalDump.options.dumpLocation="/var/lib/dblab/dblab_pool/dataset_1/dump/" |
@@ -354,6 +354,8 @@ Resources:
354354
export DOMAIN=${CertificateSubdomain}.${CertificateHostedZone}
355355
export USER_EMAIL=${CertificateEmail}
356356
export CERTIFICATE_EMAIL=${!USER_EMAIL:-'noreply@'$DOMAIN}
357+
358+
yq e -i '.cloning.accessHost="$DOMAIN"' $dle_config_path/server.yml
357359

358360
sudo certbot certonly --standalone -d $DOMAIN -m $CERTIFICATE_EMAIL --agree-tos -n
359361
sudo cp /etc/letsencrypt/live/$DOMAIN/fullchain.pem /etc/envoy/certs/fullchain1.pem
@@ -373,11 +375,6 @@ Resources:
373375
sudo systemctl start envoy
374376
fi
375377

376-
# upgrade ssm agent version
377-
wget https://s3.us-east-1.amazonaws.com/amazon-ssm-us-east-1/amazon-ssm-agent/3.1.1575.0/amazon-ssm-agent-ubuntu-amd64.tar.gz
378-
tar -xf amazon-ssm-agent-ubuntu-amd64.tar.gz
379-
bash snap-install.sh
380-
381378
# Initialize CLI configuration
382379
su ubuntu -c '/usr/local/bin/dblab init \
383380
--environment-id=test \
@@ -500,8 +497,8 @@ Outputs:
500497
Description: UI URL with a domain for newly created DLE instance
501498
Value: !Sub 'https://${CertificateSubdomain}.${CertificateHostedZone}:446'
502499
Condition: CreateSubDomain
503-
01WebUIUrl:
504-
Description: UI URL with a domain for newly created DLE instance
500+
01WebUIUrlLocal:
501+
Description: UI URL for newly created DLE instance
505502
Value: !Sub 'http://localhost:2346'
506503
Condition: NotCreateSubDomain
507504

@@ -540,8 +537,8 @@ Outputs:
540537
Description: Netdata URL with a domain for newly created DLE instance
541538
Value: !Sub 'https://${CertificateSubdomain}.${CertificateHostedZone}:19999'
542539
Condition: CreateSubDomain
543-
08NetdataUrl:
544-
Description: Netdata URL with a domain for newly created DLE instance
540+
08NetdataUrlLocal:
541+
Description: Netdata URL without a domain for newly created DLE instance
545542
Value: !Sub 'http://localhost:19999'
546543
Condition: NotCreateSubDomain
547544

cloudformation/getAMIs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ NOAMI="NOT_SUPPORTED"
1717
# Change your aws profile if needed here (example, " --profile default"):
1818
PROFILE=${DLE_AWS_PROFILE:-""}
1919

20-
DLE_CF_TEMPLATE_FILE="${DLE_CF_TEMPLATE_FILE:-dle_cf.yaml}"
20+
DLE_CF_TEMPLATE_FILE="${DLE_CF_TEMPLATE_FILE:-dle_cf_template.yaml}"
2121

2222
# Check whether AWS CLI is installed and in search path
2323
if ! aws_loc="$(type -p "aws")" || [ -z "$aws_loc" ]; then

packer/install-prereqs.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,15 @@ sudo /usr/local/bin/func-e use 1.19.1 # https://www.envoyproxy.io/docs/envoy/lat
5757
# Pull DLE image
5858
image_version=$(echo ${dle_version} | sed 's/v*//')
5959
sudo docker pull registry.gitlab.com/postgres-ai/database-lab/dblab-server:$image_version
60-
sudo docker pull postgresai/ce-ui:latest
60+
sudo docker pull postgresai/ce-ui:1.1.0
6161
sudo docker pull postgresai/extended-postgres:10
6262
sudo docker pull postgresai/extended-postgres:11
6363
sudo docker pull postgresai/extended-postgres:12
6464
sudo docker pull postgresai/extended-postgres:13
6565
sudo docker pull postgresai/extended-postgres:14
6666

67+
# upgrade ssm agent version
68+
wget https://s3.us-east-1.amazonaws.com/amazon-ssm-us-east-1/amazon-ssm-agent/3.1.1575.0/amazon-ssm-agent-ubuntu-amd64.tar.gz
69+
tar -xf amazon-ssm-agent-ubuntu-amd64.tar.gz
70+
sudo bash snap-install.sh
71+

0 commit comments

Comments
 (0)