1 ########################################
2 # Aarch64 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
10 FROM aarch64/ubuntu:14.04
11 MAINTAINER Armband team <armband@enea.com>
12 LABEL version="0.1" description="OPNFV Functest Aarch64 Docker container"
14 # Environment variables
17 ARG TEMPEST_TAG=15.0.0
18 ARG REFSTACK_TAG=15.0.0
19 ARG ODL_TAG=release/beryllium-sr4
20 ARG OPENSTACK_TAG=stable/mitaka
21 ARG KINGBIRD_TAG=0.2.2
23 ARG REPOS_DIR=/home/opnfv/repos
24 ARG FUNCTEST_BASE_DIR=/home/opnfv/functest
25 ARG FUNCTEST_CONF_DIR=${FUNCTEST_BASE_DIR}/conf
26 ARG FUNCTEST_DATA_DIR=${FUNCTEST_BASE_DIR}/data
27 ARG FUNCTEST_IMAGES_DIR=${FUNCTEST_BASE_DIR}/images
28 ARG FUNCTEST_RESULTS_DIR=${FUNCTEST_BASE_DIR}/results
29 ARG FUNCTEST_REPO_DIR=${REPOS_DIR}/functest
30 ARG FUNCTEST_TEST_DIR=${FUNCTEST_REPO_DIR}/functest/opnfv_tests
31 ARG REPOS_VNFS_DIR=${REPOS_DIR}/vnfs
33 # Environment variables
35 ENV CONFIG_FUNCTEST_YAML ${FUNCTEST_REPO_DIR}/functest/ci/config_functest.yaml
36 ENV REPOS_DIR ${HOME}/repos
37 ENV creds ${FUNCTEST_CONF_DIR}/openstack.creds
39 ENV COLORTERM gnome-terminal
43 # Packaged dependencies
44 RUN apt-get update && apt-get install -y \
66 --no-install-recommends
68 RUN pip install --upgrade pip && easy_install -U setuptools==30.0.0
70 RUN mkdir -p ${REPOS_DIR} \
71 && mkdir -p ${REPOS_VNFS_DIR} \
72 && mkdir -p ${FUNCTEST_BASE_DIR}/results \
73 && mkdir -p ${FUNCTEST_BASE_DIR}/conf \
74 && mkdir -p ${FUNCTEST_DATA_DIR} \
75 && mkdir -p ${FUNCTEST_IMAGES_DIR} \
76 && mkdir -p /root/.ssh \
77 && chmod 700 /root/.ssh
79 RUN git config --global http.sslVerify false
82 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/functest ${REPOS_DIR}/functest
83 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/copper ${REPOS_DIR}/copper
84 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/sdnvpn ${REPOS_DIR}/sdnvpn
85 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/domino ${REPOS_DIR}/domino
86 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/parser ${REPOS_DIR}/parser
87 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/doctor ${REPOS_DIR}/doctor
88 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/promise ${REPOS_DIR}/promise
89 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/sfc ${REPOS_DIR}/sfc
90 RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/securityscanning ${REPOS_DIR}/securityscanning
91 RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/opera ${REPOS_DIR}/opera
93 # OpenStack repositories
94 RUN git clone --depth 1 -b $OPENSTACK_TAG https://github.com/openstack/networking-bgpvpn ${REPOS_DIR}/bgpvpn
95 RUN git clone --depth 1 -b $KINGBIRD_TAG https://github.com/openstack/kingbird.git ${REPOS_DIR}/kingbird
96 RUN git clone --depth 1 -b $RALLY_TAG https://github.com/openstack/rally.git ${REPOS_DIR}/rally
97 RUN git clone --depth 1 -b $TEMPEST_TAG https://github.com/openstack/tempest.git ${REPOS_DIR}/tempest
98 RUN git clone https://github.com/openstack/refstack-client ${REPOS_DIR}/refstack-client
101 RUN git clone --depth 1 -b $ODL_TAG https://git.opendaylight.org/gerrit/p/integration/test.git ${REPOS_DIR}/odl_test
102 RUN git clone --depth 1 -b $VIMS_TAG https://github.com/boucherv-orange/clearwater-live-test ${REPOS_VNFS_DIR}/vims-test
103 RUN git clone --depth 1 https://github.com/wuwenbin2/OnosSystemTest.git ${REPOS_DIR}/onos
105 RUN pip install -r ${REPOS_DIR}/rally/requirements.txt
106 RUN pip install -r ${REPOS_DIR}/tempest/requirements.txt
108 RUN cd ${FUNCTEST_REPO_DIR} \
109 && pip install -r requirements.txt \
112 RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \
113 -not -path "*tests/unit*" \
114 -not -path "*functest_venv*" \
115 |xargs grep -L __main__ |cut -d\: -f 1 |xargs chmod -c 644 \
116 && find ${FUNCTEST_REPO_DIR} -name "*.sh" \
117 -not -path "*functest_venv*" \
118 |xargs grep -L \#\! |cut -d\: -f 1 |xargs chmod -c 644
120 RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \
121 -not -path "*tests/unit*" \
122 -not -path "*functest_venv*" \
123 |xargs grep __main__ |cut -d\: -f 1 |xargs chmod -c 755 \
124 && find ${FUNCTEST_REPO_DIR} -name "*.sh" \
125 -not -path "*functest_venv*" \
126 |xargs grep \#\! |cut -d\: -f 1 |xargs chmod -c 755
128 RUN /bin/bash ${REPOS_DIR}/parser/tests/parser_install.sh ${REPOS_DIR}
129 RUN ${REPOS_DIR}/rally/install_rally.sh --yes
131 RUN /bin/bash ${REPOS_DIR}/functest/docker/add_images.sh
133 RUN gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
134 RUN curl -L https://get.rvm.io | bash -s stable
136 RUN pip install ${REPOS_DIR}/opera
139 RUN /bin/bash -c ". ${REPOS_DIR}/sfc/sfc/tests/functest/setup_scripts/tacker_client_install.sh"
140 RUN cd ${REPOS_DIR}/sfc && pip install -e .
143 RUN cd ${REPOS_DIR}/sdnvpn && pip install -e .
144 RUN cd ${REPOS_DIR}/bgpvpn && pip install -e .
146 # Kingbird integration
147 RUN cd ${REPOS_DIR}/kingbird && pip install -e .
149 # refstack-client integration
150 RUN cd ${REPOS_DIR}/refstack-client && ./setup_env -t ${REFSTACK_TAG}
152 RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
153 && cd ${REPOS_VNFS_DIR}/vims-test \
154 && rvm autolibs enable"
155 RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
156 && cd ${REPOS_VNFS_DIR}/vims-test \
157 && rvm install 1.9.3"
158 RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
159 && cd ${REPOS_VNFS_DIR}/vims-test \
161 RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
162 && gem install bundler \
163 && cd ${REPOS_VNFS_DIR}/vims-test \
164 && bundle config build.nokogiri --use-system-libraries \
167 RUN sh -c 'wget -qO- https://nodejs.org/dist/v4.7.2/node-v4.7.2-linux-arm64.tar.gz | \
168 tar -xz -C /usr/local --exclude=CHANGELOG.md --exclude=LICENSE --exclude=README.md --strip-components 1 '\
169 && cd ${REPOS_DIR}/promise && sudo npm -g install npm@latest \
170 && cd ${REPOS_DIR}/promise/source && npm install
172 RUN echo "set nocompatible \n\
175 RUN echo set nocompatible >> ${HOME}/.exrc
176 RUN echo "alias ll='ls -lh' \n\
177 . ${FUNCTEST_REPO_DIR}/functest/cli/functest-complete.sh" \