aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchenjiankun <chenjiankun1@huawei.com>2017-04-10 11:01:57 +0000
committerJing Lu <lvjing5@huawei.com>2017-04-22 00:39:37 +0000
commit7d08b884344651d9ba3dd2830dcd976d2adba9f5 (patch)
tree5397b1050a84fc6e31775cc7b4a13bedd54295b7
parent87d8de27074f71db307891e1230a9341f852d945 (diff)
Yardstick virtualenv support
JIRA: YARDSTICK-620 In the patch, I separate python-setuptools from install.sh and separate appdirs from requirements.txt because there will be error when install them in virtualenv. Also I will update the documentation when this patch merged; Change-Id: I99a532d1851983775869e7c5e8e65fd0229e86df Signed-off-by: chenjiankun <chenjiankun1@huawei.com> (cherry picked from commit bb365d411d88a71871993b4ed803c2ffbbcb79bf)
-rwxr-xr-xapi/api-prepare.sh3
-rw-r--r--docker/Dockerfile5
-rwxr-xr-xinstall.sh4
-rw-r--r--requirements.txt1
-rw-r--r--yardstick/common/constants.py2
5 files changed, 9 insertions, 6 deletions
diff --git a/api/api-prepare.sh b/api/api-prepare.sh
index f2be48909..7632d9da9 100755
--- a/api/api-prepare.sh
+++ b/api/api-prepare.sh
@@ -33,6 +33,9 @@ close-on-exec = 1
daemonize= /var/log/yardstick/uwsgi.log
socket = /var/run/yardstick.sock
EOF
+ if [[ "${YARDSTICK_VENV}" ]];then
+ echo "virtualenv = ${YARDSTICK_VENV}" >> "${uwsgi_config}"
+ fi
fi
# nginx config
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 52a15df1b..96a5d774d 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -23,7 +23,10 @@ ENV IMAGE_DIR /home/opnfv/images/
ENV YARDSTICK_REPO_DIR ${REPOS_DIR}/yardstick
ENV RELENG_REPO_DIR ${REPOS_DIR}/releng
-RUN apt-get update && apt-get install -y git
+RUN apt-get update && apt-get install -y git python-setuptools python-pip
+RUN easy_install -U setuptools==30.0.0
+RUN pip install appdirs==1.4.0
+
RUN mkdir -p ${REPOS_DIR}
RUN git config --global http.sslVerify false
diff --git a/install.sh b/install.sh
index 25a4f5960..dc2663628 100755
--- a/install.sh
+++ b/install.sh
@@ -47,9 +47,7 @@ apt-get update && apt-get install -y \
uwsgi-plugin-python \
supervisor \
python-pip \
- vim \
- python-setuptools && \
- easy_install -U setuptools==30.0.0
+ vim
apt-get -y autoremove && apt-get clean
diff --git a/requirements.txt b/requirements.txt
index 749a0a9d0..0e6db69e2 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -8,7 +8,6 @@
##############################################################################
ansible==2.2.0.0
-appdirs==1.4.0
Babel==2.3.4
backport-ipaddress==0.1
cliff==2.3.0
diff --git a/yardstick/common/constants.py b/yardstick/common/constants.py
index 33266e233..cb98c356d 100644
--- a/yardstick/common/constants.py
+++ b/yardstick/common/constants.py
@@ -41,7 +41,7 @@ TESTCASE_DIR = join(YARDSTICK_ROOT_PATH, 'tests/opnfv/test_cases/')
TESTSUITE_DIR = join(YARDSTICK_ROOT_PATH, 'tests/opnfv/test_suites/')
# file
-OPENRC = get_param('file.openrc', '/etc/yardstick/yardstick.conf')
+OPENRC = get_param('file.openrc', '/etc/yardstick/openstack.creds')
CONF_FILE = join(CONF_DIR, 'yardstick.conf')
CONF_SAMPLE_FILE = join(CONF_SAMPLE_DIR, 'yardstick.conf.sample')
FETCH_SCRIPT = get_param('file.fetch_script', 'utils/fetch_os_creds.sh')