Skip to content

Commit 1ef5174

Browse files
committed
Merge branch 'nik-polish-install-prereqs' into 'master'
Reorganize install-prereqs.sh See merge request postgres-ai/database-lab!526
2 parents 9ea92c2 + 84a2ec5 commit 1ef5174

File tree

1 file changed

+28
-30
lines changed

1 file changed

+28
-30
lines changed

Diff for: packer/install-prereqs.sh

+28-30
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,28 @@
22

33
set -euxo pipefail
44

5+
### Upgrade the existing software
56
sudo apt update -y
67
sudo apt upgrade -y
78
sudo apt full-upgrade
89

9-
sudo apt-get update && sudo apt-get install -y \
10+
### Extend the list of apt repositories
11+
# yq repo
12+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64
13+
sudo add-apt-repository ppa:rmescandon/yq
14+
15+
# Docker repo
16+
wget --quiet -O - https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
17+
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
18+
19+
# Postgres PGDG repo
20+
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
21+
sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main"
22+
23+
sudo apt-get update -y
24+
25+
### Installation steps – first, using apt, then non-apt steps, and, finally, get Docker container for DLE
26+
sudo apt-get install -y \
1027
apt-transport-https \
1128
ca-certificates \
1229
gnupg-agent \
@@ -15,41 +32,22 @@ sudo apt-get update && sudo apt-get install -y \
1532
curl \
1633
gnupg2 \
1734
zfsutils-linux \
18-
19-
# Install Docker
20-
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
21-
22-
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
23-
sudo apt-get update && sudo apt-get install -y \
2435
docker-ce \
2536
docker-ce-cli \
26-
containerd.io
37+
containerd.io \
38+
postgresql-client-14 \
39+
s3fs \
40+
yq \
41+
jq
2742

28-
# pull DLE docker image
29-
image_version=$(echo ${dle_version} | sed 's/v*//')
30-
sudo docker pull registry.gitlab.com/postgres-ai/database-lab/dblab-server:$image_version
31-
32-
#install postgres client
33-
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
34-
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" |sudo tee /etc/apt/sources.list.d/pgdg.list
35-
sudo apt-get update && sudo apt-get install -y postgresql-client-13
36-
37-
#install certbot
43+
# Install certbot
3844
sudo snap install certbot --classic
3945
sudo ln -s /snap/bin/certbot /usr/bin/certbot
4046

41-
#install envoy
47+
# Install Envoy
4248
curl https://func-e.io/install.sh | sudo bash -s -- -b /usr/local/bin
4349
sudo /usr/local/bin/func-e use 1.19.1 # https://www.envoyproxy.io/docs/envoy/latest/version_history/v1.20.0#incompatible-behavior-changes
4450

45-
46-
#install s3fs
47-
sudo apt install s3fs
48-
49-
#install yq
50-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64
51-
sudo add-apt-repository ppa:rmescandon/yq
52-
sudo apt update && sudo apt install yq -y
53-
54-
#install jq
55-
sudo apt install jq -y
51+
# Pull DLE image
52+
image_version=$(echo ${dle_version} | sed 's/v*//')
53+
sudo docker pull registry.gitlab.com/postgres-ai/database-lab/dblab-server:$image_version

0 commit comments

Comments
 (0)