summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docker/Dockerfile14
-rw-r--r--dovetail/conf/functest_config.yml2
-rw-r--r--dovetail/conf/yardstick_config.yml2
-rwxr-xr-xdovetail/run.py2
-rw-r--r--dovetail/utils/dovetail_utils.py35
5 files changed, 23 insertions, 32 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index a700a313..fbe48495 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -2,6 +2,8 @@ FROM ubuntu:14.04
MAINTAINER Leo Wang <grakiss.wanglei@huawei.com>
LABEL version="0.1" description="OPNFV Dovetail Docker Container"
+ARG BRANCH=master
+
RUN \
apt-get update \
&& \
@@ -25,17 +27,13 @@ ENV REPOS_DIR ${HOME}/dovetail
WORKDIR /home/opnfv
RUN \
- git config --global http.sslVerify false \
-&& \
- git clone https://git.opnfv.org/dovetail ${REPOS_DIR} \
+ mkdir -p ${REPOS_DIR} \
&& \
- pip install -U pip \
-&& \
- pip install -r ${REPOS_DIR}/requirements.txt \
+ git config --global http.sslVerify false \
&& \
- cd ${REPOS_DIR} \
+ pip install git+https://git.opnfv.org/dovetail@$BRANCH#egg=dovetail \
&& \
- pip install -e .
+ ln -s /usr/local/lib/python2.7/dist-packages/dovetail ${REPOS_DIR}/dovetail
WORKDIR ${REPOS_DIR}/dovetail
diff --git a/dovetail/conf/functest_config.yml b/dovetail/conf/functest_config.yml
index 460506a6..05eaa909 100644
--- a/dovetail/conf/functest_config.yml
+++ b/dovetail/conf/functest_config.yml
@@ -1,7 +1,7 @@
---
functest:
image_name: opnfv/functest
- docker_tag: latest
+ docker_tag: danube.2.0
opts: '-id --privileged=true'
config:
dir: '/home/opnfv/userconfig'
diff --git a/dovetail/conf/yardstick_config.yml b/dovetail/conf/yardstick_config.yml
index 9f56cb11..34d5a0d8 100644
--- a/dovetail/conf/yardstick_config.yml
+++ b/dovetail/conf/yardstick_config.yml
@@ -1,7 +1,7 @@
---
yardstick:
image_name: opnfv/yardstick
- docker_tag: latest
+ docker_tag: danube.2.0
opts: '-id --privileged=true'
config:
dir: '/home/opnfv/userconfig'
diff --git a/dovetail/run.py b/dovetail/run.py
index 2ace2c20..80cb0980 100755
--- a/dovetail/run.py
+++ b/dovetail/run.py
@@ -173,7 +173,7 @@ def clean_results_dir():
if os.path.exists(result_path):
if os.path.isdir(result_path):
cmd = 'sudo rm -rf %s/*' % (result_path)
- dt_utils.exec_cmd(cmd, exit_on_error=False)
+ dt_utils.exec_cmd(cmd, exit_on_error=False, exec_msg_on=False)
else:
print "result_dir in dovetail_config.yml is not a directory."
raise SystemExit(1)
diff --git a/dovetail/utils/dovetail_utils.py b/dovetail/utils/dovetail_utils.py
index 573100c6..e4284ad4 100644
--- a/dovetail/utils/dovetail_utils.py
+++ b/dovetail/utils/dovetail_utils.py
@@ -179,24 +179,17 @@ def show_progress_bar(length):
def check_docker_version(logger=None):
- ret, server_ver = exec_cmd("sudo docker version -f'{{.Server.Version}}'",
- logger=logger)
- ret, client_ver = exec_cmd("sudo docker version -f'{{.Client.Version}}'",
- logger=logger)
- logger.info("\ndocker version: \nclient:%s\nserver:%s", client_ver,
- server_ver)
- if(LooseVersion(client_ver) <= LooseVersion('1.8.0') or
- LooseVersion(server_ver) <= LooseVersion('1.8.0')):
- logger.warn("\n\nDocker version is too old, may cause unpredictable "
- "errors, you can update or install the lastest docker "
- "for both host and container as below:\nwget -qO- "
- "https://get.docker.com/ | sh\n\nClient:%s\nServer:%s",
- client_ver, server_ver)
- exit(-1)
-
- if(client_ver != server_ver):
- logger.warn("\n\nVersion mismatch, may cause unpredictable "
- "errors, you can update or install the lastest "
- "docker for both host and container as below:\nwget "
- "-qO- https://get.docker.com/ | "
- "sh\n\nClient:%s\nServer:%s", client_ver, server_ver)
+ server_ret, server_ver = \
+ exec_cmd("sudo docker version -f'{{.Server.Version}}'", logger=logger)
+ client_ret, client_ver = \
+ exec_cmd("sudo docker version -f'{{.Client.Version}}'", logger=logger)
+ if server_ret == 0:
+ logger.debug("docker server version: %s", server_ver)
+ if server_ret != 0 or (LooseVersion(server_ver) < LooseVersion('1.12.3')):
+ logger.error("Don't support this Docker server version. "
+ "Docker server should be updated to at least 1.12.3.")
+ if client_ret == 0:
+ logger.debug("docker client version: %s", client_ver)
+ if client_ret != 0 or (LooseVersion(client_ver) < LooseVersion('1.12.3')):
+ logger.error("Don't support this Docker client version. "
+ "Docker client should be updated to at least 1.12.3.")