From c175a0de2f05d37c1c774684318a525eb96bb59b Mon Sep 17 00:00:00 2001 From: Avi Ziv Date: Thu, 15 Mar 2018 13:21:44 +0200 Subject: Create on boarding docker Add BE and Cassandra init docker images Change-Id: Id9d767c73fc946819cec821b4634ce650cbb22fd Issue-ID: SDC-781 Signed-off-by: Michael Lando --- sdc-os-chef/scripts/k8s/bin_nsenter | Bin 0 -> 90162 bytes .../scripts/k8s/etc/bash_completion.d/nsenter | 63 --------------------- sdc-os-chef/scripts/k8s/etc_nsenter | 63 +++++++++++++++++++++ sdc-os-chef/scripts/k8s/kubernetes_run.sh | 23 +++++++- 4 files changed, 84 insertions(+), 65 deletions(-) create mode 100755 sdc-os-chef/scripts/k8s/bin_nsenter delete mode 100644 sdc-os-chef/scripts/k8s/etc/bash_completion.d/nsenter create mode 100644 sdc-os-chef/scripts/k8s/etc_nsenter (limited to 'sdc-os-chef/scripts/k8s') diff --git a/sdc-os-chef/scripts/k8s/bin_nsenter b/sdc-os-chef/scripts/k8s/bin_nsenter new file mode 100755 index 0000000000..9137f71456 Binary files /dev/null and b/sdc-os-chef/scripts/k8s/bin_nsenter differ diff --git a/sdc-os-chef/scripts/k8s/etc/bash_completion.d/nsenter b/sdc-os-chef/scripts/k8s/etc/bash_completion.d/nsenter deleted file mode 100644 index ad56f06e48..0000000000 --- a/sdc-os-chef/scripts/k8s/etc/bash_completion.d/nsenter +++ /dev/null @@ -1,63 +0,0 @@ -_nsenter_module() -{ - local cur prev OPTS - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[COMP_CWORD-1]}" - case $prev in - '-S'|'--uid') - COMPREPLY=( $(compgen -W "uid" -- $cur) ) - return 0 - ;; - '-G'|'--gid') - COMPREPLY=( $(compgen -W "gid" -- $cur) ) - return 0 - ;; - '-t'|'--target') - local PIDS - PIDS=$(cd /proc && echo [0-9]*) - COMPREPLY=( $(compgen -W "$PIDS" -- $cur) ) - return 0 - ;; - '-h'|'--help'|'-V'|'--version') - return 0 - ;; - esac - case $cur in - '=') - # FIXME: --root and --wd should use get only - # directories as compgen output. If $cur is - # overwrote the same way as below in case segment - # for $prev the command-line will get mangled. - cur=${cur#=} - ;; - -*) - OPTS=" - --all - --target - --mount= - --uts= - --ipc= - --net= - --pid= - --cgroup= - --user= - --setuid - --setgid - --preserve-credentials - --root= - --wd= - --no-fork - --help - --version - " - COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) - return 0 - ;; - esac - local IFS=$'\n' - compopt -o filenames - COMPREPLY=( $(compgen -f -- $cur) ) - return 0 -} -complete -F _nsenter_module nsenter diff --git a/sdc-os-chef/scripts/k8s/etc_nsenter b/sdc-os-chef/scripts/k8s/etc_nsenter new file mode 100644 index 0000000000..ad56f06e48 --- /dev/null +++ b/sdc-os-chef/scripts/k8s/etc_nsenter @@ -0,0 +1,63 @@ +_nsenter_module() +{ + local cur prev OPTS + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + case $prev in + '-S'|'--uid') + COMPREPLY=( $(compgen -W "uid" -- $cur) ) + return 0 + ;; + '-G'|'--gid') + COMPREPLY=( $(compgen -W "gid" -- $cur) ) + return 0 + ;; + '-t'|'--target') + local PIDS + PIDS=$(cd /proc && echo [0-9]*) + COMPREPLY=( $(compgen -W "$PIDS" -- $cur) ) + return 0 + ;; + '-h'|'--help'|'-V'|'--version') + return 0 + ;; + esac + case $cur in + '=') + # FIXME: --root and --wd should use get only + # directories as compgen output. If $cur is + # overwrote the same way as below in case segment + # for $prev the command-line will get mangled. + cur=${cur#=} + ;; + -*) + OPTS=" + --all + --target + --mount= + --uts= + --ipc= + --net= + --pid= + --cgroup= + --user= + --setuid + --setgid + --preserve-credentials + --root= + --wd= + --no-fork + --help + --version + " + COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) + return 0 + ;; + esac + local IFS=$'\n' + compopt -o filenames + COMPREPLY=( $(compgen -f -- $cur) ) + return 0 +} +complete -F _nsenter_module nsenter diff --git a/sdc-os-chef/scripts/k8s/kubernetes_run.sh b/sdc-os-chef/scripts/k8s/kubernetes_run.sh index fd9de2e181..7a73c2af3b 100644 --- a/sdc-os-chef/scripts/k8s/kubernetes_run.sh +++ b/sdc-os-chef/scripts/k8s/kubernetes_run.sh @@ -52,8 +52,18 @@ status $? 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 +if [ -f bin_nsenter ]; then + sudo cp bin_nsenter /usr/local/bin/nsenter +else + echo "[ERROR] File [bin_nsenter] is missing" +fi + +if [ -f etc_nsenter ]; then + sudo cp etc_nsenter /etc/bash_completion.d/nsenter +else + echo "[ERROR] File [etc_nsenter] is missing" +fi + ## In order to build the nsenter use the below instructions: ##./build_nsenter_exec.sh @@ -75,3 +85,12 @@ print_header "SDC - Deploy Pods ..." sh ./deploy_k8s_sdc.sh status $? + +#################### +# SDC LOGS Tree # +#################### +print_header "SDC - Deploy Pods ..." +mkdir -p /dockerdata-nfs/onap/sdc/logs//BE/SDC/SDC-BE +mkdir -p /dockerdata-nfs/onap/sdc/logs/FE/SDC/SDC-FE +mkdir -p /dockerdata-nfs/onap/sdc/logs/ONBOARD/SDC/ONBOARD-BE +chmod -R 777 /dockerdata-nfs/onap/sdc/logs/* -- cgit 1.2.3-korg