From 75606db72e5d3afb6afe590e76b3baef3af3f5c6 Mon Sep 17 00:00:00 2001 From: Ace Lee Date: Mon, 20 Nov 2017 10:47:19 +0000 Subject: fix docker client don't have trex_client JIRA: YARDSTICK-854 Add trex_client in docker, so we could run NSB testcase in docker container. Change-Id: Iac1393d6e3a175137973190936ab69a1f2ce8272 Signed-off-by: Ace Lee --- docker/Dockerfile | 3 +++ install.sh | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 4ec6791e7..b1eb50592 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -48,5 +48,8 @@ ADD http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-d COPY ./exec_tests.sh /usr/local/bin/ +ENV NSB_DIR="/opt/nsb_bin" \ + PYTHONPATH="${PYTHONPATH}:${NSB_DIR}/trex_client:${NSB_DIR}/trex_client/stl" + WORKDIR ${REPOS_DIR} CMD ["/usr/bin/supervisord"] diff --git a/install.sh b/install.sh index db0bff41e..5cd83677b 100755 --- a/install.sh +++ b/install.sh @@ -16,6 +16,7 @@ UBUNTU_ARCHIVE_URL="http://archive.ubuntu.com/ubuntu/" source /etc/os-release source_file=/etc/apt/sources.list +NSB_DIR="/opt/nsb_bin" if [[ "${DOCKER_ARCH}" == "aarch64" ]]; then sed -i -e 's/^deb \([^/[]\)/deb [arch=arm64] \1/g' "${source_file}" @@ -105,5 +106,11 @@ cd "${PWD}/gui" && /bin/bash gui.sh mkdir -p /etc/nginx/yardstick mv dist /etc/nginx/yardstick/gui +mkdir -p ${NSB_DIR} + +wget -P ${NSB_DIR}/ http://artifacts.opnfv.org/yardstick/third-party/trex_client.tar.gz +tar xvf ${NSB_DIR}/trex_client.tar.gz -C ${NSB_DIR} +rm -f ${NSB_DIR}/trex_client.tar.gz + service nginx restart uwsgi -i /etc/yardstick/yardstick.ini -- cgit 1.2.3-korg