aboutsummaryrefslogtreecommitdiffstats
path: root/kud/hosting_providers/containerized
diff options
context:
space:
mode:
authorr.kuralamudhan <kuralamudhan.ramakrishnan@intel.com>2019-11-06 22:57:58 -0800
committerr.kuralamudhan <kuralamudhan.ramakrishnan@intel.com>2019-11-07 08:40:41 -0800
commit30842bd0cdc017f1098bfe716d7f5576a0514eff (patch)
treede73920a67e412512365c135b17c0d702482eba7 /kud/hosting_providers/containerized
parent5839289be6a6f3a1441d73bd9e8a8ee4bf1dc1a3 (diff)
Optimizing the plugin option in containerized installer
Issue-ID: MULTICLOUD-919 Signed-off-by: r.kuralamudhan <kuralamudhan.ramakrishnan@intel.com> Change-Id: I6850c2673b1d5e8e7ccc9d036a0a68fa896aa3ab
Diffstat (limited to 'kud/hosting_providers/containerized')
-rw-r--r--kud/hosting_providers/containerized/README.md2
-rwxr-xr-xkud/hosting_providers/containerized/installer.sh21
2 files changed, 14 insertions, 9 deletions
diff --git a/kud/hosting_providers/containerized/README.md b/kud/hosting_providers/containerized/README.md
index 4119ca78..d1659629 100644
--- a/kud/hosting_providers/containerized/README.md
+++ b/kud/hosting_providers/containerized/README.md
@@ -100,7 +100,7 @@ spec:
- name: secret-volume
mountPath: "/.ssh"
command: ["/bin/sh","-c"]
- args: ["cp -r /.ssh /root/; chmod -R 600 /root/.ssh; ./installer --cluster $CLUSTER_NAME"]
+ args: ["cp -r /.ssh /root/; chmod -R 600 /root/.ssh; ./installer --cluster $CLUSTER_NAME --plugins onap4k8s"]
securityContext:
privileged: true
volumes:
diff --git a/kud/hosting_providers/containerized/installer.sh b/kud/hosting_providers/containerized/installer.sh
index 60bc6c3a..ad44dc56 100755
--- a/kud/hosting_providers/containerized/installer.sh
+++ b/kud/hosting_providers/containerized/installer.sh
@@ -20,7 +20,7 @@ function install_prerequisites {
apt-get update
apt-get install -y curl vim wget git \
software-properties-common python-pip
- add-apt-repository ppa:longsleep/golang-backports
+ add-apt-repository -y ppa:longsleep/golang-backports
apt-get update
apt-get install -y golang-go rsync
}
@@ -101,7 +101,7 @@ function install_k8s {
# install_addons() - Install Kubenertes AddOns
function install_addons {
if [ ${1:+1} ]; then
- local plugins_name=$1
+ local plugins_name="$1"
echo "additional addons plugins $1"
else
local plugins_name=""
@@ -116,17 +116,22 @@ function install_addons {
ansible-playbook $verbose -i \
$kud_inventory $kud_playbooks/configure-kud.yml | \
tee $cluster_log/setup-kud.log
- for addon in ${KUD_ADDONS:-virtlet ovn4nfv nfd $plugins_name}; do
+ for addon in ${KUD_ADDONS:-virtlet ovn4nfv nfd sriov $plugins_name}; do
echo "Deploying $addon using configure-$addon.yml playbook.."
ansible-playbook $verbose -i \
$kud_inventory $kud_playbooks/configure-${addon}.yml | \
tee $cluster_log/setup-${addon}.log
- if [[ "${testing_enabled}" == "true" ]]; then
+ done
+
+ echo "Run the test cases if testing_enabled is set to true."
+ if [[ "${testing_enabled}" == "true" ]]; then
+ for addon in ${KUD_ADDONS:-virtlet ovn4nfv nfd sriov $plugins_name}; do
pushd $kud_tests
bash ${addon}.sh
popd
- fi
- done
+ done
+ fi
+ echo "Add-ons deployment complete..."
}
# install_plugin() - Install ONAP Multicloud Kubernetes plugin
@@ -198,7 +203,7 @@ function install_cluster {
install_k8s $1
if [ ${2:+1} ]; then
echo "install default addons and $2"
- install_addons $2
+ install_addons "$2"
else
install_addons
fi
@@ -275,7 +280,7 @@ if [ "$1" == "--cluster" ]; then
exit 1
fi
plugins_name=${@:4:$#}
- install_cluster $cluster_name $plugins_name
+ install_cluster $cluster_name "$plugins_name"
exit 0
else
echo "Error: cluster argument should have plugins; \