forked from scylladb/scylla-cluster-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_venv
executable file
·34 lines (32 loc) · 935 Bytes
/
setup_venv
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
#!/usr/bin/env bash
GR=0
VENV_ROOT='.sct_venv'
run_rc() {
echo "Running '$1'"
eval $1
if [ $? != 0 ]; then
GR=1
fi
}
if ! [ -e "${VENV_ROOT}/bin/activate" ]
then
run_rc "virtualenv ${VENV_ROOT}"
fi
run_rc "source ${VENV_ROOT}/bin/activate"
run_rc "easy_install -U setuptools"
run_rc "pip install stevedore==1.11.0"
run_rc "pip install -r requirements.txt"
run_rc "pip install ."
if [ ${GR} -eq 0 ]
then
echo "Scylla Cluster Tests successfully configured"
echo "Now run 'source ${VENV_ROOT}/bin/activate' to work from the created virtual environment"
if ! [ -e "${HOME}/.aws/credentials" ]
then
echo "Make sure you execute 'aws configure' to configure AWS"
echo "Create a proper config file, see README.rst for more details"
fi
else
echo "An error was encountered during Scylla Cluster Tests setup"
echo "Review the logs, fix problems and re-run this script"
fi