9 if [ ${rc} != 0 ]; then
10 echo "[ERR] Failure detected - ${comment}. Aborting !"
16 # Should be removed while private dockers (maven build) will be available:
17 echo "[INFO] ONAP Docker login"
18 sudo docker login -u docker -p docker nexus3.onap.org:10001
19 check_status $? "Onap docker registry login"
21 # Verify the kube-system pods are running:
22 # kube-addon-manager, kube-dns, kubernetes-dashboard, storage-provisioner, tiller-deploy
23 echo "[INFO] Wait for Kubernetes Service ..."
26 while [ ${status} -ne 5 ]
28 status=$(sudo kubectl get pods --namespace kube-system -o json \
31 | select(.status.phase == "Running" and
32 ([ .status.conditions[] | select(.type == "Ready" and .status == "True") ]
34 | .metadata.namespace + "/" + .metadata.name
41 echo "[INFO] Check Namespace existence"
42 exist_namespace=$( sudo kubectl get namespaces | grep onap-sdc | grep Active | wc -l )
43 if [ ${exist_namespace} -eq 0 ]; then
44 sudo kubectl create namespace onap-sdc
45 check_status $? "Create namespace"
48 echo "[INFO] Running helm init"
50 check_status $? "Helm init"
54 printf "[INFO] Wait for helm to get ready\n"
56 while [ ${helm_health} -ne 0 ]
58 sudo helm version | grep "Server" >/dev/null 2>&1
63 # Remove previous chart
64 exist_chart=$( sudo helm ls onap-sdc -q | wc -l )
65 if [ ${exist_chart} -ne 0 ];then
66 echo "[INFO] Delete the existing onap-sdc chart"
67 sudo helm del --purge onap-sdc
68 check_status $? "Delete chart"
71 # Install updated chart
72 echo "[INFO] Create onap-sdc deployment"
73 sudo helm install sdc --name onap-sdc
74 check_status $? "Install chart"