Add lesser containers based on Alpine 63/36963/12
authorCédric Ollivier <cedric.ollivier@orange.com>
Wed, 5 Jul 2017 09:44:01 +0000 (11:44 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Mon, 10 Jul 2017 00:01:43 +0000 (02:01 +0200)
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>
docker/core/Dockerfile [new file with mode: 0644]
docker/healthcheck/Dockerfile [new file with mode: 0644]
docker/healthcheck/testcases.yaml [new file with mode: 0644]
docker/smoke/Dockerfile [new file with mode: 0644]
docker/smoke/testcases.yaml [new file with mode: 0644]
docker/smoke/thirdparty-requirements.txt [new file with mode: 0644]

diff --git a/docker/core/Dockerfile b/docker/core/Dockerfile
new file mode 100644 (file)
index 0000000..4f3210d
--- /dev/null
@@ -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 (file)
index 0000000..e743b90
--- /dev/null
@@ -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 (file)
index 0000000..e43c7c7
--- /dev/null
@@ -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 (file)
index 0000000..ec050ea
--- /dev/null
@@ -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 (file)
index 0000000..69ea038
--- /dev/null
@@ -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 (file)
index 0000000..5e60fb7
--- /dev/null
@@ -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