Areli Fuss | 471a2970 | 2018-02-01 13:09:07 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | #################### |
| 4 | # Functions # |
| 5 | #################### |
| 6 | |
| 7 | status() |
| 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 | |
| 18 | print_header() |
| 19 | { |
| 20 | header=$* |
| 21 | echo "" |
| 22 | echo "-------------------------" |
| 23 | echo " ${header}" |
| 24 | echo "-------------------------" |
| 25 | echo "" |
| 26 | } |
| 27 | |
| 28 | #################### |
| 29 | # Main # |
| 30 | #################### |
| 31 | clear |
| 32 | |
| 33 | #################### |
| 34 | # kubectl # |
| 35 | #################### |
| 36 | print_header "Kubelet - Install ..." |
| 37 | sh ./install_kubectl.sh |
| 38 | status $? |
| 39 | |
| 40 | |
| 41 | #################### |
| 42 | # minikube # |
| 43 | #################### |
| 44 | print_header "Minikube - Install ..." |
| 45 | sh ./install_minikube.sh |
| 46 | status $? |
| 47 | |
| 48 | |
| 49 | #################### |
| 50 | # dependencies # |
| 51 | #################### |
| 52 | print_header "Dependency - Install ..." |
| 53 | echo "[INFO] Install - nsenter" |
| 54 | # Use pre compiled nsenter: |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 55 | if [ -f bin_nsenter ]; then |
| 56 | sudo cp bin_nsenter /usr/local/bin/nsenter |
| 57 | else |
| 58 | echo "[ERROR] File [bin_nsenter] is missing" |
| 59 | fi |
| 60 | |
| 61 | if [ -f etc_nsenter ]; then |
| 62 | sudo cp etc_nsenter /etc/bash_completion.d/nsenter |
| 63 | else |
| 64 | echo "[ERROR] File [etc_nsenter] is missing" |
| 65 | fi |
| 66 | |
Areli Fuss | 471a2970 | 2018-02-01 13:09:07 +0200 | [diff] [blame] | 67 | |
| 68 | ## In order to build the nsenter use the below instructions: |
| 69 | ##./build_nsenter_exec.sh |
| 70 | echo "[INFO] Install - socat" |
Pratik Raj | 3490973 | 2020-08-23 23:52:52 +0530 | [diff] [blame^] | 71 | sudo apt-get install -y -qq --no-install-recommends socat jq |
Areli Fuss | 471a2970 | 2018-02-01 13:09:07 +0200 | [diff] [blame] | 72 | |
| 73 | #################### |
| 74 | # helm # |
| 75 | #################### |
| 76 | print_header "Helm - Install ..." |
| 77 | sh ./install_helm.sh |
| 78 | status $? "$action" |
| 79 | |
| 80 | |
| 81 | #################### |
| 82 | # K8s # |
| 83 | #################### |
| 84 | print_header "SDC - Deploy Pods ..." |
| 85 | sh ./deploy_k8s_sdc.sh |
| 86 | status $? |
| 87 | |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 88 | |
| 89 | #################### |
| 90 | # SDC LOGS Tree # |
| 91 | #################### |
| 92 | print_header "SDC - Deploy Pods ..." |
Areli, Fuss (af732p) | c033cdc | 2018-04-24 13:59:00 +0300 | [diff] [blame] | 93 | sudo mkdir -p /dockerdata-nfs/onap/sdc/logs//BE/SDC/SDC-BE |
| 94 | sudo mkdir -p /dockerdata-nfs/onap/sdc/logs/FE/SDC/SDC-FE |
| 95 | sudo mkdir -p /dockerdata-nfs/onap/sdc/logs/ONBOARD/SDC/ONBOARD-BE |
kooper | b087a8b | 2019-04-04 14:03:36 +0000 | [diff] [blame] | 96 | sudo mkdir -p /dockerdata-nfs/onap/sdc/cert |
Areli, Fuss (af732p) | c033cdc | 2018-04-24 13:59:00 +0300 | [diff] [blame] | 97 | sudo chmod -R 777 /dockerdata-nfs/onap/sdc/logs/* |