Yardstick virtualenv support 43/33643/1
authorchenjiankun <chenjiankun1@huawei.com>
Mon, 10 Apr 2017 11:01:57 +0000 (11:01 +0000)
committerJing Lu <lvjing5@huawei.com>
Sat, 22 Apr 2017 00:39:37 +0000 (00:39 +0000)
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)

api/api-prepare.sh
docker/Dockerfile
install.sh
requirements.txt
yardstick/common/constants.py

index f2be489..7632d9d 100755 (executable)
@@ -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
index 52a15df..96a5d77 100644 (file)
@@ -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
index 25a4f59..dc26636 100755 (executable)
@@ -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
 
index 749a0a9..0e6db69 100644 (file)
@@ -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
index 33266e2..cb98c35 100644 (file)
@@ -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')