-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdeploy
More file actions
executable file
·39 lines (33 loc) · 1019 Bytes
/
deploy
File metadata and controls
executable file
·39 lines (33 loc) · 1019 Bytes
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
#!/bin/bash
azure group create -n "$1" -l "West US"
azure group deployment create -f azuredeploy.json -e azuredeploy.parameters.json $1 boshdeploy > /dev/null 2>&1 &
vmCount=0
printf "Waiting for jumpbox "
while [ $vmCount -lt 1 ]
do
printf "."
vmCount=$(azure vm list -g $1 --json | jq -r "length")
sleep 5
done
printf " done\n"
jumpboxIPCount=0
printf "Waiting for IP Configuration "
while [ $jumpboxIPCount -lt 1 ]
do
printf "."
jumpboxIPCount=$(azure vm list-ip-address -g $1 --json | jq -r ".[0].networkProfile.networkInterfaces[0].expanded.ipConfigurations | length")
sleep 5
done
printf " done\n"
jumpboxIP=$(azure vm list-ip-address -g $1 --json | jq -r ".[0].networkProfile.networkInterfaces[0].expanded.ipConfigurations[0].publicIPAddress.expanded.ipAddress")
portSuccess=1
printf "Waiting for SSH "
while [ $portSuccess -gt 0 ]
do
printf "."
nc -v -z -w2 $jumpboxIP 22 > /dev/null 2>&1
portSuccess=$?
sleep 5
done
printf " done\n"
ssh -oStrictHostKeyChecking=no pivotal@$jumpboxIP