[docs][nsb][install] Update source for sample pod files
[yardstick.git] / docs / testing / user / userguide / 03-architecture.rst
index 8336b60..94081b0 100755 (executable)
@@ -1,30 +1,42 @@
 .. This work is licensed under a Creative Commons Attribution 4.0 International
-.. License.
-.. http://creativecommons.org/licenses/by/4.0
-.. (c) 2016 Huawei Technologies Co.,Ltd and others
+   License.
+   http://creativecommons.org/licenses/by/4.0
+   (c) 2016 Huawei Technologies Co.,Ltd and others
+
+    Convention for heading levels in Yardstick documentation:
+
+    =======  Heading 0 (reserved for the title in a document)
+    -------  Heading 1
+    ^^^^^^^  Heading 2
+    +++++++  Heading 3
+    '''''''  Heading 4
+
+    Avoid deeper levels because they do not render well.
 
 ============
 Architecture
 ============
 
 Abstract
-========
-This chapter describes the yardstick framework software architecture. we will introduce it from Use-Case View,
-Logical View, Process View and Deployment View. More technical details will be introduced in this chapter.
+--------
+
+This chapter describes the Yardstick framework software architecture. We will
+introduce it from Use Case View, Logical View, Process View and Deployment
+View. More technical details will be introduced in this chapter.
 
 Overview
-========
+--------
 
 Architecture overview
----------------------
+^^^^^^^^^^^^^^^^^^^^^
 Yardstick is mainly written in Python, and test configurations are made
 in YAML. Documentation is written in reStructuredText format, i.e. .rst
 files. Yardstick is inspired by Rally. Yardstick is intended to run on a
 computer with access and credentials to a cloud. The test case is described
 in a configuration file given as an argument.
 
-How it works: the benchmark task configuration file is parsed and converted into
-an internal model. The context part of the model is converted into a Heat
+How it works: the benchmark task configuration file is parsed and converted
+into an internal model. The context part of the model is converted into a Heat
 template and deployed into a stack. Each scenario is run using a runner, either
 serially or in parallel. Each runner runs in its own subprocess executing
 commands in a VM using SSH. The output of each scenario is written as json
@@ -33,7 +45,8 @@ the test result will be shown with grafana.
 
 
 Concept
--------
+^^^^^^^
+
 **Benchmark** - assess the relative performance of something
 
 **Benchmark** configuration file - describes a single test case in yaml format
@@ -43,13 +56,15 @@ names, image names, affinity rules and network configurations. A context is
 converted into a simplified Heat template, which is used to deploy onto the
 Openstack environment.
 
-**Data** - Output produced by running a benchmark, written to a file in json format
+**Data** - Output produced by running a benchmark, written to a file in json
+format
 
 **Runner** - Logic that determines how a test scenario is run and reported, for
 example the number of test iterations, input value stepping and test duration.
 Predefined runner types exist for re-usage, see `Runner types`_.
 
-**Scenario** - Type/class of measurement for example Ping, Pktgen, (Iperf, LmBench, ...)
+**Scenario** - Type/class of measurement for example Ping, Pktgen, (Iperf,
+LmBench, ...)
 
 **SLA** - Relates to what result boundary a test case must meet to pass. For
 example a latency limit, amount or ratio of lost packets and so on. Action
@@ -59,7 +74,7 @@ configuration file and evaluated by the runner.
 
 
 Runner types
-------------
+^^^^^^^^^^^^
 
 There exists several predefined runner types to choose between when designing
 a test scenario:
@@ -126,10 +141,11 @@ Snippet of an Iteration runner configuration:
 
 
 Use-Case View
-=============
+-------------
+
 Yardstick Use-Case View shows two kinds of users. One is the Tester who will
-do testing in cloud, the other is the User who is more concerned with test result
-and result analyses.
+do testing in cloud, the other is the User who is more concerned with test
+result and result analyses.
 
 For testers, they will run a single test case or test case suite to verify
 infrastructure compliance or bencnmark their own infrastructure performance.
@@ -155,7 +171,8 @@ on OPNFV testing dashboard which use MongoDB as backend.
    :alt: Yardstick Use-Case View
 
 Logical View
-============
+------------
+
 Yardstick Logical View describes the most important classes, their
 organization, and the most important use-case realizations.
 
@@ -192,7 +209,8 @@ finished.
    :alt: Yardstick framework architecture in Danube
 
 Process View (Test execution flow)
-==================================
+----------------------------------
+
 Yardstick process view shows how yardstick runs a test case. Below is the
 sequence graph about the test execution flow using heat context, and each
 object represents one module in yardstick:
@@ -219,7 +237,8 @@ will call "Openstack" to undeploy the heat stack. Once the stack is
 undepoyed, the whole test ends.
 
 Deployment View
-===============
+---------------
+
 Yardstick deployment view shows how the yardstick tool can be deployed into the
 underlying platform. Generally, yardstick tool is installed on JumpServer(see
 `07-installation` for detail installation steps), and JumpServer is
@@ -232,7 +251,7 @@ result for better showing.
    :alt: Yardstick Deployment View
 
 Yardstick Directory structure
-=============================
+-----------------------------
 
 **yardstick/** - Yardstick main directory.
 
@@ -240,27 +259,27 @@ Yardstick Directory structure
         with support for different installers.
 
 *docs/* - All documentation is stored here, such as configuration guides,
-          user guides and Yardstick descriptions.
+          user guides and Yardstick test case descriptions.
 
 *etc/* - Used for test cases requiring specific POD configurations.
 
 *samples/* - test case samples are stored here, most of all scenario and
-             feature's samples are shown in this directory.
+             feature samples are shown in this directory.
 
-*tests/* - Here both Yardstick internal tests (*functional/* and *unit/*) as
-           well as the test cases run to verify the NFVI (*opnfv/*) are stored.
-           Also configurations of what to run daily and weekly at the different
-           PODs is located here.
+*tests/* - The test cases run to verify the NFVI (*opnfv/*) are stored here.
+           The configurations of what to run daily and weekly at the different
+           PODs are also located here.
 
-*tools/* - Currently contains tools to build image for VMs which are deployed
-           by Heat. Currently contains how to build the yardstick-trusty-server
-           image with the different tools that are needed from within the image.
+*tools/* - Contains tools to build image for VMs which are deployed by Heat.
+           Currently contains how to build the yardstick-image with the
+           different tools that are needed from within the image.
 
 *plugin/* - Plug-in configuration files are stored here.
 
-*vTC/* - Contains the files for running the virtual Traffic Classifier tests.
-
-*yardstick/* - Contains the internals of Yardstick: Runners, Scenario, Contexts,
-               CLI parsing, keys, plotting tools, dispatcher, plugin
+*yardstick/* - Contains the internals of Yardstick: :term:`Runners <runner>`,
+               :term:`Scenarios <scenario>`, :term:`Contexts <context>`, CLI
+               parsing, keys, plotting tools, dispatcher, plugin
                install/remove scripts and so on.
 
+*yardstick/tests* - The Yardstick internal tests (*functional/* and *unit/*)
+                    are stored here.