Code Review
/
icn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Remove bpa_op_e2e_virtletvm target and deps
[icn.git]
/
deploy
/
kud
/
kud_bm_launch.sh
diff --git
a/deploy/kud/kud_bm_launch.sh
b/deploy/kud/kud_bm_launch.sh
index
c19b0bd
..
d4b72fc
100755
(executable)
--- 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
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
function get_kud_repo {
if [ -d $DOWNLOAD_PATH/multicloud-k8s ]; then
rm -rf $DOWNLOAD_PATH/multicloud-k8s
@@
-12,7
+14,12
@@
function get_kud_repo {
mkdir -p $DOWNLOAD_PATH
pushd $DOWNLOAD_PATH
mkdir -p $DOWNLOAD_PATH
pushd $DOWNLOAD_PATH
- git clone https://github.com/onap/multicloud-k8s.git
+ if [ "$1" == "v1" ] ; then
+ export KUD_ADDONS=multus
+ git clone https://github.com/onap/multicloud-k8s.git
+ else
+ git clone https://github.com/onap/multicloud-k8s.git
+ fi
popd
}
popd
}
@@
-33,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
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 <<EOL > hosts.ini
+
cat <<EOL > hosts.ini
[all]
$HOSTNAME ansible_ssh_host=${HOST_IP} ansible_ssh_port=22
[all]
$HOSTNAME ansible_ssh_host=${HOST_IP} ansible_ssh_port=22
@@
-51,7
+58,7
@@
kube-node
kube-master
EOL
else
kube-master
EOL
else
- cat <<EOL > hosts.ini
+
cat <<EOL > hosts.ini
[all]
$HOSTNAME ansible_ssh_host=${HOST_IP} ansible_ssh_port=22
[all]
$HOSTNAME ansible_ssh_host=${HOST_IP} ansible_ssh_port=22
@@
-89,22
+96,22
@@
function kud_install {
./installer.sh | tee kud_deploy.log
if [ "$1" == "bm" ]; then
./installer.sh | tee kud_deploy.log
if [ "$1" == "bm" ]; then
- pushd $DOWNLOAD_PATH/multicloud-k8s/kud/tests/
- sleep 15
- bash sriov.sh
- popd
+ for addon in ${KUD_ADDONS:-multus ovn4nfv nfd sriov qat cmk optane}; do
+ pushd $DOWNLOAD_PATH/multicloud-k8s/kud/tests/
+ bash ${addon}.sh
+ popd
+ done
fi
popd
}
function kud_reset {
pushd $DOWNLOAD_PATH/multicloud-k8s/kud/hosting_providers/vagrant/
fi
popd
}
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
}
--become --become-user=root -e reset_confirmation=yes
popd
}
-
function verifier {
APISERVER=$(kubectl config view --minify -o \
jsonpath='{.clusters[0].cluster.server}')
function verifier {
APISERVER=$(kubectl config view --minify -o \
jsonpath='{.clusters[0].cluster.server}')
@@
-120,7
+127,7
@@
if [ "$1" == "reset" ] ; then
exit 0
fi
exit 0
fi
-get_kud_repo
+get_kud_repo
$2
set_ssh_key
set_bm_kud $1
kud_install $1
set_ssh_key
set_bm_kud $1
kud_install $1