summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/testing/user/userguide/network.rst101
-rw-r--r--docs/testing/user/userguide/network_testcase_description.rst88
-rw-r--r--resources/ansible_roles/openstack/tasks/main.yml14
-rw-r--r--resources/ansible_roles/qtip-generator/files/compute/run.yml10
-rw-r--r--resources/ansible_roles/qtip-generator/files/compute/setup.yml9
5 files changed, 209 insertions, 13 deletions
diff --git a/docs/testing/user/userguide/network.rst b/docs/testing/user/userguide/network.rst
index 095ad281..4d48d4d5 100644
--- a/docs/testing/user/userguide/network.rst
+++ b/docs/testing/user/userguide/network.rst
@@ -1,16 +1,115 @@
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
-.. (c) 2018 ZTE Corp.
+.. (c) 2018 Spirent Communications Corp.
********************************
Network Performance Benchmarking
********************************
+Like compute or storage QPI, network QPI gives users an overall score for system network performance.
+For now it focuses on L2 virtual switch performance on NFVI. Current testcase are from RFC2544 standart and
+implemntation is based on Spirent Testcenter Virtual.
+For now, network QPI runs against on the baremetal/virtual scenario deployed by
+the OPNFV installer `APEX`_.
Getting started
===============
+Notice: All descriptions are based on containers.
+Requirements
+------------
+
+* Git must be installed.
+* Docker and docker-compose must be installed.
+* Spirent Testcenter Virtual image must be uploaded to the target cloud and the
+ associated flavor must be created before test.
+* Spirent License Server and Spirent LabServer must be set up and keep them ip
+ reachable from target cloud external network before test.
+
+Git Clone QTIP Repo
+-------------------
+
+::
+
+ git clone https://git.opnfv.org/qtip
+
+Running QTIP container and Nettest Containers
+----------------------------------------------
+
+With Docker Compose, we can use a YAML file to configure application's services and
+use a single command to create and start all the services.
+
+There is a YAML file ``./qtip/tests/ci/network/docker-compose.yaml`` from QTIP repos.
+It can help you to create and start the network QPI service.
+
+Before running docker-compose, you must specify these three variables:
+
+* DOCKER_TAG, which specified the Docker tag(ie: latest)
+* SSH_CREDENTIALS, a directory which includes an SSH key pair will be mounted into QTIP container.
+ QTIP use this SSH key pair to connect to remote hosts.
+* ENV_FILE, which includes the environment variables required by QTIP and Storperf containers
+
+ A example of ENV_FILE:
+
+ ::
+
+ INSTALLER_TYPE=apex
+ INSTALLER_IP=192.168.122.247
+ TEST_SUITE=network
+ NODE_NAME=zte-virtual5
+ SCENARIO=generic
+ TESTAPI_URL=
+ OPNFV_RELEASE=euphrates
+ # The below environment variables are Openstack Credentials.
+ OS_USERNAME=admin
+ OS_USER_DOMAIN_NAME=Default
+ OS_PROJECT_DOMAIN_NAME=Default
+ OS_BAREMETAL_API_VERSION=1.29
+ NOVA_VERSION=1.1
+ OS_PROJECT_NAME=admin
+ OS_PASSWORD=ZjmZJmkCvVXf9ry9daxgwmz3s
+ OS_NO_CACHE=True
+ COMPUTE_API_VERSION=1.1
+ no_proxy=,192.168.37.10,192.0.2.5
+ OS_CLOUDNAME=overcloud
+ OS_AUTH_URL=http://192.168.37.10:5000/v3
+ IRONIC_API_VERSION=1.29
+ OS_IDENTITY_API_VERSION=3
+ OS_AUTH_TYPE=password
+ # The below environment variables are extra info with Spirent.
+ SPT_LICENSE_SERVER_IP=192.168.37.251
+ SPT_LAB_SERVER_IP=192.168.37.122
+ SPT_STCV_IMAGE_NAME=stcv-4.79
+ SPT_STCV_FLAVOR_NAME=m1.tiny
+
+Then, you use the following commands to start network QPI service.
+
+::
+
+ docker-compose -f docker-compose.yaml pull
+ docker-compose -f docker-compose.yaml up -d
+
+Execution
+---------
+
+You can run network QPI with docker exec:
+::
+
+ docker exec <qtip container> bash -x /home/opnfv/repos/qtip/qtip/scripts/quickstart.sh
+
+QTIP generates results in the ``$PWD/results/`` directory are listed down under the
+timestamp name.
Metrics
-------
+
+Nettest provides the following `metrics`_:
+
+* RFC2544 througput
+* RFC2544 latency
+
+
+.. _APEX: https://wiki.opnfv.org/display/apex
+.. _metrics: https://tools.ietf.org/html/rfc2544
+
diff --git a/docs/testing/user/userguide/network_testcase_description.rst b/docs/testing/user/userguide/network_testcase_description.rst
index accf17a6..66fda073 100644
--- a/docs/testing/user/userguide/network_testcase_description.rst
+++ b/docs/testing/user/userguide/network_testcase_description.rst
@@ -1,6 +1,6 @@
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
-.. (c) 2018 ZTE Corp.
+.. (c) 2018 Spirent Communications Corp.
.. Template to be used for test case descriptions in QTIP Project.
@@ -8,7 +8,89 @@ Test Case Description
=====================
+-----------------------------------------------------------------------------+
-|test case slogan e.g. Network throughput |
+|Network throughput |
++==============+==============================================================+
+|test case id | qtip_throughput |
++--------------+--------------------------------------------------------------+
+|metric | rfc2544 throughput |
++--------------+--------------------------------------------------------------+
+|test purpose | get the max throughput of the pathway on same host or accross|
+| | hosts |
++--------------+--------------------------------------------------------------+
+|configuration | None |
++--------------+--------------------------------------------------------------+
+|test tool | Spirent Test Center Virtual |
++--------------+--------------------------------------------------------------+
+|references | RFC2544 |
++--------------+--------------------------------------------------------------+
+|applicability | 1. test the switch throughput on same host or accross hosts |
+| | 2. test the switch throughput for different packet sizes |
++--------------+--------------------------------------------------------------+
+|pre-test | 1. deploy STC license server and LabServer on public network |
+|conditions | and verify it can operate correctlly |
+| | 2. upload STC virtual image and create STCv flavor on the |
+| | deployed cloud environment |
++--------------+------+----------------------------------+--------------------+
+|test sequence | step | description | result |
+| +------+----------------------------------+--------------------+
+| | 1 | deploy STCv stack on the target | 2 STCv VM will be |
+| | | cloud with affinity attribute | established on the |
+| | | according to requirements. | cloud |
+| +------+----------------------------------+--------------------+
+| | 2 | run rfc2544 throughput test with | test result report |
+| | | different packet size | will be produced in|
+| | | | QTIP container |
+| +------+----------------------------------+--------------------+
+| | 3 | destory STCv stack | STCv stack |
+| | | different packet size | destoried |
++--------------+------+----------------------------------+--------------------+
+|test verdict | find the test result report in QTIP container running |
+| | directory |
++--------------+--------------------------------------------------------------+
+
++-----------------------------------------------------------------------------+
+|Network throughput |
++==============+==============================================================+
+|test case id | qtip_latency |
++--------------+--------------------------------------------------------------+
+|metric | rfc2544 lantency |
++--------------+--------------------------------------------------------------+
+|test purpose | get the latency value of the pathway on same host or accross |
+| | hosts |
++--------------+--------------------------------------------------------------+
+|configuration | None |
++--------------+--------------------------------------------------------------+
+|test tool | Spirent Test Center Virtual |
++--------------+--------------------------------------------------------------+
+|references | RFC2544 |
++--------------+--------------------------------------------------------------+
+|applicability | 1. test the switch latency on same host or accross hosts |
+| | 2. test the switch latency for different packet sizes |
++--------------+--------------------------------------------------------------+
+|pre-test | 1. deploy STC license server and LabServer on public network |
+|conditions | and verify it can operate correctlly |
+| | 2. upload STC virtual image and create STCv flavor on the |
+| | deployed cloud environment |
++--------------+------+----------------------------------+--------------------+
+|test sequence | step | description | result |
+| +------+----------------------------------+--------------------+
+| | 1 | deploy STCv stack on the target | 2 STCv VM will be |
+| | | cloud with affinity attribute | established on the |
+| | | according to requirements. | cloud |
+| +------+----------------------------------+--------------------+
+| | 2 | run rfc2544 latency test with | test result report |
+| | | different packet size | will be produced in|
+| | | | QTIP container |
+| +------+----------------------------------+--------------------+
+| | 3 | destroy STCv stack | STCv stack |
+| | | | destried |
++--------------+------+----------------------------------+--------------------+
+|test verdict | find the test result report in QTIP container running |
+| | directory |
++--------------+--------------------------------------------------------------+
+
++-----------------------------------------------------------------------------+
+|Network Latency |
+==============+==============================================================+
|test case id | e.g. qtip_throughput |
+--------------+--------------------------------------------------------------+
@@ -22,7 +104,7 @@ Test Case Description
+--------------+--------------------------------------------------------------+
|test tool | e.g. ping |
+--------------+--------------------------------------------------------------+
-|references | e.g. RFCxxx, ETSI-NFVyyy |
+|references | RFC2544 |
+--------------+--------------------------------------------------------------+
|applicability | describe variations of the test case which can be |
| | performend, e.g. run the test for different packet sizes |
diff --git a/resources/ansible_roles/openstack/tasks/main.yml b/resources/ansible_roles/openstack/tasks/main.yml
index b42c43fb..57942260 100644
--- a/resources/ansible_roles/openstack/tasks/main.yml
+++ b/resources/ansible_roles/openstack/tasks/main.yml
@@ -86,6 +86,14 @@
external_network: "{{ external_network }}"
register: stack
+- name: Wait 600s for vm connection to become reachable/usable
+ wait_for:
+ host: "{{ item.output_value }}"
+ port: 22
+ timeout: 600
+ search_regex: OpenSSH
+ with_items: "{{ stack.stack.outputs }}"
+
- name: generating inventory file
template:
src: hosts.j2
@@ -95,9 +103,3 @@
template:
src: ssh.cfg.j2
dest: ./ssh.cfg
-
-- name: Wait 600 seconds for target connection to become reachable/usable
- wait_for_connection:
-
-- name: install python 2
- raw: test -e /usr/bin/python || (apt-get -y update && apt-get install -y python-minimal)
diff --git a/resources/ansible_roles/qtip-generator/files/compute/run.yml b/resources/ansible_roles/qtip-generator/files/compute/run.yml
index f8e71f0c..59f84c3f 100644
--- a/resources/ansible_roles/qtip-generator/files/compute/run.yml
+++ b/resources/ansible_roles/qtip-generator/files/compute/run.yml
@@ -18,6 +18,16 @@
- hosts: SUT
+{% if sut == 'vnf' %}
+ gather_facts: no
+ pre_tasks:
+ - name: check whether install python 2 in target
+ become: yes
+ raw: test -e /usr/bin/python || (apt-get -y update && apt-get install -y python-minimal)
+ - name: gather facts
+ setup:
+{% endif %}
+
roles:
# prepare environment
- { role: qtip, tasks: setup-node, tags: [setup] }
diff --git a/resources/ansible_roles/qtip-generator/files/compute/setup.yml b/resources/ansible_roles/qtip-generator/files/compute/setup.yml
index 037f5746..c3e8f58e 100644
--- a/resources/ansible_roles/qtip-generator/files/compute/setup.yml
+++ b/resources/ansible_roles/qtip-generator/files/compute/setup.yml
@@ -16,15 +16,18 @@
gather_facts: no
roles:
- { role: openstack, external_network: {{ network_group[installer_type] }}, heat_template: heat_template.yml }
-{% endif %}
+
+{% elif sut == 'node' %}
{% if installer_type == 'manual' %}
- hosts: localhost
gather_facts: no
tasks:
- - debug: "msg='please add hosts to SUT group in `hosts` file manually.'"
+ - debug: "msg='please add hosts to SUT group in `hosts` file manually.'"
+
{% else %}
- hosts: [{{ installer_group[installer_type] }}]
roles:
- - { role: qtip, tasks: generate-inventory }
+ - { role: qtip, tasks: generate-inventory }
+{% endif %}
{% endif %}