1 ########################################
2 # Docker container for FUNCTEST
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
11 MAINTAINER Jose Lausuch <jose.lausuch@ericsson.com>
12 LABEL version="0.1" description="OPNFV Functest Docker container"
14 # Environment variables
17 ARG ODL_TAG=release/beryllium-sr4
18 ARG OPENSTACK_TAG=stable/ocata
19 ARG KINGBIRD_TAG=1.1.0
21 ARG VROUTER_TAG=stable
22 ARG REPOS_DIR=/home/opnfv/repos
23 ARG FUNCTEST_BASE_DIR=/home/opnfv/functest
24 ARG FUNCTEST_CONF_DIR=${FUNCTEST_BASE_DIR}/conf
25 ARG FUNCTEST_DATA_DIR=${FUNCTEST_BASE_DIR}/data
26 ARG FUNCTEST_IMAGES_DIR=${FUNCTEST_BASE_DIR}/images
27 ARG FUNCTEST_RESULTS_DIR=${FUNCTEST_BASE_DIR}/results
28 ARG FUNCTEST_DIR=/usr/local/lib/python2.7/dist-packages/functest/
29 ARG REPOS_VNFS_DIR=${REPOS_DIR}/vnfs
31 # Environment variables
32 ENV CONFIG_FUNCTEST_YAML ${FUNCTEST_DIR}/ci/config_functest.yaml
33 ENV REPOS_DIR ${REPOS_DIR}
34 ENV creds ${FUNCTEST_CONF_DIR}/openstack.creds
36 # Packaged dependencies
37 RUN apt-get update && apt-get install -y \
59 --no-install-recommends
61 RUN pip install --upgrade pip && easy_install -U setuptools==30.0.0
63 RUN mkdir -p ${REPOS_VNFS_DIR} \
64 && mkdir -p ${FUNCTEST_BASE_DIR}/results \
65 && mkdir -p ${FUNCTEST_CONF_DIR} \
66 && mkdir -p ${FUNCTEST_DATA_DIR} \
67 && mkdir -p ${FUNCTEST_IMAGES_DIR} \
68 && mkdir -p /root/.ssh \
69 && chmod 700 /root/.ssh
71 RUN git config --global http.sslVerify false
73 COPY thirdparty-requirements.txt thirdparty-requirements.txt
74 RUN wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
75 sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ \
76 > upper-constraints.txt && \
77 pip install --src /src -cupper-constraints.txt \
78 -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
79 git+https://gerrit.opnfv.org/gerrit/functest@$BRANCH#egg=functest \
80 -rthirdparty-requirements.txt && \
81 mkdir -p /etc/rally && \
82 printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
83 mkdir -p /var/lib/rally/database && rally-manage db create && \
84 rm thirdparty-requirements.txt upper-constraints.txt
87 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/copper /src/copper
88 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/domino /src/domino
89 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/doctor ${REPOS_DIR}/doctor
90 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/netready ${REPOS_DIR}/netready
91 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/fds /src/fds
94 RUN git clone --depth 1 -b $ODL_TAG https://git.opendaylight.org/gerrit/p/integration/test.git /src/odl_test
95 RUN git clone --depth 1 -b $VIMS_TAG https://github.com/boucherv-orange/clearwater-live-test ${REPOS_VNFS_DIR}/vims-test
96 RUN git clone --depth 1 -b $VROUTER_TAG https://github.com/oolorg/opnfv-functest-vrouter.git ${REPOS_VNFS_DIR}/vrouter
97 RUN git clone --depth 1 https://github.com/wuwenbin2/OnosSystemTest.git ${REPOS_DIR}/onos
99 RUN gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
100 RUN curl -L https://get.rvm.io | bash -s stable
103 RUN /bin/bash -c ". /usr/local/lib/python2.7/dist-packages/sfc/tests/functest/setup_scripts/tacker_client_install.sh"
105 # Install tempest venv and create symlink for running refstack-client
106 RUN ln -s /src/tempest /src/refstack-client/.tempest \
107 && virtualenv --system-site-packages /src/tempest/.venv
109 RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
110 && cd ${REPOS_VNFS_DIR}/vims-test \
111 && rvm autolibs enable"
112 RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
113 && cd ${REPOS_VNFS_DIR}/vims-test \
114 && rvm install 1.9.3"
115 RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
116 && cd ${REPOS_VNFS_DIR}/vims-test \
118 RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
119 && cd ${REPOS_VNFS_DIR}/vims-test \
122 RUN sh -c 'curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -' \
123 && sudo apt-get install -y nodejs \
124 && cd ${REPOS_DIR}/promise && sudo npm -g install npm@latest \
125 && cd ${REPOS_DIR}/promise/source && npm install
127 RUN echo ". ${FUNCTEST_DIR}/cli/functest-complete.sh" >> /root/.bashrc