summaryrefslogtreecommitdiffstats
path: root/docker/Dockerfile
blob: 22a42c3c71d7b1c0180480099524742697e68a32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
##############################################################################
# Docker container for CPerf's test tools.
##############################################################################
#
# To build (from the directory that contains this Dockerfile):
#   $ docker build -t opnfv/cperf .
#
# To run:
#   $ docker run -it opnfv/cperf ${pybot_command}
#
# Pass the full pybot test command as ${pybot_command}.
#
# Copyright (c) 2016 Red Hat Inc.
# Jamo Luhrsen <jluhrsen@redhat.com>
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
#############################################################################

FROM centos:7
MAINTAINER Jamo Luhrsen <jluhrsen@redhat.com>

ARG BRANCH=master

ENV HOME /home/opnfv
ENV REPOS_DIR /home/opnfv/repos
RUN mkdir -p ${REPOS_DIR}

# need to put distro in a yum vars file. learned that here:
# https://review.openstack.org/#/c/568180/2//COMMIT_MSG
RUN echo "centos" > /etc/yum/vars/contentdir
RUN yum install -y epel-release centos-release-openstack-queens && yum update -y

RUN yum install -y \
    automake \
    autoconf \
    git \
    libconfig-devel \
    libffi-devel \
    libpcap-devel \
    libtool \
    make \
    net-snmp-devel \
    python-devel \
    python-openstackclient \
    python-pip \
    python-setuptools \
    wget

RUN pip install \
    docker-py \
    importlib \
    ipaddr \
    jmespath \
    jsonpath-rw \
    netifaces \
    netaddr \
    requests \
    robotframework{,-{httplibrary,requests,sshlibrary,selenium2library}} \
    scapy \
    setuptools

RUN git config --global http.sslVerify false

# Clone ODL Int/Test, ODL RelEng and OPNFV CPerf repos
ENV CPERF_REPO_DIR ${REPOS_DIR}/cperf
ENV RELENG_REPO_DIR ${REPOS_DIR}/releng
ENV ODL_TEST_REPO_DIR ${REPOS_DIR}/odl_test
RUN git clone https://gerrit.opnfv.org/gerrit/cperf ${CPERF_REPO_DIR}
RUN git clone https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR}
RUN git clone https://git.opendaylight.org/gerrit/p/integration/test ${ODL_TEST_REPO_DIR}

# Clone and build CBench
ENV OF_DIR ${REPOS_DIR}/openflow
ENV OFLOPS_DIR ${REPOS_DIR}/oflops
RUN git clone https://github.com/mininet/openflow.git ${OF_DIR}
RUN git clone https://github.com/mininet/oflops.git ${OFLOPS_DIR}
RUN cd ${OFLOPS_DIR} && ./boot.sh && ./configure --with-openflow-src-dir=${OF_DIR} && make && make install