aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2017-07-05 11:44:01 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2017-07-10 02:01:43 +0200
commitf15da4871f064a9d1d7f6adfecc420374bcb2546 (patch)
tree1a7f0b9d1a64598c4d8b3184e59f4a656ed00cd0
parentf9be90c62bc013adb8806383158d4866d4efc952 (diff)
Add lesser containers based on Alpine
It splits the full container into: - functest-core - functest-healthcheck - functest-smoke Smoke suite is currently partial and will be completed later (it may require updates in third party projects). Features, components and vnf suites will be integrated in other patchsets. Change-Id: I635a7fd84cac583c28bb1c82bc6cc9107a39f7ea Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--docker/core/Dockerfile21
-rw-r--r--docker/healthcheck/Dockerfile3
-rw-r--r--docker/healthcheck/testcases.yaml61
-rw-r--r--docker/smoke/Dockerfile14
-rw-r--r--docker/smoke/testcases.yaml106
-rw-r--r--docker/smoke/thirdparty-requirements.txt8
6 files changed, 213 insertions, 0 deletions
diff --git a/docker/core/Dockerfile b/docker/core/Dockerfile
new file mode 100644
index 00000000..4f3210d7
--- /dev/null
+++ b/docker/core/Dockerfile
@@ -0,0 +1,21 @@
+FROM alpine:3.6
+
+RUN apk --no-cache add --update \
+ python libffi libssl1.0 libjpeg-turbo py-pip bash \
+ grep sed wget ca-certificates git && \
+ 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=stable/ocata | \
+ sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ \
+ > upper-constraints.txt && \
+ pip install --src /src -cupper-constraints.txt \
+ git+https://gerrit.opnfv.org/gerrit/releng#egg=opnfv\&subdirectory=modules \
+ git+https://gerrit.opnfv.org/gerrit/snaps#egg=snaps \
+ git+https://gerrit.opnfv.org/gerrit/functest#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 00000000..e743b908
--- /dev/null
+++ b/docker/healthcheck/Dockerfile
@@ -0,0 +1,3 @@
+FROM ollivier/functest-core
+
+COPY testcases.yaml /usr/lib/python2.7/site-packages/functest/ci/testcases.yaml
diff --git a/docker/healthcheck/testcases.yaml b/docker/healthcheck/testcases.yaml
new file mode 100644
index 00000000..e43c7c77
--- /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 00000000..ec050ea4
--- /dev/null
+++ b/docker/smoke/Dockerfile
@@ -0,0 +1,14 @@
+FROM ollivier/functest-core
+
+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=stable/ocata \
+ -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
diff --git a/docker/smoke/testcases.yaml b/docker/smoke/testcases.yaml
new file mode 100644
index 00000000..69ea038a
--- /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 00000000..5e60fb74
--- /dev/null
+++ b/docker/smoke/thirdparty-requirements.txt
@@ -0,0 +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
+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