forked from IBM/StorageScaleVagrant
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.sh
More file actions
56 lines (44 loc) · 1.23 KB
/
script.sh
File metadata and controls
56 lines (44 loc) · 1.23 KB
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
#!/usr/bin/bash
usage(){
echo "Usage: $0 [<provider>]"
echo "Supported provider:"
echo " AWS"
echo " Virtualbox"
}
# Improve readability of output
echo "========================================================================================="
echo "===>"
echo "===> Running $0"
echo "===> Perform all steps to provision a Spectrum Scale cluster"
echo "===>"
echo "========================================================================================="
# Print commands and their arguments as they are executed
set -x
# Exit script immediately, if one of the commands returns error code
set -e
# Exit, if not exactly one argument given
if [ $# -ne 1 ]; then
usage
exit -1
fi
# Use first argument as current underlying provider
case $1 in
'AWS'|'VirtualBox' )
PROVIDER=$1
;;
*)
usage
exit -1
;;
esac
# Perform all steps to provision Spectrum Scale Cluster
/vagrant/install/script-01.sh $PROVIDER
/vagrant/install/script-02.sh $PROVIDER
/vagrant/install/script-03.sh $PROVIDER
/vagrant/install/script-04.sh $PROVIDER
/vagrant/install/script-05.sh $PROVIDER
/vagrant/install/script-06.sh $PROVIDER
/vagrant/install/script-07.sh $PROVIDER
# Exit successfully
echo "===> Script completed successfully!"
exit 0