blob: 41797fcdca3a82dc77f4413014e1ba3704f1a51d [file] [log] [blame]
Areli Fuss471a29702018-02-01 13:09:07 +02001#!/bin/bash
2
3####################
4# Functions #
5####################
6
7status()
8{
9 local rc=$1
10 if [ ${rc} != 0 ]; then
11 echo "[ERR] Failure detected. Aborting !"
12 exit 255
13 else
14 echo "[INFO] Done "
15 fi
16}
17
18print_header()
19{
20 header=$*
21 echo ""
22 echo "-------------------------"
23 echo " ${header}"
24 echo "-------------------------"
25 echo ""
26 }
27
28####################
29# Main #
30####################
31clear
32
33####################
34# kubectl #
35####################
36print_header "Kubelet - Install ..."
37sh ./install_kubectl.sh
38status $?
39
40
41####################
42# minikube #
43####################
44print_header "Minikube - Install ..."
45sh ./install_minikube.sh
46status $?
47
48
49####################
50# dependencies #
51####################
52print_header "Dependency - Install ..."
53echo "[INFO] Install - nsenter"
54# Use pre compiled nsenter:
Avi Zivc175a0d2018-03-15 13:21:44 +020055if [ -f bin_nsenter ]; then
56 sudo cp bin_nsenter /usr/local/bin/nsenter
57else
58 echo "[ERROR] File [bin_nsenter] is missing"
59fi
60
61if [ -f etc_nsenter ]; then
62 sudo cp etc_nsenter /etc/bash_completion.d/nsenter
63else
64 echo "[ERROR] File [etc_nsenter] is missing"
65fi
66
Areli Fuss471a29702018-02-01 13:09:07 +020067
68## In order to build the nsenter use the below instructions:
69##./build_nsenter_exec.sh
70echo "[INFO] Install - socat"
71sudo apt-get install -y socat jq
72
73####################
74# helm #
75####################
76print_header "Helm - Install ..."
77sh ./install_helm.sh
78status $? "$action"
79
80
81####################
82# K8s #
83####################
84print_header "SDC - Deploy Pods ..."
85sh ./deploy_k8s_sdc.sh
86status $?
87
Avi Zivc175a0d2018-03-15 13:21:44 +020088
89####################
90# SDC LOGS Tree #
91####################
92print_header "SDC - Deploy Pods ..."
Areli, Fuss (af732p)c033cdc2018-04-24 13:59:00 +030093sudo mkdir -p /dockerdata-nfs/onap/sdc/logs//BE/SDC/SDC-BE
94sudo mkdir -p /dockerdata-nfs/onap/sdc/logs/FE/SDC/SDC-FE
95sudo mkdir -p /dockerdata-nfs/onap/sdc/logs/ONBOARD/SDC/ONBOARD-BE
96sudo chmod -R 777 /dockerdata-nfs/onap/sdc/logs/*