Merge "Testcase to find storage bottlenecks using Yardstick for Multistack"
[yardstick.git] / yardstick / resources / scripts / remove / storperf.bash
1 #!/bin/bash
2
3 ##############################################################################
4 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
11
12 # StorPerf plugin un-installation script
13
14 set -e
15
16 export TAG=${DOCKER_TAG:-latest}
17 export ENV_FILE=~/storperf_admin-rc
18 export CARBON_DIR=~/carbon
19
20 rm -rf "${CARBON_DIR}"
21
22 docker-compose down
23
24 for container_name in storperf swagger-ui http-front-end
25 do
26     container=$(docker ps -a -q -f name=$container_name)
27     if [[ ! -z $container ]]
28     then
29         echo "Stopping any existing $container_name container"
30         docker rm -fv $container
31     fi
32 done