1 ##############################################################################
2 # Copyright (c) 2015 Ericsson AB and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
12 LABEL image=opnfv/yardstick
17 ENV REPOS_DIR="/home/opnfv/repos" \
18 IMAGE_DIR="/home/opnfv/images/"
23 ENV YARDSTICK_REPO_DIR="${REPOS_DIR}/yardstick/" \
24 RELENG_REPO_DIR="${REPOS_DIR}/releng" \
25 STORPERF_REPO_DIR="${REPOS_DIR}/storperf"
27 RUN apt-get update && apt-get install -y git python python-setuptools python-pip iputils-ping && apt-get -y autoremove && apt-get clean
28 RUN easy_install -U setuptools==30.0.0
29 RUN pip install appdirs==1.4.0 pyopenssl==17.5.0 python-openstackclient==3.11.0 python-heatclient==1.11.0 ansible==2.5.5
31 RUN mkdir -p ${REPOS_DIR}
33 RUN git config --global http.sslVerify false
34 #For developers: To test your changes you must comment out the git clone for ${YARDSTICK_REPO_DIR}.
35 #You must also uncomment the RUN and COPY commands below.
36 #You must run docker build from your yardstick directory on the host.
37 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/yardstick ${YARDSTICK_REPO_DIR}
38 #RUN mkdir ${YARDSTICK_REPO_DIR}
39 #COPY ./ ${YARDSTICK_REPO_DIR}
40 RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR}
41 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/storperf ${STORPERF_REPO_DIR}
43 RUN ansible-playbook -c local -vvv -e INSTALLATION_MODE="container" ${YARDSTICK_REPO_DIR}/ansible/install.yaml
45 RUN ${YARDSTICK_REPO_DIR}/docker/supervisor.sh
47 RUN echo "daemon off;" >> /etc/nginx/nginx.conf
48 # nginx=5000, rabbitmq=5672
51 ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img ${IMAGE_DIR}
52 ADD http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img ${IMAGE_DIR}
54 COPY ./exec_tests.sh /usr/local/bin/
56 ENV NSB_DIR="/opt/nsb_bin"
57 ENV PYTHONPATH="${PYTHONPATH}:${NSB_DIR}/trex_client:${NSB_DIR}/trex_client/stl"
60 CMD ["/usr/bin/supervisord"]