forked from viki-org/storm-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdestroy-storm.sh
executable file
·44 lines (41 loc) · 931 Bytes
/
destroy-storm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# Used to stop running storm-docker Docker containers.
#
# To stop every storm-docker Docker container, don't supply any args:
#
# ./destroy-storm.sh
#
# To stop the `nimbus` and `ui` containers:
#
# ./destroy-storm.sh nimbus ui
function stop_storm_docker {
docker stop $1; docker rm $1
}
if [ $# -eq 0 ]
then
stop_storm_docker ui
stop_storm_docker supervisor
stop_storm_docker nimbus
stop_storm_docker zk_ambassador
stop_storm_docker zookeeper
else
for component in "$@"
do
case $component in
zookeeper-with-ambassador)
stop_storm_docker zk_ambassador
stop_storm_docker zookeeper
;;
nimbus-with-zookeeper-ambassador)
stop_storm_docker nimbus
stop_storm_docker zk_ambassador
;;
ui-on-zk-ambassador-machine)
stop_storm_docker ui
;;
*)
stop_storm_docker $component
;;
esac
done
fi