-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathremove_cluster.sh
executable file
·35 lines (27 loc) · 1.13 KB
/
remove_cluster.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
# ************************************************************************** #
# #
# remove_cluster.sh #
# #
# By: elhmn <www.elhmn.com> #
# <[email protected]> #
# #
# Created: Sun Aug 26 10:06:36 2018 by elhmn #
# Updated: Sun Aug 26 10:13:58 2018 by bmbarga #
# #
# ************************************************************************** #
#!/bin/sh
# Usage :
# ./script.sh vmName vmCount
vmName=acvm
vmCount=6
if [ ! -z "$2" ]; then
echo "vmCount= $2"
vmCount=$2
fi
if [ ! -z "$1" ]; then
echo "vmName= $1"
vmName=$1
fi
for i in $(seq 1 $vmCount); do
docker-machine ssh $vmName$i docker swarm leave --force
done