Merge "Add common openstack opertation scenarios: network"
[yardstick.git] / ansible / roles / create_dockerfile / templates / centos / Dockerfile
1 ##############################################################################
2 # Copyright (c) 2017 Intel Corporation
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 centos:7.3.1611
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
23 RUN yum -y install\
24     deltarpm \
25     wget \
26     expect \
27     curl \
28     git \
29     sshpass \
30     ansible \
31     qemu-kvm \
32     qemu-utils \
33     kpartx \
34     libffi-devel \
35     openssl-devel \
36     zeromq2-devel \
37     python \
38     python-devel \
39     libxml2-devel \
40     libxslt-devel \
41     nginx \
42     uwsgi \
43     uwsgi-plugin-python \
44     supervisor \
45     ansible \
46     python-setuptools && \
47     easy_install -U setuptools==30.0.0 && \
48     yum clean all
49
50 RUN mkdir -p ${REPOS_DIR} && \
51     git config --global http.sslVerify false && \
52     git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/yardstick ${YARDSTICK_REPO_DIR}  && \
53     git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR}
54
55 # install yardstick + dependencies
56 # explicity pin pip version to avoid future issues like the ill-fated pip 8.0.0 release
57 RUN easy_install -U "pip==${PIP_VERSION}" && \
58     pip install -r ${YARDSTICK_REPO_DIR}/requirements.txt && \
59     pip install ${YARDSTICK_REPO_DIR}
60
61 RUN ${YARDSTICK_REPO_DIR}/api/api-prepare.sh
62
63 EXPOSE 5000
64
65 ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img /home/opnfv/images/
66 ADD http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img /home/opnfv/images/
67
68 COPY ./exec_tests.sh /usr/local/bin/
69 CMD ["/usr/bin/supervisord"]