aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/scripts/k8s/kubernetes_run.sh
diff options
context:
space:
mode:
authorAreli Fuss <af732p@att.com>2018-02-01 13:09:07 +0200
committerMichael Lando <ml636r@att.com>2018-02-06 17:57:29 +0000
commit471a29706bfc3ed50a6c66f96ee6575fc2e3087b (patch)
treecce1286f59676a2f7097cb34146cfa94940d65b4 /sdc-os-chef/scripts/k8s/kubernetes_run.sh
parent00c6ec7d386bd27c7752cf86e4692669e8b850ab (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: I1f54b95067538f42d2d68fa3366b512dc9134f43 Issue-ID: SDC-907 Signed-off-by: Areli Fuss <af732p@att.com>
Diffstat (limited to 'sdc-os-chef/scripts/k8s/kubernetes_run.sh')
-rw-r--r--sdc-os-chef/scripts/k8s/kubernetes_run.sh77
1 files changed, 77 insertions, 0 deletions
diff --git a/sdc-os-chef/scripts/k8s/kubernetes_run.sh b/sdc-os-chef/scripts/k8s/kubernetes_run.sh
new file mode 100644
index 0000000000..fd9de2e181
--- /dev/null
+++ b/sdc-os-chef/scripts/k8s/kubernetes_run.sh
@@ -0,0 +1,77 @@
+#!/bin/bash
+
+####################
+# Functions #
+####################
+
+status()
+{
+ local rc=$1
+ if [ ${rc} != 0 ]; then
+ echo "[ERR] Failure detected. Aborting !"
+ exit 255
+ else
+ echo "[INFO] Done "
+ fi
+}
+
+print_header()
+{
+ header=$*
+ echo ""
+ echo "-------------------------"
+ echo " ${header}"
+ echo "-------------------------"
+ echo ""
+ }
+
+####################
+# Main #
+####################
+clear
+
+####################
+# kubectl #
+####################
+print_header "Kubelet - Install ..."
+sh ./install_kubectl.sh
+status $?
+
+
+####################
+# minikube #
+####################
+print_header "Minikube - Install ..."
+sh ./install_minikube.sh
+status $?
+
+
+####################
+# dependencies #
+####################
+print_header "Dependency - Install ..."
+echo "[INFO] Install - nsenter"
+# Use pre compiled nsenter:
+sudo cp bin/nsenter /usr/local/bin/nsenter
+sudo cp etc/bash_completion.d/nsenter /etc/bash_completion.d/nsenter
+
+## In order to build the nsenter use the below instructions:
+##./build_nsenter_exec.sh
+echo "[INFO] Install - socat"
+sudo apt-get install -y socat jq
+
+####################
+# helm #
+####################
+print_header "Helm - Install ..."
+sh ./install_helm.sh
+status $? "$action"
+
+
+####################
+# K8s #
+####################
+print_header "SDC - Deploy Pods ..."
+sh ./deploy_k8s_sdc.sh
+status $?
+