diff options
author | Georg Kunz <georg.kunz@est.tech> | 2020-08-11 10:15:19 +0200 |
---|---|---|
committer | Rihab Banday <rihab.banday@ericsson.com> | 2020-08-26 16:05:37 +0000 |
commit | 2f205c075e3c7178c16798e60be30f6cc485ec24 (patch) | |
tree | 2b14a380aaf4ff7b008bd55ec100332d61bfc28a | |
parent | 2b634f4bfb502d826074e718298ae94b8de2749c (diff) |
Always copy configuration data inside jump VM
This helps to pick up changes between redeploys.
Signed-off-by: Georg Kunz <georg.kunz@est.tech>
Signed-off-by: Victor Morales <v.morales@samsung.com>
Change-Id: I4a1b23ad4187f63cbb2b638f62fb463ed2b37af5
Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/70706
Reviewed-by: Victor Morales <chipahuac@hotmail.com>
Reviewed-by: Rihab Banday <rihab.banday@ericsson.com>
Tested-by: Rihab Banday <rihab.banday@ericsson.com>
-rwxr-xr-x | functions.sh | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/functions.sh b/functions.sh index 7d867cd..d246ace 100755 --- a/functions.sh +++ b/functions.sh @@ -141,26 +141,24 @@ provision_k8s() { # shellcheck disable=SC2087 ssh -o StrictHostKeyChecking=no -tT "$USERNAME"@"$(get_vm_ip)" << EOF # Install BMRA -if [ ! -d "${PROJECT_ROOT}/container-experience-kits" ]; then +if ! command -v docker; then curl -fsSL https://get.docker.com/ | sh printf "Waiting for docker service..." until sudo docker info; do printf "." sleep 2 done - git clone https://github.com/intel/container-experience-kits.git - cd ${PROJECT_ROOT}/container-experience-kits - git checkout v1.4.1 - git submodule update --init - cp -r examples/group_vars examples/host_vars . - cp ${PROJECT_ROOT}/${INSTALLER}/inventory.ini \ +fi +if [ ! -d "${PROJECT_ROOT}/container-experience-kits" ]; then + git clone --recurse-submodules --depth 1 https://github.com/intel/container-experience-kits.git -b v1.4.1 ${PROJECT_ROOT}/container-experience-kits/ + cp -r ${PROJECT_ROOT}/container-experience-kits/examples/group_vars examples/host_vars ${PROJECT_ROOT}/container-experience-kits/ +fi +cp ${PROJECT_ROOT}/${INSTALLER}/inventory.ini \ ${PROJECT_ROOT}/container-experience-kits/ - cp ${PROJECT_ROOT}/${INSTALLER}/all.yml \ +cp ${PROJECT_ROOT}/${INSTALLER}/all.yml \ ${PROJECT_ROOT}/container-experience-kits/group_vars/ - cp ${PROJECT_ROOT}/${INSTALLER}/node1.yml \ +cp ${PROJECT_ROOT}/${INSTALLER}/node1.yml \ ${PROJECT_ROOT}/container-experience-kits/host_vars/ -fi -sudo service docker start sudo docker run --rm \ -v ${PROJECT_ROOT}/container-experience-kits:/bmra \ -v ~/.ssh/:/root/.ssh/ rihabbanday/bmra-install:centos \ |