Merge "Modify the Docker diff file for ARM64"
[yardstick.git] / docs / testing / user / userguide / 04-installation.rst
index dc528db..cac8146 100644 (file)
@@ -107,6 +107,12 @@ Run the Docker image to get a Yardstick container::
    ======================= ====================================================
    --name yardstick        The name for this container
 
+If the host is restarted
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+The yardstick container must be started if the host is rebooted::
+
+    docker start yardstick
 
 Configure the Yardstick container environment
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -166,13 +172,13 @@ Environment variables in the ``openrc`` file have to include at least::
    OS_AUTH_URL
    OS_USERNAME
    OS_PASSWORD
-   OS_TENANT_NAME
+   OS_PROJECT_NAME
    EXTERNAL_NETWORK
 
 A sample ``openrc`` file may look like this::
 
   export OS_PASSWORD=console
-  export OS_TENANT_NAME=admin
+  export OS_PROJECT_NAME=admin
   export OS_AUTH_URL=http://172.16.1.222:35357/v2.0
   export OS_USERNAME=admin
   export OS_VOLUME_API_VERSION=2
@@ -301,12 +307,6 @@ Prerequisite preparation::
    sudo -EH pip install appdirs==1.4.0
    sudo -EH pip install virtualenv
 
-Create a virtual environment::
-
-   virtualenv ~/yardstick_venv
-   export YARDSTICK_VENV=~/yardstick_venv
-   source ~/yardstick_venv/bin/activate
-
 Download the source code and install Yardstick from it::
 
    git clone https://gerrit.opnfv.org/gerrit/yardstick
@@ -314,6 +314,10 @@ Download the source code and install Yardstick from it::
    cd ~/yardstick
    sudo -EH ./install.sh
 
+If the host is ever restarted, nginx and uwsgi need to be restarted::
+
+   service nginx restart
+   uwsgi -i /etc/yardstick/yardstick.ini
 
 Configure the Yardstick environment (**Todo**)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -331,6 +335,91 @@ For uninstalling Yardstick, just delete the virtual environment::
    rm -rf ~/yardstick_venv
 
 
+Install Yardstick directly in OpenSUSE
+--------------------------------------
+
+.. _install-framework:
+
+You can install Yardstick framework directly in OpenSUSE.
+
+
+Install Yardstick
+^^^^^^^^^^^^^^^^^
+
+Prerequisite preparation::
+
+   sudo -EH zypper -n install -y gcc \
+      wget \
+      git \
+      sshpass \
+      qemu-tools \
+      kpartx \
+      libffi-devel \
+      libopenssl-devel \
+      python \
+      python-devel \
+      python-virtualenv \
+      libxml2-devel \
+      libxslt-devel \
+      python-setuptools-git
+
+Create a virtual environment::
+
+   virtualenv ~/yardstick_venv
+   export YARDSTICK_VENV=~/yardstick_venv
+   source ~/yardstick_venv/bin/activate
+   sudo -EH easy_install -U setuptools
+
+Download the source code and install Yardstick from it::
+
+   git clone https://gerrit.opnfv.org/gerrit/yardstick
+   export YARDSTICK_REPO_DIR=~/yardstick
+   cd yardstick
+   sudo -EH python setup.py install
+   sudo -EH pip install -r requirements.txt
+
+Install missing python modules::
+
+   sudo -EH pip install pyyaml \
+      oslo_utils \
+      oslo_serialization \
+      oslo_config \
+      paramiko \
+      python.heatclient \
+      python.novaclient \
+      python.glanceclient \
+      python.neutronclient \
+      scp \
+      jinja2
+
+
+Configure the Yardstick environment
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Source the OpenStack environment variables::
+
+   source DEVSTACK_DIRECTORY/openrc
+
+Export the Openstack external network. The default installation of Devstack
+names the external network public::
+
+   export EXTERNAL_NETWORK=public
+   export OS_USERNAME=demo
+
+Change the API version used by Yardstick to v2.0 (the devstack openrc sets it
+to v3)::
+
+   export OS_AUTH_URL=http://PUBLIC_IP_ADDRESS:5000/v2.0
+
+
+Uninstall Yardstick
+^^^^^^^^^^^^^^^^^^^
+
+For unistalling Yardstick, just delete the virtual environment::
+
+   rm -rf ~/yardstick_venv
+
+
 Verify the installation
 -----------------------
 
@@ -375,7 +464,7 @@ Thirdly, create and configure Grafana container::
 
    yardstick env grafana
 
-Then you can run a test case and visit http://host_ip:3000
+Then you can run a test case and visit http://host_ip:1948
 (``admin``/``admin``) to see the results.
 
 .. note:: Executing ``yardstick env`` command to deploy InfluxDB and Grafana
@@ -413,9 +502,9 @@ Configure influxDB::
 
 Run Grafana::
 
-   sudo -EH docker run -d --name grafana -p 3000:3000 grafana/grafana
+   sudo -EH docker run -d --name grafana -p 1948:3000 grafana/grafana
 
-Log on http://{YOUR_IP_HERE}:3000 using ``admin``/``admin`` and configure
+Log on http://{YOUR_IP_HERE}:1948 using ``admin``/``admin`` and configure
 database resource to be ``{YOUR_IP_HERE}:8086``.
 
 .. image:: images/Grafana_config.png