-
Notifications
You must be signed in to change notification settings - Fork 8
/
deploy.sh
executable file
·48 lines (41 loc) · 1.63 KB
/
deploy.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
usage="--------------------------------------------------------------------------
This is the file to put it all together.
Usage:
deploy.sh [-h] [-d deployment-name]
Options:
-h : display this message and exit
-d : name of GCP gcloud deployment, AWS stack, and Azure resource group. This will make them all have the same name [required]
-u : username that you will use to login to the VMs
-k : location of the private ssh key that you will use to ssh into the various VMs
-p : install the first DC and then setup the config for the other DCs?
--------------------------------------------------------------------------"
while getopts 'hd:u:k:p' opt; do
case $opt in
h) echo -e "$usage"
exit 0
;;
d) deploy="$OPTARG"
;;
u) username="$OPTARG"
;;
k) key="$OPTARG"
;;
p) phased=true
;;
\?) echo "Invalid option -$OPTARG" >&2
exit 1
;;
esac
done
echo "Provisioning the VMs..."
# this kicks off the iaas piece: deploys VMs on all of the clouds and makes a list of the IP addresses
./iaas/deploy_multiple.sh -d $deploy &&
# check to see if phased install is requested, if so, then incorporate it and kickoff setup.py
echo "Installing DataStax OpsCenter and then setting up the cluster. A new browser tab will open to the installation job when it is ready. Please be patient. "
if [ "$phased" = true ] ; then
python setup.py -u $username -s $deploy -k $key -n $deploy -p
else
python setup.py -u $username -s $deploy -k $key -n $deploy
fi
#remove the server-list file that was created for the deployment
# rm -rf $deploy