Merge "[docs][userguide] Update NSB intro in ch12"
[yardstick.git] / docs / testing / user / userguide / 04-installation.rst
index 6b32592..2dff80e 100644 (file)
@@ -1,7 +1,17 @@
 .. This work is licensed under a Creative Commons Attribution 4.0 International
-.. License.
-.. http://creativecommons.org/licenses/by/4.0
-.. (c) OPNFV, Ericsson AB, Huawei Technologies Co.,Ltd and others.
+   License.
+   http://creativecommons.org/licenses/by/4.0
+   (c) OPNFV, Ericsson AB, 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.
 
 ..
    Convention for heading levels in Yardstick documentation:
@@ -18,7 +28,6 @@
 Yardstick Installation
 ======================
 
-
 Yardstick supports installation by Docker or directly in Ubuntu. The
 installation procedure for Docker and direct installation are detailed in
 the sections below.
@@ -139,7 +148,7 @@ in the following sections. Before that, access the Yardstick container::
 and then configure Yardstick environments in the Yardstick container.
 
 Using the CLI command ``env prepare`` (first way) (**recommended**)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 In the Yardstick container, the Yardstick repository is located in the
 ``/home/opnfv/repos`` directory. Yardstick provides a CLI to prepare OpenStack
@@ -171,10 +180,10 @@ terminal window and execute the following command::
 
 
 Manually exporting the env variables and initializing OpenStack (second way)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 Export OpenStack environment variables
-######################################
+''''''''''''''''''''''''''''''''''''''
 
 Before running Yardstick it is necessary to export OpenStack environment
 variables::
@@ -200,7 +209,7 @@ A sample ``openrc`` file may look like this::
 
 
 Manual creation of Yardstick flavor and guest images
-####################################################
+''''''''''''''''''''''''''''''''''''''''''''''''''''
 
 Before executing Yardstick test cases, make sure that Yardstick flavor and
 guest image are available in OpenStack. Detailed steps about creating the
@@ -257,14 +266,14 @@ image. Add Cirros and Ubuntu images to OpenStack::
 
 
 Automatic initialization of OpenStack (third way)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++++++++++++++++++++++++++++++++++++++++++++++++++
 
 Similar to the second way, the first step is also to
 `Export OpenStack environment variables`_. Then the following steps should be
 done.
 
 Automatic creation of Yardstick flavor and guest images
-#######################################################
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
 Yardstick has a script for automatically creating Yardstick flavor and building
 Yardstick guest images. This script is mainly used for CI and can be also used
@@ -340,7 +349,6 @@ For installing Yardstick directly in Ubuntu, the ``yardstick env`` command is
 not available. You need to prepare OpenStack environment variables and create
 Yardstick flavor and guest images manually.
 
-
 Uninstall Yardstick
 ^^^^^^^^^^^^^^^^^^^
 
@@ -575,17 +583,17 @@ Grafana to display data in the following sections.
 Automatic deployment of InfluxDB and Grafana containers (**recommended**)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-Firstly, enter the Yardstick container::
+1. Enter the Yardstick container::
 
-   sudo -EH docker exec -it yardstick /bin/bash
+     sudo -EH docker exec -it yardstick /bin/bash
 
-Secondly, create InfluxDB container and configure with the following command::
+2. Create InfluxDB container and configure with the following command::
 
-   yardstick env influxdb
+     yardstick env influxdb
 
-Thirdly, create and configure Grafana container::
+3. Create and configure Grafana container::
 
-   yardstick env grafana
+     yardstick env grafana
 
 Then you can run a test case and visit http://host_ip:1948
 (``admin``/``admin``) to see the results.
@@ -613,21 +621,21 @@ Run influxDB::
    sudo -EH docker run -d --name influxdb \
       -p 8083:8083 -p 8086:8086 --expose 8090 --expose 8099 \
       tutum/influxdb
-   docker exec -it influxdb bash
 
 Configure influxDB::
 
-   influx
-      >CREATE USER root WITH PASSWORD 'root' WITH ALL PRIVILEGES
-      >CREATE DATABASE yardstick;
-      >use yardstick;
-      >show MEASUREMENTS;
+   docker exec -it influxdb influx
+      > CREATE USER root WITH PASSWORD 'root' WITH ALL PRIVILEGES
+      > CREATE DATABASE yardstick;
+      > use yardstick;
+      > show MEASUREMENTS;
+      > exit
 
 Run Grafana::
 
    sudo -EH docker run -d --name grafana -p 1948:3000 grafana/grafana
 
-Log on http://{YOUR_IP_HERE}:1948 using ``admin``/``admin`` and configure
+Log on to ``http://{YOUR_IP_HERE}:1948`` using ``admin``/``admin`` and configure
 database resource to be ``{YOUR_IP_HERE}:8086``.
 
 .. image:: images/Grafana_config.png
@@ -640,7 +648,7 @@ Configure ``yardstick.conf``::
    sudo cp etc/yardstick/yardstick.conf.sample /etc/yardstick/yardstick.conf
    sudo vi /etc/yardstick/yardstick.conf
 
-Modify ``yardstick.conf``::
+Modify ``yardstick.conf`` to add the ``influxdb`` dispatcher::
 
    [DEFAULT]
    debug = True
@@ -653,13 +661,11 @@ Modify ``yardstick.conf``::
    username = root
    password = root
 
-Now you can run Yardstick test cases and store the results in influxDB.
-
+Now Yardstick will store results in InfluxDB when you run a testcase.
 
 Deploy InfluxDB and Grafana directly in Ubuntu (**Todo**)
 ---------------------------------------------------------
 
-
 Proxy Support
 -------------