-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployer.sh
executable file
·100 lines (73 loc) · 1.8 KB
/
deployer.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script run fabric-cluster-deployer project, which can deploy fabric cluster to ssh containers from scratch.
OPTIONS:
--all Creating fabric from scratch. Downloading and running fuse etc.
--fuse prepare fuse, that means download it, unzip and run
--fabric create fabric
--ensemble initialize ensemble from containers.conf file
--containers initialize containers from containers.conf file
--clean kill all containers and remove resources
EOF
}
if [[ $# -eq 0 ]] ; then
usage
exit 0
fi
#while getopts “-help:h:u:p:b” OPTION
#do
# case $OPTION in
# -help)
# usage
# exit 1
# ;;
# h)
# HOST="-Dssh.url="$OPTARG
# ;;
# u)
# USER="-Dssh.user="$OPTARG
# ;;
# p)
# PASSWD="-Dssh.password="$OPTARG
# ;;
#
# b) BUILD="-Dssh.password="$OPTARG
# ;;
#
#
# esac
#done
for var in "$@"
do
if [ $var == "--all" ]
then
all="--all"
elif [ $var == "--fuse" ]
then
fuse="--fuse"
elif [ $var == "--fabric" ]
then
fabric="--fabric"
elif [ $var == "--ensemble" ]
then
ensemble="--ensemble"
elif [ $var == "--containers" ]
then
containers="--containers"
elif [ $var == "--clean" ]
then
clean="--clean"
elif [ $var == "--clone" ]
then
clone="--clone"
elif [ $var == "--add-container" ]
then
add="--add-container "$2
else
usage
fi
done
mvn exec:java -Dexec.args="$all $clean $fuse $fabric $ensemble $containers $clone $add"