-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathknownetseed.sh
More file actions
67 lines (62 loc) · 1.47 KB
/
knownetseed.sh
File metadata and controls
67 lines (62 loc) · 1.47 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
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
exit_msg=" Sorry! Something went wrong. Please Delete the Stack and Try Again. "
divider_line="--------------------------------------------------------------------------"
echo
export KUBECONFIG=kubeconfig
echo $divider_line
echo " Deploying KnowEnG pods "
echo $divider_line
sleep 2
kubectl apply -f https://raw.githubusercontent.com/prkriz/knowkubedev/master/nest.prod.yaml
if [ $? -eq 0 ]
then
echo
echo " Success-- KnowEnG Pods Deployed "
sleep 2
echo
else
echo $exit_msg
exit
fi
echo $divider_line
echo " Exposing Load Balancer "
echo $divider_line
sleep 2
kubectl expose --namespace=default deployment nest --type=LoadBalancer --port=80 --target-port=80 --name=nest-public-lb
if [ $? -eq 0 ]
then
echo
sleep 2
echo " Success-- Load Balancer Exposed "
sleep 2
echo
else
echo $exit_msg
exit
fi
echo $divider_line
echo " Getting things Ready | Takes about 20 mins. Go play with your cat :) "
echo $divider_line
i=20; while [ $i -gt 0 ]; do echo $i minute\(s\) remaining; i=`expr $i - 1`; sleep 60; done
echo " Success-- KnowEnG Platform is almost ready "
sleep 2
echo
echo $divider_line
echo " Printing Load Balancer "
echo $divider_line
sleep 2
kubectl --namespace=default describe service nest-public-lb | grep "LoadBalancer Ingress"
if [ $? -eq 0 ]
then
echo
echo " Use the lb URL "
sleep 2
echo
else
echo $exit_msg
exit
fi
echo $divider_line
echo " Congratulations-- KnowEnG Platform IS READY TO ROLL. Thank You for your patience."
echo $divider_line
echo