X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=deploy%2Fkud%2Fkud_bm_launch.sh;h=7fa0c256bebd8c63bd8d906154c4e77f5cc33af9;hb=c3ca1c962a355e4e17e5ebd4067716bbea39e6bb;hp=2d0aea6dee9411d7409637757c76ea49c68ce75a;hpb=71cde293d4753a07a5da01f410a7c3f94b600ace;p=icn.git diff --git a/deploy/kud/kud_bm_launch.sh b/deploy/kud/kud_bm_launch.sh index 2d0aea6..7fa0c25 100755 --- a/deploy/kud/kud_bm_launch.sh +++ b/deploy/kud/kud_bm_launch.sh @@ -1,10 +1,12 @@ -#!/bin/bash -set +x +#!/usr/bin/env bash +set -eu -o pipefail LIBDIR="$(dirname "$(dirname "$PWD")")" source $LIBDIR/env/lib/common.sh +export KUBESPRAY_VERSION=2.14.1 + function get_kud_repo { if [ -d $DOWNLOAD_PATH/multicloud-k8s ]; then rm -rf $DOWNLOAD_PATH/multicloud-k8s @@ -13,7 +15,8 @@ function get_kud_repo { mkdir -p $DOWNLOAD_PATH pushd $DOWNLOAD_PATH if [ "$1" == "v1" ] ; then - git clone --branch v1.0-icn https://github.com/akraino-icn/multicloud-k8s.git + export KUD_ADDONS=multus + git clone https://github.com/onap/multicloud-k8s.git else git clone https://github.com/onap/multicloud-k8s.git fi @@ -37,7 +40,7 @@ function set_bm_kud { pushd $DOWNLOAD_PATH/multicloud-k8s/kud/hosting_providers/vagrant/inventory HOST_IP=${HOST_IP:-$(hostname -I | cut -d ' ' -f 1)} if [ "$1" == "minimal" ] ; then - cat < hosts.ini + cat < hosts.ini [all] $HOSTNAME ansible_ssh_host=${HOST_IP} ansible_ssh_port=22 @@ -55,7 +58,7 @@ kube-node kube-master EOL else - cat < hosts.ini + cat < hosts.ini [all] $HOSTNAME ansible_ssh_host=${HOST_IP} ansible_ssh_port=22 @@ -107,12 +110,11 @@ function kud_install { function kud_reset { pushd $DOWNLOAD_PATH/multicloud-k8s/kud/hosting_providers/vagrant/ - ansible-playbook -i inventory/hosts.ini /opt/kubespray-2.10.4/reset.yml \ + ansible-playbook -i inventory/hosts.ini /opt/kubespray-${KUBESPRAY_VERSION}/reset.yml \ --become --become-user=root -e reset_confirmation=yes popd } - function verifier { APISERVER=$(kubectl config view --minify -o \ jsonpath='{.clusters[0].cluster.server}')