Leverage on VOLUME_DEVICE_NAME if Fuel
[functest.git] / docker / restapi / Dockerfile
1 FROM opnfv/functest-core
2
3 ARG BRANCH=master
4 ARG OPENSTACK_TAG=stable/pike
5 ARG ODL_TAG=85448c9d97b89989488e675b29b38ac42d8674e4
6 ARG RALLY_TAG=stable/0.10
7 ARG OS_FAULTS_TAG=0.1.16
8 ARG REFSTACK_TARGET=2017.09
9 ARG FDS_TAG=master
10 ARG VIMS_TAG=stable
11 ARG PATROLE_TAG=0.2.0
12
13 COPY thirdparty-requirements.txt thirdparty-requirements.txt
14 RUN apk --no-cache add --update python3 sshpass \
15         ruby ruby-bundler ruby-irb ruby-rdoc dnsmasq \
16         procps libxslt libxml2 zlib libffi go musl-dev && \
17     apk --no-cache add --virtual .build-deps --update \
18         python-dev python3-dev build-base linux-headers libffi-dev \
19         openssl-dev libjpeg-turbo-dev \
20         ruby-dev g++ make libxslt-dev libxml2-dev zlib-dev libffi-dev && \
21     wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
22         sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ \
23         > upper-constraints.txt && \
24     pip install --no-cache-dir --src /src -cupper-constraints.txt \
25         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
26         -e git+https://github.com/openstack/requirements@$OPENSTACK_TAG#egg=openstack_requirements && \
27     git clone --depth 1 https://github.com/openstack/os-faults.git -b $OS_FAULTS_TAG /src/os-faults && \
28     update-requirements -s --source /src/openstack-requirements /src/os-faults/ && \
29     git clone --depth 1 https://github.com/openstack/rally.git -b $RALLY_TAG /src/rally && \
30     update-requirements -s --source /src/openstack-requirements /src/rally/ && \
31     git clone https://github.com/openstack/patrole.git /src/patrole && \
32     (cd /src/patrole && git checkout $PATROLE_TAG) && \
33     update-requirements -s --source /src/openstack-requirements /src/patrole/ && \
34     pip install --no-cache-dir --src /src -cupper-constraints.txt \
35         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
36         tempest /src/os-faults && \
37     pip install --no-cache-dir --src /src -cupper-constraints.txt \
38         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
39         oslotest /src/patrole /src/rally -rthirdparty-requirements.txt && \
40     python3 -m pip install --no-cache-dir --src /src -cupper-constraints.txt \
41         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
42         doctor-tests && \
43     git clone https://git.opendaylight.org/gerrit/p/integration/test.git /src/odl_test && \
44     (cd /src/odl_test && git checkout $ODL_TAG) && \
45     git clone --depth 1 -b $FDS_TAG https://gerrit.opnfv.org/gerrit/fds /src/fds && \
46     git clone --depth 1 -b $VIMS_TAG https://github.com/boucherv-orange/clearwater-live-test /src/vims-test && \
47     virtualenv --system-site-packages /src/tempest/.venv --python=python2.7 && \
48     git clone https://github.com/RebacaInc/abot_charm.git /src/epc-requirements/abot_charm && \
49     python3 -m pip install --no-cache-dir --src /src -cupper-constraints.txt \
50         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
51         juju-wait && \
52     go get github.com/rogpeppe/godeps && \
53     (cd /src/vims-test && bundle config build.nokogiri --use-system-libraries && bundle install --system) && \
54     mkdir -p /etc/rally && \
55     printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
56     mkdir -p /var/lib/rally/database && rally db create && \
57     mkdir -p /home/opnfv/functest/data/refstack && \
58     wget "https://refstack.openstack.org/api/v1/guidelines/${REFSTACK_TARGET}/tests?target=compute&type=required&alias=true&flag=false" \
59         -O /home/opnfv/functest/data/refstack/defcore.txt && \
60     mkdir -p /etc/neutron /etc/glance && \
61     wget -q -O /etc/neutron/policy.json https://raw.githubusercontent.com/openstack/neutron/$OPENSTACK_TAG/etc/policy.json && \
62     wget -q -O /etc/glance/policy.json https://raw.githubusercontent.com/openstack/glance/$OPENSTACK_TAG/etc/policy.json && \
63     cp /usr/lib/python2.7/site-packages/functest/ci/testcases.yaml /usr/lib/python2.7/site-packages/xtesting/ci && \
64     rm -r upper-constraints.txt thirdparty-requirements.txt /src/odl_test/.git \
65         /src/os-faults /src/rally /src/fds/.git /src/vims-test/.git /src/epc-requirements/abot_charm/.git && \
66     apk del .build-deps
67 EXPOSE 5000
68 CMD ["functest_restapi"]