aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile21
-rw-r--r--docker/Dockerfile.aarch6421
-rw-r--r--docker/core/Dockerfile23
-rw-r--r--docker/healthcheck/Dockerfile4
-rw-r--r--docker/healthcheck/testcases.yaml61
-rw-r--r--docker/smoke/Dockerfile19
-rw-r--r--docker/smoke/testcases.yaml106
-rw-r--r--docker/smoke/thirdparty-requirements.txt8
-rw-r--r--docker/thirdparty-requirements.txt12
9 files changed, 245 insertions, 30 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 80db3c9b1..accbf5e30 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -15,6 +15,7 @@ LABEL version="0.1" description="OPNFV Functest Docker container"
ARG BRANCH=master
ARG RALLY_TAG=0.8.1
ARG ODL_TAG=release/beryllium-sr4
+ARG OPENSTACK_TAG=stable/ocata
ARG KINGBIRD_TAG=1.1.0
ARG VIMS_TAG=stable
ARG VROUTER_TAG=stable
@@ -28,13 +29,10 @@ ARG FUNCTEST_DIR=/usr/local/lib/python2.7/dist-packages/functest/
ARG REPOS_VNFS_DIR=${REPOS_DIR}/vnfs
# Environment variables
-ENV HOME /home/opnfv
ENV CONFIG_FUNCTEST_YAML ${FUNCTEST_DIR}/ci/config_functest.yaml
-ENV REPOS_DIR ${HOME}/repos
+ENV REPOS_DIR ${REPOS_DIR}
ENV creds ${FUNCTEST_CONF_DIR}/openstack.creds
-WORKDIR ${HOME}
-
# Packaged dependencies
RUN apt-get update && apt-get install -y \
build-essential \
@@ -73,14 +71,16 @@ RUN mkdir -p ${REPOS_VNFS_DIR} \
RUN git config --global http.sslVerify false
COPY thirdparty-requirements.txt thirdparty-requirements.txt
-RUN wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata | \
+RUN wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ \
> upper-constraints.txt && \
pip install --src /src -cupper-constraints.txt \
+ -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
git+https://gerrit.opnfv.org/gerrit/functest@$BRANCH#egg=functest \
- git+https://gerrit.opnfv.org/gerrit/releng@$BRANCH#egg=opnfv\&subdirectory=modules \
- git+https://gerrit.opnfv.org/gerrit/snaps@$BRANCH#egg=snaps \
- -r thirdparty-requirements.txt && \
+ -rthirdparty-requirements.txt && \
+ mkdir -p /etc/rally && \
+ printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
+ mkdir -p /var/lib/rally/database && rally-manage db create && \
rm thirdparty-requirements.txt upper-constraints.txt
# OPNFV repositories
@@ -97,9 +97,6 @@ RUN git clone --depth 1 -b $VIMS_TAG https://github.com/boucherv-orange/clearwat
RUN git clone --depth 1 -b $VROUTER_TAG https://github.com/oolorg/opnfv-functest-vrouter.git ${REPOS_VNFS_DIR}/vrouter
RUN git clone --depth 1 https://github.com/wuwenbin2/OnosSystemTest.git ${REPOS_DIR}/onos
-RUN wget -q https://git.openstack.org/cgit/openstack/rally/plain/install_rally.sh?h=${RALLY_TAG} -O install_rally.sh \
- && bash install_rally.sh --branch ${RALLY_TAG} --yes && rm install_rally.sh
-
RUN add_images.sh
RUN gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
@@ -130,4 +127,4 @@ RUN sh -c 'curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -' \
&& cd ${REPOS_DIR}/promise && sudo npm -g install npm@latest \
&& cd ${REPOS_DIR}/promise/source && npm install
-RUN echo ". ${FUNCTEST_DIR}/cli/functest-complete.sh" >> ${HOME}/.bashrc
+RUN echo ". ${FUNCTEST_DIR}/cli/functest-complete.sh" >> /root/.bashrc
diff --git a/docker/Dockerfile.aarch64 b/docker/Dockerfile.aarch64
index 274db865b..abd4d1afb 100644
--- a/docker/Dockerfile.aarch64
+++ b/docker/Dockerfile.aarch64
@@ -15,6 +15,7 @@ LABEL version="0.1" description="OPNFV Functest Aarch64 Docker container"
ARG BRANCH=master
ARG RALLY_TAG=0.8.1
ARG ODL_TAG=release/beryllium-sr4
+ARG OPENSTACK_TAG=stable/ocata
ARG KINGBIRD_TAG=0.2.2
ARG VIMS_TAG=stable
ARG REPOS_DIR=/home/opnfv/repos
@@ -27,13 +28,10 @@ ARG FUNCTEST_DIR=/usr/local/lib/python2.7/dist-packages/functest/
ARG REPOS_VNFS_DIR=${REPOS_DIR}/vnfs
# Environment variables
-ENV HOME /home/opnfv
ENV CONFIG_FUNCTEST_YAML ${FUNCTEST_DIR}/functest/ci/config_functest.yaml
-ENV REPOS_DIR ${HOME}/repos
+ENV REPOS_DIR ${REPOS_DIR}
ENV creds ${FUNCTEST_CONF_DIR}/openstack.creds
-WORKDIR ${HOME}
-
# Packaged dependencies
RUN apt-get update && apt-get install -y \
build-essential \
@@ -72,14 +70,16 @@ RUN mkdir -p ${REPOS_VNFS_DIR} \
RUN git config --global http.sslVerify false
COPY thirdparty-requirements.txt thirdparty-requirements.txt
-RUN wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata | \
+RUN wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ \
> upper-constraints.txt && \
pip install --src /src -cupper-constraints.txt \
+ -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
git+https://gerrit.opnfv.org/gerrit/functest@$BRANCH#egg=functest \
- git+https://gerrit.opnfv.org/gerrit/releng@$BRANCH#egg=opnfv\&subdirectory=modules \
- git+https://gerrit.opnfv.org/gerrit/snaps@$BRANCH#egg=snaps \
- -r thirdparty-requirements.txt && \
+ -rthirdparty-requirements.txt && \
+ mkdir -p /etc/rally && \
+ printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
+ mkdir -p /var/lib/rally/database && rally-manage db create && \
rm thirdparty-requirements.txt upper-constraints.txt
# OPNFV repositories
@@ -93,9 +93,6 @@ RUN git clone --depth 1 -b $ODL_TAG https://git.opendaylight.org/gerrit/p/integr
RUN git clone --depth 1 -b $VIMS_TAG https://github.com/boucherv-orange/clearwater-live-test ${REPOS_VNFS_DIR}/vims-test
RUN git clone --depth 1 https://github.com/wuwenbin2/OnosSystemTest.git ${REPOS_DIR}/onos
-RUN wget -q https://git.openstack.org/cgit/openstack/rally/plain/install_rally.sh?h=${RALLY_TAG} -O install_rally.sh \
- && bash install_rally.sh --branch ${RALLY_TAG} --yes && rm install_rally.sh
-
RUN add_images.sh
RUN gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
@@ -128,4 +125,4 @@ RUN sh -c 'wget -qO- https://nodejs.org/dist/v4.7.2/node-v4.7.2-linux-arm64.tar.
&& cd ${REPOS_DIR}/promise && sudo npm -g install npm@latest \
&& cd ${REPOS_DIR}/promise/source && npm install
-RUN echo ". ${FUNCTEST_DIR}/cli/functest-complete.sh" >> ${HOME}/.bashrc
+RUN echo ". ${FUNCTEST_DIR}/cli/functest-complete.sh" >> /root/.bashrc
diff --git a/docker/core/Dockerfile b/docker/core/Dockerfile
new file mode 100644
index 000000000..574de9bae
--- /dev/null
+++ b/docker/core/Dockerfile
@@ -0,0 +1,23 @@
+FROM alpine:3.6
+
+ARG BRANCH=master
+ARG OPENSTACK_TAG=stable/ocata
+
+RUN apk --no-cache add --update \
+ python libffi libssl1.0 libjpeg-turbo py-pip bash \
+ grep sed wget ca-certificates git openssh-client && \
+ apk --no-cache add --virtual .build-deps --update \
+ python-dev build-base linux-headers libffi-dev \
+ openssl-dev libjpeg-turbo-dev && \
+ wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
+ sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ \
+ > upper-constraints.txt && \
+ pip install --src /src -cupper-constraints.txt \
+ -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
+ git+https://gerrit.opnfv.org/gerrit/functest@$BRANCH#egg=functest && \
+ rm upper-constraints.txt && \
+ mkdir -p /etc/rally && \
+ printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
+ mkdir -p /var/lib/rally/database && rally-manage db create && \
+ bash -c "mkdir -p /home/opnfv/functest{/conf,/data,/images,/results} /home/opnfv/repos/vnfs" && \
+ apk del .build-deps
diff --git a/docker/healthcheck/Dockerfile b/docker/healthcheck/Dockerfile
new file mode 100644
index 000000000..6dfea7f8a
--- /dev/null
+++ b/docker/healthcheck/Dockerfile
@@ -0,0 +1,4 @@
+FROM ollivier/functest-core
+
+COPY testcases.yaml /usr/lib/python2.7/site-packages/functest/ci/testcases.yaml
+CMD ["bash","-c","prepare_env start && run_tests -t all"]
diff --git a/docker/healthcheck/testcases.yaml b/docker/healthcheck/testcases.yaml
new file mode 100644
index 000000000..e43c7c77c
--- /dev/null
+++ b/docker/healthcheck/testcases.yaml
@@ -0,0 +1,61 @@
+tiers:
+ -
+ name: healthcheck
+ order: 0
+ ci_loop: '(daily)|(weekly)'
+ description : >-
+ First tier to be executed to verify the basic
+ operations in the VIM.
+ testcases:
+ -
+ case_name: connection_check
+ project_name: functest
+ criteria: 100
+ blocking: true
+ description: >-
+ This test case verifies the retrieval of OpenStack clients:
+ Keystone, Glance, Neutron and Nova and may perform some
+ simple queries. When the config value of
+ snaps.use_keystone is True, functest must have access to
+ the cloud's private network.
+ dependencies:
+ installer: '^((?!netvirt).)*$'
+ scenario: ''
+ run:
+ module: 'functest.opnfv_tests.openstack.snaps.connection_check'
+ class: 'ConnectionCheck'
+
+ -
+ case_name: api_check
+ project_name: functest
+ criteria: 100
+ blocking: true
+ description: >-
+ This test case verifies the retrieval of OpenStack clients:
+ Keystone, Glance, Neutron and Nova and may perform some
+ simple queries. When the config value of
+ snaps.use_keystone is True, functest must have access to
+ the cloud's private network.
+ dependencies:
+ installer: '^((?!netvirt).)*$'
+ scenario: ''
+ run:
+ module: 'functest.opnfv_tests.openstack.snaps.api_check'
+ class: 'ApiCheck'
+
+ -
+ case_name: snaps_health_check
+ project_name: functest
+ criteria: 100
+ blocking: true
+ description: >-
+ This test case creates executes the SimpleHealthCheck
+ Python test class which creates an, image, flavor, network,
+ and Cirros VM instance and observes the console output to
+ validate the single port obtains the correct IP address.
+ dependencies:
+ installer: ''
+ scenario: '^((?!lxd).)*$'
+ run:
+ module: 'functest.opnfv_tests.openstack.snaps.health_check'
+ class: 'HealthCheck'
diff --git a/docker/smoke/Dockerfile b/docker/smoke/Dockerfile
new file mode 100644
index 000000000..b6f84b64a
--- /dev/null
+++ b/docker/smoke/Dockerfile
@@ -0,0 +1,19 @@
+FROM ollivier/functest-core
+
+ARG BRANCH=master
+ARG OPENSTACK_TAG=stable/ocata
+
+COPY thirdparty-requirements.txt thirdparty-requirements.txt
+RUN apk --no-cache add --virtual .build-deps --update \
+ python-dev build-base linux-headers libffi-dev \
+ openssl-dev libjpeg-turbo-dev git && \
+ pip install --src /src \
+ -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG \
+ -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
+ -rthirdparty-requirements.txt && \
+ ln -s /src/tempest /src/refstack-client/.tempest && \
+ virtualenv --system-site-packages /src/tempest/.venv && \
+ rm thirdparty-requirements.txt && \
+ apk del .build-deps
+COPY testcases.yaml /usr/lib/python2.7/site-packages/functest/ci/testcases.yaml
+CMD ["bash","-c","prepare_env start && run_tests -t all"]
diff --git a/docker/smoke/testcases.yaml b/docker/smoke/testcases.yaml
new file mode 100644
index 000000000..69ea038a4
--- /dev/null
+++ b/docker/smoke/testcases.yaml
@@ -0,0 +1,106 @@
+tiers:
+ -
+ name: smoke
+ order: 1
+ ci_loop: '(daily)|(weekly)'
+ description : >-
+ Set of basic Functional tests to validate the OPNFV scenarios.
+ testcases:
+ -
+ case_name: vping_ssh
+ project_name: functest
+ criteria: 100
+ blocking: true
+ description: >-
+ This test case verifies: 1) SSH to an instance using floating
+ IPs over the public network. 2) Connectivity between 2 instances
+ over a private network.
+ dependencies:
+ installer: ''
+ scenario: '^((?!odl_l3|odl-bgpvpn|gluon).)*$'
+ run:
+ module: 'functest.opnfv_tests.openstack.vping.vping_ssh'
+ class: 'VPingSSH'
+
+ -
+ case_name: vping_userdata
+ project_name: functest
+ criteria: 100
+ blocking: true
+ description: >-
+ This test case verifies: 1) Boot a VM with given userdata.
+ 2) Connectivity between 2 instances over a private network.
+ dependencies:
+ installer: ''
+ scenario: '^((?!lxd).)*$'
+ run:
+ module: 'functest.opnfv_tests.openstack.vping.vping_userdata'
+ class: 'VPingUserdata'
+
+ -
+ case_name: tempest_smoke_serial
+ project_name: functest
+ criteria: 100
+ blocking: false
+ description: >-
+ This test case runs the smoke subset of the OpenStack
+ Tempest suite. The list of test cases is generated by
+ Tempest automatically and depends on the parameters of
+ the OpenStack deplopyment.
+ dependencies:
+ installer: '^((?!netvirt).)*$'
+ scenario: ''
+ run:
+ module: 'functest.opnfv_tests.openstack.tempest.tempest'
+ class: 'TempestSmokeSerial'
+
+ -
+ case_name: rally_sanity
+ project_name: functest
+ criteria: 100
+ blocking: false
+ description: >-
+ This test case runs a sub group of tests of the OpenStack
+ Rally suite in smoke mode.
+ dependencies:
+ installer: ''
+ scenario: ''
+ run:
+ module: 'functest.opnfv_tests.openstack.rally.rally'
+ class: 'RallySanity'
+
+ -
+ case_name: refstack_defcore
+ project_name: functest
+ criteria: 100
+ blocking: false
+ description: >-
+ This test case runs a sub group of tests of the OpenStack
+ Defcore testcases by using refstack client.
+ dependencies:
+ installer: ''
+ scenario: ''
+ run:
+ module: 'functest.opnfv_tests.openstack.refstack_client.refstack_client'
+ class: 'RefstackClient'
+
+ -
+ case_name: snaps_smoke
+ project_name: functest
+ criteria: 100
+ blocking: false
+ description: >-
+ This test case contains tests that setup and destroy
+ environments with VMs with and without Floating IPs
+ with a newly created user and project. Set the config
+ value snaps.use_floating_ips (True|False) to toggle
+ this functionality. When the config value of
+ snaps.use_keystone is True, functest must have access to
+ the cloud's private network.
+
+ dependencies:
+ installer: '^((?!netvirt).)*$'
+ scenario: '^((?!lxd).)*$'
+ run:
+ module: 'functest.opnfv_tests.openstack.snaps.smoke'
+ class: 'SnapsSmoke'
diff --git a/docker/smoke/thirdparty-requirements.txt b/docker/smoke/thirdparty-requirements.txt
new file mode 100644
index 000000000..be1980f2c
--- /dev/null
+++ b/docker/smoke/thirdparty-requirements.txt
@@ -0,0 +1,8 @@
+baro_tests
+sdnvpn
+opera
+securityscanning
+sfc
+tosca-parser>=0.7.0 # Apache-2.0
+heat-translator>=0.4.0 # Apache-2.0
+refstack-client
diff --git a/docker/thirdparty-requirements.txt b/docker/thirdparty-requirements.txt
index 5e60fb74f..be1980f2c 100644
--- a/docker/thirdparty-requirements.txt
+++ b/docker/thirdparty-requirements.txt
@@ -1,8 +1,8 @@
-git+https://gerrit.opnfv.org/gerrit/barometer#egg=baro_tests
-git+https://gerrit.opnfv.org/gerrit/sdnvpn#egg=sdnvpn
-git+https://gerrit.opnfv.org/gerrit/opera#egg=opera
-git+https://gerrit.opnfv.org/gerrit/securityscanning#egg=securityscanning
-git+https://gerrit.opnfv.org/gerrit/sfc#egg=sfc
+baro_tests
+sdnvpn
+opera
+securityscanning
+sfc
tosca-parser>=0.7.0 # Apache-2.0
heat-translator>=0.4.0 # Apache-2.0
--e git+https://github.com/openstack/refstack-client#egg=refstack-client
+refstack-client