Merge "Bugfix:HA test cases rely on dynamic ip addresses in fuel pods"
[yardstick.git] / docker / Dockerfile
1 ##############################################################################
2 # Copyright (c) 2015 Ericsson AB and others.
3 #
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 ##############################################################################
9
10 FROM ubuntu:14.04
11
12 LABEL image=opnfv/yardstick
13
14 ARG BRANCH=master
15
16 # GIT repo directory
17 ENV REPOS_DIR /home/opnfv/repos
18
19 # Yardstick repo
20 ENV YARDSTICK_REPO_DIR ${REPOS_DIR}/yardstick
21 ENV RELENG_REPO_DIR ${REPOS_DIR}/releng
22 RUN sed -i -e 's/^deb /deb [arch=amd64] /g' /etc/apt/sources.list
23 RUN sed -i -e 's/^deb-src /# deb-src /g' /etc/apt/sources.list
24 RUN echo "APT::Default-Release \"trusty\";" > /etc/apt/apt.conf.d/default-distro
25 RUN echo "\n\
26 deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial-updates universe \n\
27 deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty main universe multiverse restricted \n\
28 deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main universe multiverse restricted \n\
29 deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-security main universe multiverse restricted \n\
30 deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-proposed main universe multiverse restricted" >> /etc/apt/sources.list
31 RUN echo "vm.mmap_min_addr = 0" > /etc/sysctl.d/mmap_min_addr.conf
32 RUN dpkg --add-architecture arm64
33
34 RUN apt-get update && apt-get install -y \
35     qemu-user-static/xenial \
36     libc6:arm64 \
37     wget \
38     expect \
39     curl \
40     git \
41     sshpass \
42     qemu-utils \
43     kpartx \
44     libffi-dev \
45     libssl-dev \
46     libzmq-dev \
47     python \
48     python-dev \
49     libxml2-dev \
50     libxslt1-dev \
51     nginx \
52     uwsgi \
53     uwsgi-plugin-python \
54     supervisor \
55     python-setuptools && \
56     easy_install -U setuptools==30.0.0
57
58 RUN apt-get -y autoremove && \
59     apt-get clean
60
61 RUN mkdir -p ${REPOS_DIR}
62
63 RUN git config --global http.sslVerify false
64 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/yardstick ${YARDSTICK_REPO_DIR}
65 RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR}
66
67 # install yardstick + dependencies
68 RUN cd ${YARDSTICK_REPO_DIR} && easy_install -U pip
69 RUN cd ${YARDSTICK_REPO_DIR} && pip install -r requirements.txt
70 RUN cd ${YARDSTICK_REPO_DIR} && pip install .
71
72 RUN ${YARDSTICK_REPO_DIR}/api/api-prepare.sh
73
74 EXPOSE 5000
75
76 ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img /home/opnfv/images/
77 ADD http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img /home/opnfv/images/
78
79 COPY ./exec_tests.sh /usr/local/bin/
80 CMD ["/usr/bin/supervisord"]