summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/scripts/k8s/deploy_k8s_sdc.sh
diff options
context:
space:
mode:
authorAreli Fuss <af732p@att.com>2018-02-09 00:08:52 +0200
committerMichael Lando <ml636r@att.com>2018-02-15 17:39:55 +0000
commiteeec504fb7251cc282482d505fcf35ae3e7097f2 (patch)
tree6fa62a661f75f13c3d0e1a96b539288a615a5e55 /sdc-os-chef/scripts/k8s/deploy_k8s_sdc.sh
parentc1e4dcf4a8030bbcf04f487fd7a6a910bb5eced1 (diff)
Add K8S deployment above Vagrant
Set deployment manifest files and scripts for deploy SDC over Kubernetes inside Vagrant Preparation for OOM integration Change-Id: If5d6b4131b75eb4795ce8bfd8ec228808938d40e Issue-ID: SDC-907 Signed-off-by: Areli Fuss <af732p@att.com>
Diffstat (limited to 'sdc-os-chef/scripts/k8s/deploy_k8s_sdc.sh')
-rw-r--r--sdc-os-chef/scripts/k8s/deploy_k8s_sdc.sh36
1 files changed, 21 insertions, 15 deletions
diff --git a/sdc-os-chef/scripts/k8s/deploy_k8s_sdc.sh b/sdc-os-chef/scripts/k8s/deploy_k8s_sdc.sh
index 9a7b57747b..83c2950ebc 100644
--- a/sdc-os-chef/scripts/k8s/deploy_k8s_sdc.sh
+++ b/sdc-os-chef/scripts/k8s/deploy_k8s_sdc.sh
@@ -12,6 +12,24 @@ check_status()
fi
}
+check_pods_status()
+{
+ num_of_pods=$1
+ status=0
+ while [ ${status} -ne ${num_of_pods} ]
+ do
+ status=$(sudo kubectl get pods --namespace kube-system -o json \
+ | jq -r '
+ .items[]
+ | select(.status.phase == "Running" and
+ ([ .status.conditions[] | select(.type == "Ready" and .status == "True") ]
+ | length ) == 1 )
+ | .metadata.namespace + "/" + .metadata.name
+ ' \
+ | wc -l )
+ sleep 3
+ done
+}
# Should be removed while private dockers (maven build) will be available:
echo "[INFO] ONAP Docker login"
@@ -22,20 +40,8 @@ check_status $? "Onap docker registry login"
# kube-addon-manager, kube-dns, kubernetes-dashboard, storage-provisioner, tiller-deploy
echo "[INFO] Wait for Kubernetes Service ..."
cd ../../kubernetes
-status=0
-while [ ${status} -ne 5 ]
-do
- status=$(sudo kubectl get pods --namespace kube-system -o json \
- | jq -r '
- .items[]
- | select(.status.phase == "Running" and
- ([ .status.conditions[] | select(.type == "Ready" and .status == "True") ]
- | length ) == 1 )
- | .metadata.namespace + "/" + .metadata.name
- ' \
- | wc -l )
- sleep 3
-done
+
+check_pods_status 4
# Create namespace
echo "[INFO] Check Namespace existence"
@@ -49,7 +55,7 @@ echo "[INFO] Running helm init"
sudo helm init
check_status $? "Helm init"
-set -x
+check_pods_status 5
printf "[INFO] Wait for helm to get ready\n"
helm_health=1