aboutsummaryrefslogtreecommitdiffstats
path: root/integration/storperf/storperf_docker.sh
diff options
context:
space:
mode:
authorzhihui wu <wu.zhihui1@zte.com.cn>2017-07-25 17:37:39 +0800
committerzhihui wu <wu.zhihui1@zte.com.cn>2017-08-01 14:42:17 +0800
commit35c45d5c524bf83375fab7b9483835d43b69a5a6 (patch)
tree11f74bf28dfcf0653ba3fb36539e83dc9c03e905 /integration/storperf/storperf_docker.sh
parent04cbea6945c165b9c192729e5b8b58433128d5cb (diff)
run storperf test by using these scripts
Local test with apex is OK. JIRA:QTIP-248 Change-Id: I47c55ddd88f9722ce83b73a4d7ec91ece2aab2ed Signed-off-by: zhihui wu <wu.zhihui1@zte.com.cn>
Diffstat (limited to 'integration/storperf/storperf_docker.sh')
-rwxr-xr-xintegration/storperf/storperf_docker.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/integration/storperf/storperf_docker.sh b/integration/storperf/storperf_docker.sh
new file mode 100755
index 00000000..629a4edb
--- /dev/null
+++ b/integration/storperf/storperf_docker.sh
@@ -0,0 +1,35 @@
+#! /bin/bash
+##############################################################################
+# Copyright (c) 2017 ZTE and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+clean_storperf_container()
+{
+ docker-compose -f storperf-docker-compose.yaml down
+
+ for container_name in storperf storperf-master storperf-swaggerui storperf-httpfrontend storperf-reporting
+ do
+ container=`docker ps -a -q -f name=$container_name`
+ if [[ ! -z $container ]];then
+ echo "Stopping any existing $container_name container"
+ docker rm -fv $container
+ fi
+ done
+}
+
+
+launch_storperf_container()
+{
+ docker-compose -f storperf-docker-compose.yaml up -d
+
+ echo "Waiting for StorPerf to become active"
+
+ while [ $(curl -s -o /dev/null -I -w "%{http_code}" -X GET http://127.0.0.1:5000/api/v1.0/configurations) != "200" ]
+ do
+ sleep 1
+ done
+} \ No newline at end of file