9 if [ ${rc} != 0 ]; then
10 echo "[ERR] Failure detected - ${comment}. Aborting !"
19 while [ ${status} -ne ${num_of_pods} ]
21 status=$(sudo kubectl get pods --namespace kube-system -o json \
24 | select(.status.phase == "Running" and
25 ([ .status.conditions[] | select(.type == "Ready" and .status == "True") ]
27 | .metadata.namespace + "/" + .metadata.name
34 # Should be removed while private dockers (maven build) will be available:
35 echo "[INFO] ONAP Docker login"
36 sudo docker login -u docker -p docker nexus3.onap.org:10001
37 check_status $? "Onap docker registry login"
39 # Verify the kube-system pods are running:
40 # kube-addon-manager, kube-dns, kubernetes-dashboard, storage-provisioner, tiller-deploy
41 echo "[INFO] Wait for Kubernetes Service ..."
47 echo "[INFO] Check Namespace existence"
48 exist_namespace=$( sudo kubectl get namespaces | grep onap-sdc | grep Active | wc -l )
49 if [ ${exist_namespace} -eq 0 ]; then
50 sudo kubectl create namespace onap-sdc
51 check_status $? "Create namespace"
54 echo "[INFO] Running helm init"
56 check_status $? "Helm init"
60 printf "[INFO] Wait for helm to get ready\n"
62 while [ ${helm_health} -ne 0 ]
64 sudo helm version | grep "Server" >/dev/null 2>&1
69 # Remove previous chart
70 exist_chart=$( sudo helm ls onap-sdc -q | wc -l )
71 if [ ${exist_chart} -ne 0 ];then
72 echo "[INFO] Delete the existing onap-sdc chart"
73 sudo helm del --purge onap-sdc
74 check_status $? "Delete chart"
77 # Install updated chart
78 echo "[INFO] Create onap-sdc deployment"
79 sudo helm install sdc --name onap-sdc
80 check_status $? "Install chart"