aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/release/release-notes/euphrates.rst137
-rw-r--r--docs/testing/user/configguide/index.rst6
-rw-r--r--qtip/ansible_library/modules/mcp.py105
-rw-r--r--qtip/cli/commands/cmd_project.py2
-rw-r--r--resources/ansible_roles/opnfv-testapi/tasks/report.yml2
-rw-r--r--resources/ansible_roles/qtip-generator/defaults/main.yml1
-rw-r--r--resources/ansible_roles/qtip-generator/files/compute/group_vars/all.yml1
-rw-r--r--resources/ansible_roles/qtip/tasks/gather-facts-mcp.yml14
8 files changed, 263 insertions, 5 deletions
diff --git a/docs/release/release-notes/euphrates.rst b/docs/release/release-notes/euphrates.rst
new file mode 100644
index 00000000..48058e64
--- /dev/null
+++ b/docs/release/release-notes/euphrates.rst
@@ -0,0 +1,137 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+*********
+Euphrates
+*********
+
+This document provides the release notes of QTIP for OPNFV Euphrates release
+
+.. contents::
+ :depth: 3
+ :local:
+
+Version history
+===============
+
++--------------------+--------------------+--------------------+--------------------+
+| **Date** | **Ver.** | **Author** | **Comment** |
+| | | | |
++--------------------+--------------------+--------------------+--------------------+
+| 2017-10-20 | Euphrates 1.0 | Yujun Zhang | |
+| | | | |
++--------------------+--------------------+--------------------+--------------------+
+
+Summary
+=======
+
+QTIP Euphrates release continues working on **QPI**, a.k.a. QTIP Performance Index, which is calculated from metrics
+collected in performance tests.
+
+Besides compute performance benchmark, QTIP has integrated OPNFV storperf for storage performance benchmarking.
+
+A PoC of web portal is implemented as the starting point of Benchmarking as a Service.
+
+Release Data
+============
+
++--------------------------------------+--------------------------------------+
+| **Project** | QTIP |
+| | |
++--------------------------------------+--------------------------------------+
+| **Repo/commit-ID** | qtip/euphrates.1.0 |
+| | |
++--------------------------------------+--------------------------------------+
+| **Release designation** | stable version |
+| | |
++--------------------------------------+--------------------------------------+
+| **Release date** | 2017-10-20 |
+| | |
++--------------------------------------+--------------------------------------+
+| **Purpose of the delivery** | release with OPNFV cycle |
+| | |
++--------------------------------------+--------------------------------------+
+
+Version change
+--------------
+
+Module version changes
+^^^^^^^^^^^^^^^^^^^^^^
+
+The following Python packages are used in this release::
+
+ humanfriendly==4.4.1
+ connexion==1.1.11
+ Jinja2==2.9.6
+ Django==1.11.5
+ asq==1.2.1
+ six==1.11.0
+ ansible==2.4.0.0
+ requests==2.18.4
+ prettytable==0.7.2
+ numpy==1.13.1
+ click==6.7
+ pbr==3.1.1
+ PyYAML==3.12
+
+It is considered as a baseline for future releases.
+
+Reason for version
+------------------
+
+Features additions
+^^^^^^^^^^^^^^^^^^
+
+* Storage QPI (QTIP Performance Index) specification and benchmarking project
+
+Framework evolution
+^^^^^^^^^^^^^^^^^^^
+
+Ansible is used as the backbone of QTIP framework. Not only the main testing procedure is built as Ansible roles, but
+also the inventory discovery is implemented as Ansible module, the calculation and collection actions are Ansible
+plugins. Even the testing project itself is generated using jinja2 template rendering driven by Ansible.
+
+Deliverables
+------------
+
+Software
+^^^^^^^^
+
+- `QTIP Docker image <https://hub.docker.com/r/opnfv/qtip>`_ (tag: euphrates.1.0)
+
+Documentation
+^^^^^^^^^^^^^
+
+- `Installation & Configuration <http://docs.opnfv.org/en/stable-euphrates/qtip/docs/testing/user/configguide>`_
+- `User Guide <http://docs.opnfv.org/en/stable-euphrates/submodules/qtip/docs/testing/user/userguide>`_
+- `Developer Guide <http://docs.opnfv.org/en/stable-euphrates/submodules/qtip/docs/testing/developer/devguide>`_
+
+Known Limitations, Issues and Workarounds
+=========================================
+
+Limitations
+-----------
+
+- Supporting on legacy OPNFV fuel installer is no longer maintained.
+
+Known issues
+------------
+
+Test Result
+===========
+
+QTIP has undergone QA test runs with the following results:
+
++---------------------------------------------------+--------------------------------------+
+| **TEST-SUITES** | **Results:** |
+| | |
++---------------------------------------------------+--------------------------------------+
+| qtip-verify-euphrates | 53/53 passed, 86% lines coverage |
+| | |
++---------------------------------------------------+--------------------------------------+
+| qtip-compute-apex-euphrates | passed |
+| | |
++---------------------------------------------------+--------------------------------------+
+| qtip-storage-apex-euphrates | passed |
+| | |
++---------------------------------------------------+--------------------------------------+
diff --git a/docs/testing/user/configguide/index.rst b/docs/testing/user/configguide/index.rst
index ce733666..fa893e5e 100644
--- a/docs/testing/user/configguide/index.rst
+++ b/docs/testing/user/configguide/index.rst
@@ -4,9 +4,9 @@
.. (c) 2016 ZTE Corp.
-*********************************
-QTIP Installation & Configuration
-*********************************
+***********************
+QTIP Installation Guide
+***********************
.. toctree::
:maxdepth: 2
diff --git a/qtip/ansible_library/modules/mcp.py b/qtip/ansible_library/modules/mcp.py
new file mode 100644
index 00000000..21be7bcc
--- /dev/null
+++ b/qtip/ansible_library/modules/mcp.py
@@ -0,0 +1,105 @@
+#!/usr/bin/python
+
+###############################################################
+# Copyright (c) 2017 ZTE Corporation and others
+# taseer94@gmail.com
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+import json
+from collections import defaultdict
+
+from ansible.module_utils.basic import AnsibleModule
+
+ANSIBLE_METADATA = {'metadata_version': '1.0',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = '''
+---
+module: mcp
+short_description: collecting facts from mcp environments
+description:
+ - Use this module to create a dynamic inventory from salt master (mcp).
+version_added: "1.0"
+author: "Taseer Ahmed (@Taseer)"
+options:
+notes:
+requirements:
+ - Host 'salt-master' is in ~/.ssh/config
+'''
+
+RETURN = '''
+ansible_facts:
+ description: facts collected for ansible
+ returned: success
+ type: dictionary
+ contains:
+ hosts:
+ description: host grouped by hostname, cluster, role and manufacture
+ type: dict
+ hosts_meta:
+ description: hosts meta data indexed by hostname
+ type: dict
+'''
+
+EXAMPLES = '''
+---
+- hosts: salt-master
+ tasks:
+ - name: collect facts of mcp hosts
+ mcp:
+ - debug: var=hostvars
+ - name: add compute node to ansible inventory
+ add_host:
+ name: "{{ hosts_meta[item]['ip'] }}"
+ groups: mcp-compute
+ ansible_user: root
+ ansible_ssh_common_args: '-o StrictHostKeyChecking=No -o ProxyJump=salt-master'
+ with_items: "{{ hosts.compute }}"
+- hosts: mcp-compute
+ tasks:
+ - name: check ssh connection
+ ping:
+'''
+
+
+def generate_inventory(nodes):
+ """Generate ansible inventory from node list in json format"""
+ hosts = defaultdict(list)
+ hosts_meta = {}
+ node_meta = {}
+
+ for key, value in nodes.iteritems():
+ if isinstance(value, dict):
+ for k, v in value.iteritems():
+ if k == "fqdn_ip4":
+ node_meta['ansible_ssh_host'] = v[0]
+ node_meta['ansible_user'] = 'root'
+ hosts_meta[key] = node_meta
+ hosts['compute-nodes'].append(node_meta['ansible_ssh_host'])
+
+ return {'hosts': hosts, 'hosts_meta': hosts_meta}
+
+
+def main():
+ module = AnsibleModule(argument_spec=dict())
+
+ cmd = [module.get_bin_path('salt', True), '-C', '-t 5', '--static', '--out=json', 'cmp*', 'grains.item',
+ 'fqdn_ip4', 'host']
+ (rc, out, err) = module.run_command(cmd)
+
+ if rc is not None and rc != 0:
+ return module.fail_json(msg=err)
+
+ nodes = json.loads(out)
+
+ module.exit_json(changed=False, ansible_facts=generate_inventory(nodes))
+
+
+if __name__ == '__main__':
+ main()
diff --git a/qtip/cli/commands/cmd_project.py b/qtip/cli/commands/cmd_project.py
index 325594ad..2836fa69 100644
--- a/qtip/cli/commands/cmd_project.py
+++ b/qtip/cli/commands/cmd_project.py
@@ -50,7 +50,7 @@ def cli():
default='opnfv-pod',
help='Name of pod under test')
@click.option('--installer-type',
- type=click.Choice(['apex', 'fuel', 'manual']),
+ type=click.Choice(['apex', 'fuel', 'manual', 'mcp']),
prompt='OPNFV Installer Type',
default='manual',
help='OPNFV installer')
diff --git a/resources/ansible_roles/opnfv-testapi/tasks/report.yml b/resources/ansible_roles/opnfv-testapi/tasks/report.yml
index 830f9398..0633eafb 100644
--- a/resources/ansible_roles/opnfv-testapi/tasks/report.yml
+++ b/resources/ansible_roles/opnfv-testapi/tasks/report.yml
@@ -26,6 +26,6 @@
scenario: "{{ scenario }}"
start_date: "{{ ansible_date_time.date }}"
stop_date: "{{ ansible_date_time.date }}"
- criteria: 2048
+ criteria: PASS # regarded as "pass" if execution is done
details:
score: "{{ pod_result.score }}"
diff --git a/resources/ansible_roles/qtip-generator/defaults/main.yml b/resources/ansible_roles/qtip-generator/defaults/main.yml
index 527da6f7..f6714b8d 100644
--- a/resources/ansible_roles/qtip-generator/defaults/main.yml
+++ b/resources/ansible_roles/qtip-generator/defaults/main.yml
@@ -14,6 +14,7 @@ installer_group:
manual: dummy-group
fuel: fuel-masters
apex: apex-underclouds
+ mcp: salt-masters
project_name: 'qtip-project'
project_template: 'compute'
diff --git a/resources/ansible_roles/qtip-generator/files/compute/group_vars/all.yml b/resources/ansible_roles/qtip-generator/files/compute/group_vars/all.yml
index 8b90b498..efb2bdb7 100644
--- a/resources/ansible_roles/qtip-generator/files/compute/group_vars/all.yml
+++ b/resources/ansible_roles/qtip-generator/files/compute/group_vars/all.yml
@@ -20,3 +20,4 @@ installer_group:
manual: dummy-group
fuel: fuel-masters
apex: apex-underclouds
+ mcp: salt-master
diff --git a/resources/ansible_roles/qtip/tasks/gather-facts-mcp.yml b/resources/ansible_roles/qtip/tasks/gather-facts-mcp.yml
new file mode 100644
index 00000000..5aed9e75
--- /dev/null
+++ b/resources/ansible_roles/qtip/tasks/gather-facts-mcp.yml
@@ -0,0 +1,14 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+# taseer94@gmail.com
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+---
+
+- name: gathering facts for mcp slave nodes
+ mcp: \ No newline at end of file