-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy path_prerequisites.ubuntu.sh
43 lines (36 loc) · 1.08 KB
/
_prerequisites.ubuntu.sh
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
#!/bin/bash
set -euxo pipefail
if [[ -x "$(command -v zfs)" ]] && [[ -x "$(command -v docker)" ]]; then
echo "Docker and ZFS are installed – assume that secondary tools (such as jq or curl) are installed too."
else
# Install dependencies
sudo apt-get update && sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common \
jq
# Install Docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get install -y \
docker-ce \
docker-ce-cli \
containerd.io
# Install ZFS
sudo apt-get install -y \
zfsutils-linux
# Install psql
sudo apt-get install -y \
postgresql-client
# Install yq
if ! command -v yq &> /dev/null; then
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64 && \
sudo add-apt-repository ppa:rmescandon/yq && \
sudo apt-get update && sudo apt-get install yq -y
fi
fi