-
Notifications
You must be signed in to change notification settings - Fork 1
/
launch.sh
executable file
·43 lines (32 loc) · 1.08 KB
/
launch.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
#!/usr/bin/env bash
CHART_NAME="${1}"
[[ -z ${CHART_NAME} ]] && { CHART_NAME="xnat-web"; }
echo "Installing current project as Helm chart ${CHART_NAME}"
echo
helm install ${CHART_NAME} .
STATUS="${?}"
[[ ${STATUS} != 0 ]] && {
echo
echo "A non-zero status was returned by the helm install command. This probably means"
echo "the deploy failed. Please check for any error messages and try again."
echo
exit ${STATUS}
}
echo
echo "Install of ${CHART_NAME} complete"
echo
helm list
echo
echo "Full set of pods, services, deployments, and ingresses"
echo
kubectl get pods,services,deployments,ingresses
export NODE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" svc xnat-web)
export NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}")
echo
echo "The ostensible URL is: http://${NODE_IP}:${NODE_PORT}"
echo "In practice, the URL you probably need is: http://localhost:${NODE_PORT}"
echo
echo "You can stop this deployment by running the command:"
echo
echo " $ helm uninstall ${CHART_NAME}"
echo