Merge "remove previous pod suite yamls to avoid confusion"
authorliang gao <jean.gaoliang@huawei.com>
Fri, 19 Aug 2016 13:55:44 +0000 (13:55 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Fri, 19 Aug 2016 13:55:44 +0000 (13:55 +0000)
docs/userguide/03-installation.rst
docs/userguide/images/Grafana_config.png [new file with mode: 0644]
plugin/CI/storperf.yaml
setup.py
tests/ci/docker/yardstick-ci/Dockerfile
tests/ci/prepare_env.sh
tests/ci/scp_storperf_admin-rc.sh [new file with mode: 0644]
tests/ci/yardstick-verify
tests/opnfv/test_cases/opnfv_yardstick_tc002.yaml
tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml
tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-ha_daily.yaml

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
index 4407ddf..65ebe51 100644 (file)
@@ -8,6 +8,6 @@ plugins:
   name: storperf
 
 deployment:
-  ip: local
+  ip: 192.168.200.1
   user: root
   password: root
index 3503738..a2131cf 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -11,6 +11,7 @@ setup(
             'benchmark/scenarios/availability/*.yaml',
             'benchmark/scenarios/availability/attacker/*.yaml',
             'benchmark/scenarios/availability/ha_tools/*.bash',
+            'benchmark/scenarios/availability/ha_tools/*/*.bash',
             'benchmark/scenarios/availability/attacker/scripts/*.bash',
             'benchmark/scenarios/availability/monitor/*.yaml',
             'benchmark/scenarios/availability/monitor/script_tools/*.bash',
index 684f471..da755d1 100644 (file)
@@ -20,6 +20,7 @@ ENV RELENG_REPO_DIR ${REPOS_DIR}/releng
 
 RUN apt-get update && apt-get install -y \
     wget \
+    expect \
     curl \
     git \
     sshpass \
index 35118b1..2c71c7c 100755 (executable)
@@ -56,6 +56,11 @@ export EXTERNAL_NETWORK INSTALLER_TYPE DEPLOY_TYPE NODE_NAME
 # Prepare a admin-rc file for StorPerf integration
 $YARDSTICK_REPO_DIR/tests/ci/prepare_storperf_admin-rc.sh
 
+# copy a admin-rc file for StorPerf integration to the deployment location
+if [ "$NODE_NAME" == "huawei-pod1" ]; then
+    expect $YARDSTICK_REPO_DIR/tests/ci/scp_storperf_admin-rc.sh
+fi
+
 # Fetching id_rsa file from jump_server..."
 verify_connectivity() {
     local ip=$1
diff --git a/tests/ci/scp_storperf_admin-rc.sh b/tests/ci/scp_storperf_admin-rc.sh
new file mode 100644 (file)
index 0000000..fd94aaa
--- /dev/null
@@ -0,0 +1,7 @@
+#!/usr/bin/expect
+set timeout 30
+
+spawn scp -o StrictHostKeyChecking=no /root/storperf_admin-rc root@192.168.200.1:/root/storperf_admin-rc
+expect "root@192.168.200.1's password: "
+send "root\r"
+interact
index bdb9100..7345e0e 100755 (executable)
@@ -133,8 +133,21 @@ install_storperf()
             exit 1
         fi
 
+    fi
+}
+
+remove_storperf()
+{
+    # remove Storper from huawei-pod1
+    if [ "$NODE_NAME" == "huawei-pod1" ]; then
         echo
-        echo "========== Installed storperf container =========="
+        echo "========== Removing storperf =========="
+
+        if ! yardstick -d plugin remove plugin/CI/storperf.yaml; then
+            echo "Remove storperf plugin FAILED";
+            exit 1
+        fi
+
     fi
 }
 
@@ -422,6 +435,7 @@ main()
 
     install_storperf
     run_test
+    remove_storperf
 }
 
 main
index c0cff7d..1942bb5 100644 (file)
@@ -13,7 +13,7 @@ scenarios:
 
   runner:
     type: Duration
-    duration: 600
+    duration: 60
     interval: 10
 
   sla:
index d506ccc..6dda2d4 100644 (file)
@@ -4,7 +4,7 @@
 
 schema: "yardstick:task:0.1"
 {% set public_network = public_network or "ext-net" %}
-{% set StorPerf_ip = StorPerf_ip or "192.168.200.2" %}
+{% set StorPerf_ip = StorPerf_ip or "192.168.200.1" %}
 scenarios:
 -
   type: StorPerf
index 8bf0c65..ebe7a05 100644 (file)
@@ -102,7 +102,7 @@ test_cases:
         pod: huawei-pod1
     task_args:
         huawei-pod1: '{"public_network": "ext-net",
-        "StorPerf_ip": "192.168.200.2"}'
+        "StorPerf_ip": "192.168.200.1"}'
 -
     file_name: opnfv_yardstick_tc075.yaml
     constraint: