forked from scylladb/scylla-cluster-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-prereqs.sh
executable file
·59 lines (49 loc) · 1.78 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
#!/usr/bin/env bash
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
curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh
groupadd docker || true
usermod -aG docker $USER || true
# Install kubectl and gettext - needed for k8s-* backends
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF
yum install -y kubectl gettext
# 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