forked from scylladb/scylla-cluster-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-prereqs.sh
executable file
·69 lines (51 loc) · 1.97 KB
/
install-prereqs.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env bash
if yum --help; then
yum install -y epel-release
yum -y update
yum install -y wget unzip
# Python dependencies
yum install -y python-devel python-pip
pip install --upgrade pip
# Needed for PhantomJS
yum install -y freetype-devel libpng-devel bzip2 bitmap-fonts fontconfig
# Needed for Cassandra Python driver
yum install -y gcc
# Install OpenSSH client - needed to ssh to DB servers/ Loaders/ monitors
yum install -y openssh-clients
# Install Git - needed to get current SCT branch
yum install -y git
# Install OpenSSL - needed to update encryption key
yum install -y openssl
yum install -y iproute
yum install -y which
# Install Docker
yum install -y sudo # needed for Docker container build
# Install gettext - needed for k8s-* backends
yum install -y gettext
elif apt --help; then
apt-get install -y --no-install-recommends build-essential cmake libssl-dev zlib1g-dev libffi-dev
else
echo "Unsupported distro"
exit 1
fi
# Install kubectl needed for k8s-* backends
curl -o /tmp/kubectl -L "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
# Install docker
curl -fsSL get.docker.com --retry 5 --retry-max-time 300 -o get-docker.sh
sh get-docker.sh
groupadd docker || true
usermod -aG docker $USER || true
# Make sdcm available in python path
if [ "$1" == "docker" ]; then
ln -s /sct/sdcm /usr/lib/python2.7/site-packages/sdcm
else
pip install -r requirements-python.txt
pre-commit install
pre-commit install --hook-type commit-msg
ln -s `pwd`/sdcm $(python -c "import site; print site.getsitepackages()[0]")/sdcm
echo "========================================================="
echo "Please run 'aws configure' to configure AWS CLI and then"
echo "run 'get-qa-ssh-keys.sh' to retrieve AWS QA private keys"
echo "========================================================="
fi