aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/resources
diff options
context:
space:
mode:
authorJingLu5 <lvjing5@huawei.com>2017-07-05 03:49:32 +0000
committerJingLu5 <lvjing5@huawei.com>2017-07-07 01:32:12 +0000
commit3ef4228a89aeb6b3814f0b5ef89c75acfa7f382d (patch)
tree14c58fc44e1f25fa6350acab2cc9822db4ab1771 /yardstick/resources
parentffe83c920736716f0caea36dceeff7b7e910db7c (diff)
Yardstick install storperf update
JIRA: YARDSTICK-702 Sicnce StorPerf has switched to use docker-compose to start container suite. The way Yardstick install storperf should also be updated. Change-Id: Idee05703b8ae5cd03bc214f598f56c8ac05ca755 Signed-off-by: JingLu5 <lvjing5@huawei.com>
Diffstat (limited to 'yardstick/resources')
-rw-r--r--yardstick/resources/scripts/install/storperf.bash27
-rw-r--r--yardstick/resources/scripts/remove/storperf.bash20
2 files changed, 32 insertions, 15 deletions
diff --git a/yardstick/resources/scripts/install/storperf.bash b/yardstick/resources/scripts/install/storperf.bash
index 9d20a5a8a..4974bacb1 100644
--- a/yardstick/resources/scripts/install/storperf.bash
+++ b/yardstick/resources/scripts/install/storperf.bash
@@ -12,20 +12,25 @@
# StorPerf plugin installation script
# After installation, it will run StorPerf container on Jump Host
# Requirements:
-# 1. docker has been installed on the Jump Host
-# 2. Openstack environment file for storperf, '~/storperf_admin-rc', is ready.
+# 1. docker and docker-compose have been installed on the Jump Host
+# 2. Openstack environment file for storperf, '~/storperf_admin-rc', is ready
+# 3. Jump Host must have internet connectivity for downloading docker image
+# 4. Jump Host has access to the OpenStack Controller API
+# 5. Enough OpenStack floating IPs must be available to match your agent count
+# 6. The following ports are exposed if you use the supplied docker-compose.yaml file:
+# * 5000 for StorPerf ReST API and Swagger UI
+# * 8000 for StorPerf's Graphite Web Server
set -e
-mkdir -p /tmp/storperf-yardstick
+WWW_DATA_UID=33
+WWW_DATA_GID=33
-docker pull opnfv/storperf
+export TAG=${DOCKER_TAG:-latest}
+export ENV_FILE=~/storperf_admin-rc
+export CARBON_DIR=~/carbon
-STORPERF_DIR=/tmp/storperf-yardstick/carbon
-docker run -t \
---env-file ~/storperf_admin-rc \
--p 5000:5000 -p 8000:8000 \
--v $STORPERF_DIR:/opt/graphite/storage/whisper \
---name storperf-yardstick opnfv/storperf &
+sudo install --owner=${WWW_DATA_UID} --group=${WWW_DATA_GID} -d "${CARBON_DIR}"
-chown www-data:www-data $STORPERF_DIR
+docker-compose -f ~/docker-compose.yaml pull
+docker-compose -f ~/docker-compose.yaml up -d
diff --git a/yardstick/resources/scripts/remove/storperf.bash b/yardstick/resources/scripts/remove/storperf.bash
index a8eb51c89..b241d1893 100644
--- a/yardstick/resources/scripts/remove/storperf.bash
+++ b/yardstick/resources/scripts/remove/storperf.bash
@@ -13,8 +13,20 @@
set -e
-docker stop storperf-yardstick
-docker rm -f storperf-yardstick
-docker rmi opnfv/storperf
+export TAG=${DOCKER_TAG:-latest}
+export ENV_FILE=~/storperf_admin-rc
+export CARBON_DIR=~/carbon
-rm -rf /tmp/storperf-yardstick
+rm -rf "${CARBON_DIR}"
+
+docker-compose down
+
+for container_name in storperf swagger-ui http-front-end
+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