Open storperf testcase to huawei-pod2 45/37145/5
authorJingLu5 <lvjing5@huawei.com>
Tue, 11 Jul 2017 02:34:41 +0000 (02:34 +0000)
committerJingLu5 <lvjing5@huawei.com>
Mon, 17 Jul 2017 07:17:58 +0000 (07:17 +0000)
JIRA: YARDSTICK-712

Change-Id: If91c936a3a59580a987cb6762db5d063edf6c9d7
Signed-off-by: JingLu5 <lvjing5@huawei.com>
plugin/CI/storperf.yaml
samples/storperf.yaml
tests/ci/prepare_env.sh
tests/ci/scp_storperf_files.sh
tests/ci/yardstick-verify
tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml
tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-ha_daily.yaml
yardstick/benchmark/core/plugin.py
yardstick/benchmark/scenarios/storage/storperf.py

index e144dd1..70915f6 100644 (file)
@@ -7,7 +7,7 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 ---
-# StorPerf plugin configration file for huawei-pod1
+# StorPerf plugin configration file for compass pod in CI
 # Used for integration StorPerf into Yardstick as a plugin
 
 schema: "yardstick:plugin:0.1"
@@ -16,6 +16,6 @@ plugins:
   name: storperf
 
 deployment:
-  ip: 192.168.10.6
+  ip: local
   user: root
   password: root
index 5000759..2ea0221 100644 (file)
@@ -18,6 +18,7 @@ scenarios:
   options:
     agent_count: 1
     agent_image: "Ubuntu-16.04"
+    agent_flavor: "storperf"
     public_network: "ext-net"
     volume_size: 2
     # target:
index 3d9cc29..c3ee4c7 100755 (executable)
@@ -11,7 +11,7 @@
 # Perepare the environment to run yardstick ci
 
 : ${DEPLOY_TYPE:='bm'} # Can be any of 'bm' (Bare Metal) or 'virt' (Virtual)
-
+: ${INSTALLER_TYPE:='unknown'}
 : ${NODE_NAME:='unknown'}
 : ${EXTERNAL_NETWORK:='admin_floating_net'}
 
@@ -61,9 +61,9 @@ 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
-    bash $YARDSTICK_REPO_DIR/tests/ci/scp_storperf_files.sh
+# copy Storperf related files to the deployment location
+if [ "$INSTALLER_TYPE" == "compass" ]; then
+    source $YARDSTICK_REPO_DIR/tests/ci/scp_storperf_files.sh
 fi
 
 # Fetching id_rsa file from jump_server..."
index 234032c..ffcc710 100644 (file)
 # Copy storperf_admin-rc to deployment location.
 
 ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
+
+case "$NODE_NAME" in
+    "huawei-pod1")
+        JUMP_HOST_IP='192.168.10.6'
+        ;;
+    "huawei-pod2")
+        JUMP_HOST_IP='192.168.11.2'
+        ;;
+    *)
+        # no node name, exit
+        exit 1
+        ;;
+esac
+export JUMP_HOST_IP
+
 sshpass -p root scp 2>/dev/null $ssh_options ~/storperf_admin-rc \
-        root@192.168.10.6:/root/ &> /dev/null
+        root@${JUMP_HOST_IP}:/root/ &> /dev/null
 sshpass -p root scp 2>/dev/null $ssh_options /home/opnfv/repos/storperf/docker-compose/docker-compose.yaml \
-        root@192.168.10.6:/root/ &> /dev/null
+        root@${JUMP_HOST_IP}:/root/ &> /dev/null
 sshpass -p root scp 2>/dev/null $ssh_options /home/opnfv/repos/storperf/docker-compose/nginx.conf \
-        root@192.168.10.6:/root/ &> /dev/null
+        root@${JUMP_HOST_IP}:/root/ &> /dev/null
index 096ea53..751cf65 100755 (executable)
@@ -100,7 +100,7 @@ set -o pipefail
 install_storperf()
 {
     # Install Storper on huawei-pod1
-    if [ "$NODE_NAME" == "huawei-pod1" ]; then
+    if [ "$INSTALLER_TYPE" == "compass" ]; then
         echo
         echo "========== Installing storperf =========="
 
@@ -115,7 +115,7 @@ install_storperf()
 remove_storperf()
 {
     # remove Storper from huawei-pod1
-    if [ "$NODE_NAME" == "huawei-pod1" ]; then
+    if [ "$INSTALLER_TYPE" == "compass" ]; then
         echo
         echo "========== Removing storperf =========="
 
index 5bd3f67..ef4f02c 100644 (file)
@@ -14,13 +14,14 @@ description: >
     StorPerf is a tool to measure block and object storage performance in an NFVI.
 
 {% set public_network = public_network or "ext-net" %}
-{% set StorPerf_ip = StorPerf_ip or "192.168.10.6" %}
+{% set StorPerf_ip = StorPerf_ip or "192.168.200.1" %}
 scenarios:
 -
   type: StorPerf
   options:
     agent_count: 1
     agent_image: "Ubuntu-16.04"
+    agent_flavor: "storperf"
     public_network: {{public_network}}
     volume_size: 4
     block_sizes: "4096"
index ba1a93c..dea44c8 100644 (file)
@@ -134,10 +134,12 @@ test_cases:
     file_name: opnfv_yardstick_tc074.yaml
     constraint:
         installer: compass
-        pod: huawei-pod1
+        pod: huawei-pod1, huawei-pod2
     task_args:
         huawei-pod1: '{"public_network": "ext-net",
-        "StorPerf_ip": "192.168.200.1"}'
+        "StorPerf_ip": "192.168.10.6"}'
+        huawei-pod2: '{"public_network": "ext-net",
+        "StorPerf_ip": "192.168.11.2"}'
 -
     file_name: opnfv_yardstick_tc075.yaml
     constraint:
index 7f67a04..6c06767 100644 (file)
@@ -84,8 +84,8 @@ class Plugin(object):
 
         if deployment_ip == "local":
             self.client = ssh.SSH.from_node(deployment, overrides={
-                # host can't be None, fail if no INSTALLER_IP
-                'ip': os.environ["INSTALLER_IP"],
+                # host can't be None, fail if no JUMP_HOST_IP
+                'ip': os.environ["JUMP_HOST_IP"],
             })
         else:
             self.client = ssh.SSH.from_node(deployment)
index c10118a..f0b2361 100644 (file)
@@ -87,8 +87,9 @@ class StorPerf(base.Scenario):
     def setup(self):
         """Set the configuration."""
         env_args = {}
-        env_args_payload_list = ["agent_count", "public_network",
-                                 "agent_image", "volume_size"]
+        env_args_payload_list = ["agent_count", "agent_flavor",
+                                 "public_network", "agent_image",
+                                 "volume_size"]
 
         for env_argument in env_args_payload_list:
             try:
@@ -206,7 +207,7 @@ class StorPerf(base.Scenario):
         #           terminate_res = requests.delete('http://%s:5000/api/v1.0
         #                                           /jobs' % self.target)
         #       else:
-        #           time.sleep(int(est_time)/2)
+        #           time.sleep(int(esti_time)/2)
 
             result_res = requests.get('http://%s:5000/api/v1.0/jobs?id=%s' %
                                       (self.target, job_id))