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 REFSTACK_TAG=15.0.0
18 ARG ODL_TAG=release/beryllium-sr4
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
33 ENV CONFIG_FUNCTEST_YAML ${FUNCTEST_DIR}/ci/config_functest.yaml
34 ENV REPOS_DIR ${HOME}/repos
35 ENV creds ${FUNCTEST_CONF_DIR}/openstack.creds
39 # Packaged dependencies
40 RUN apt-get update && apt-get install -y \
62 --no-install-recommends
64 RUN pip install --upgrade pip && easy_install -U setuptools==30.0.0
66 RUN mkdir -p ${REPOS_VNFS_DIR} \
67 && mkdir -p ${FUNCTEST_BASE_DIR}/results \
68 && mkdir -p ${FUNCTEST_CONF_DIR} \
69 && mkdir -p ${FUNCTEST_DATA_DIR} \
70 && mkdir -p ${FUNCTEST_IMAGES_DIR} \
71 && mkdir -p /root/.ssh \
72 && chmod 700 /root/.ssh
74 RUN git config --global http.sslVerify false
76 COPY thirdparty-requirements.txt thirdparty-requirements.txt
77 RUN wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata | \
78 sed s/^tempest===.*$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@14.0.0#egg=tempest/ \
79 > upper-constraints.txt && \
80 pip install --src /src -cupper-constraints.txt \
81 git+https://gerrit.opnfv.org/gerrit/functest@$BRANCH#egg=functest \
82 git+https://gerrit.opnfv.org/gerrit/releng@$BRANCH#egg=opnfv\&subdirectory=modules \
83 git+https://gerrit.opnfv.org/gerrit/snaps@$BRANCH#egg=snaps \
84 -r thirdparty-requirements.txt && \
85 rm thirdparty-requirements.txt upper-constraints.txt
88 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/copper ${REPOS_DIR}/copper
89 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/domino ${REPOS_DIR}/domino
90 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/doctor ${REPOS_DIR}/doctor
91 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/promise ${REPOS_DIR}/promise
92 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/netready ${REPOS_DIR}/netready
93 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/fds ${REPOS_DIR}/fds
96 RUN git clone --depth 1 -b $ODL_TAG https://git.opendaylight.org/gerrit/p/integration/test.git ${REPOS_DIR}/odl_test
97 RUN git clone --depth 1 -b $VIMS_TAG https://github.com/boucherv-orange/clearwater-live-test ${REPOS_VNFS_DIR}/vims-test
98 RUN git clone --depth 1 -b $VROUTER_TAG https://github.com/oolorg/opnfv-functest-vrouter.git ${REPOS_VNFS_DIR}/vrouter
99 RUN git clone --depth 1 https://github.com/wuwenbin2/OnosSystemTest.git ${REPOS_DIR}/onos
101 RUN wget -q https://git.openstack.org/cgit/openstack/rally/plain/install_rally.sh?h=${RALLY_TAG} -O install_rally.sh \
102 && bash install_rally.sh --branch ${RALLY_TAG} --yes && rm install_rally.sh
106 RUN gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
107 RUN curl -L https://get.rvm.io | bash -s stable
110 RUN /bin/bash -c ". /usr/local/lib/python2.7/dist-packages/sfc/tests/functest/setup_scripts/tacker_client_install.sh"
112 # refstack-client integration
113 RUN wget -q https://raw.githubusercontent.com/openstack/refstack-client/master/setup_env \
114 && bash setup_env -t ${REFSTACK_TAG} && rm setup_env
115 RUN ln -s ${HOME}/.tempest /usr/local/lib/python2.7/dist-packages/.tempest
117 RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
118 && cd ${REPOS_VNFS_DIR}/vims-test \
119 && rvm autolibs enable"
120 RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
121 && cd ${REPOS_VNFS_DIR}/vims-test \
122 && rvm install 1.9.3"
123 RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
124 && cd ${REPOS_VNFS_DIR}/vims-test \
126 RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
127 && cd ${REPOS_VNFS_DIR}/vims-test \
130 RUN sh -c 'curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -' \
131 && sudo apt-get install -y nodejs \
132 && cd ${REPOS_DIR}/promise && sudo npm -g install npm@latest \
133 && cd ${REPOS_DIR}/promise/source && npm install
135 RUN echo ". ${FUNCTEST_DIR}/cli/functest-complete.sh" >> ${HOME}/.bashrc