Add the way to deploy InfluxDB and Grafana locally to userguide 07/18907/2
authorrexlee8776 <limingjiang@huawei.com>
Thu, 18 Aug 2016 06:31:39 +0000 (06:31 +0000)
committerrexlee8776 <limingjiang@huawei.com>
Thu, 18 Aug 2016 07:22:28 +0000 (07:22 +0000)
Change-Id: I6bd87391025afd2cc1d38025445264949f38d5a6
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
docs/userguide/03-installation.rst
docs/userguide/images/Grafana_config.png [new file with mode: 0644]

index a3144ef..25c1258 100644 (file)
@@ -251,3 +251,71 @@ More info about the tool can be found by executing:
 ::
 
   yardstick-plot -h
+
+
+Deploy InfluxDB and Grafana locally
+------------------------------------
+
+.. pull docker images
+
+Pull docker images
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+::
+
+  docker pull tutum/influxdb
+  docker pull grafana/grafana
+
+Run influxdb and config
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Run influxdb
+::
+
+  docker run -d --name influxdb -p 8083:8083 -p 8086:8086 --expose 8090 --expose 8099 tutum/influxdb
+  docker exec -it influxdb bash
+
+Config influxdb
+::
+
+  influx
+  >CREATE USER root WITH PASSWORD 'root' WITH ALL PRIVILEGES
+  >CREATE DATABASE yardstick;
+  >use yardstick;
+  >show MEASUREMENTS;
+
+Run grafana and config
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Run grafana
+::
+
+  docker run -d --name grafana -p 3000:3000 grafana/grafana
+
+Config grafana
+::
+
+  http://{YOUR_IP_HERE}:3000
+  log on using admin/admin and config database resource to be {YOUR_IP_HERE}:8086
+
+.. image:: images/Grafana_config.png
+
+Config yardstick conf
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+cp ./etc/yardstick/yardstick.conf.sample /etc/yardstick/yardstick.conf
+
+vi /etc/yardstick/yardstick.conf
+Config yardstick.conf
+::
+
+  [DEFAULT]
+  debug = True
+  dispatcher = influxdb
+
+  [dispatcher_influxdb]
+  timeout = 5
+  target = http://{YOUR_IP_HERE}:8086
+  db_name = yardstick
+  username = root
+  password = root
+
+Now you can run yardstick test case and store the results in influxdb
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/docs/userguide/images/Grafana_config.png b/docs/userguide/images/Grafana_config.png
new file mode 100644 (file)
index 0000000..cb63098
Binary files /dev/null and b/docs/userguide/images/Grafana_config.png differ