aboutsummaryrefslogtreecommitdiffstats
path: root/docker/Dockerfile
diff options
context:
space:
mode:
authorchenjiankun <chenjiankun1@huawei.com>2017-04-01 01:19:16 +0000
committerchenjiankun <chenjiankun1@huawei.com>2017-04-01 06:24:12 +0000
commitb74d875134b988a26441d559a9e700aaa68d6a0c (patch)
tree5e367401e8b5f16f2c2fe1d52d91203d2dd20424 /docker/Dockerfile
parent66aa1cc17bcc3643c2852df7df4a355897ba0b57 (diff)
Yardstick virtualenv support
JIRA: YARDSTICK-620 Currently we recommend using docker to run yardstick. And it is hard to use virtualenv to install yardstick. So I modify install.sh in yardstick root path. It will support using virtualenv to install yardstick(including API) in linux. In this patch, I make yardstick support read yardstick configuration have priority over constants. Change-Id: I9ea1241b228532a6497451e6c8f232173ddb783e Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Diffstat (limited to 'docker/Dockerfile')
-rw-r--r--docker/Dockerfile55
1 files changed, 9 insertions, 46 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 551693554..3be28e4b2 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -15,69 +15,32 @@ ARG BRANCH=master
# GIT repo directory
ENV REPOS_DIR /home/opnfv/repos
+ENV IMAGE_DIR /home/opnfv/images/
# Set work directory
-WORKDIR /home/opnfv/repos
# Yardstick repo
ENV YARDSTICK_REPO_DIR ${REPOS_DIR}/yardstick
ENV RELENG_REPO_DIR ${REPOS_DIR}/releng
-RUN sed -i -e 's/^deb /deb [arch=amd64] /g' /etc/apt/sources.list
-RUN sed -i -e 's/^deb-src /# deb-src /g' /etc/apt/sources.list
-RUN echo "APT::Default-Release \"trusty\";" > /etc/apt/apt.conf.d/default-distro
-RUN echo "\n\
-deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial-updates universe \n\
-deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty main universe multiverse restricted \n\
-deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main universe multiverse restricted \n\
-deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-security main universe multiverse restricted \n\
-deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-proposed main universe multiverse restricted" >> /etc/apt/sources.list
-RUN echo "vm.mmap_min_addr = 0" > /etc/sysctl.d/mmap_min_addr.conf
-RUN dpkg --add-architecture arm64
-
-RUN apt-get update && apt-get install -y \
- qemu-user-static/xenial \
- libc6:arm64 \
- wget \
- expect \
- curl \
- git \
- sshpass \
- qemu-utils \
- kpartx \
- libffi-dev \
- libssl-dev \
- libzmq-dev \
- python \
- python-dev \
- libxml2-dev \
- libxslt1-dev \
- nginx \
- uwsgi \
- uwsgi-plugin-python \
- supervisor \
- python-setuptools && \
- easy_install -U setuptools==30.0.0
-
-RUN apt-get -y autoremove && \
- apt-get clean
+RUN apt-get update && apt-get install -y git
RUN mkdir -p ${REPOS_DIR}
RUN git config --global http.sslVerify false
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/yardstick ${YARDSTICK_REPO_DIR}
RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR}
-# install yardstick + dependencies
-RUN cd ${YARDSTICK_REPO_DIR} && easy_install -U pip
-RUN cd ${YARDSTICK_REPO_DIR} && pip install -r requirements.txt
-RUN cd ${YARDSTICK_REPO_DIR} && pip install .
+WORKDIR ${YARDSTICK_REPO_DIR}
+RUN ${YARDSTICK_REPO_DIR}/install.sh
-RUN ${YARDSTICK_REPO_DIR}/api/api-prepare.sh
+RUN echo "daemon off;" >> /etc/nginx/nginx.conf
EXPOSE 5000
-ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img /home/opnfv/images/
-ADD http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img /home/opnfv/images/
+ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img ${IMAGE_DIR}
+ADD http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img ${IMAGE_DIR}
COPY ./exec_tests.sh /usr/local/bin/
+
+WORKDIR ${REPOS_DIR}
CMD ["/usr/bin/supervisord"]