aboutsummaryrefslogtreecommitdiffstats
path: root/kud/hosting_providers
diff options
context:
space:
mode:
authorRitu Sood <ritu.sood@intel.com>2021-05-07 00:51:48 +0000
committerGerrit Code Review <gerrit@onap.org>2021-05-07 00:51:48 +0000
commit76ca3e628144931a657bab39dd175f6fe3c26e47 (patch)
tree8a7d8ff9ff8f48d36802931278f2a52bf272340c /kud/hosting_providers
parentc7f358b2420eae7852167ce18706196e4fafa864 (diff)
parent1e343febbbd958143ad29e4feb4a31baca01e981 (diff)
Merge "Replace emco with openness-21.03 release"
Diffstat (limited to 'kud/hosting_providers')
-rwxr-xr-xkud/hosting_providers/containerized/installer.sh11
-rwxr-xr-xkud/hosting_providers/vagrant/installer.sh4
2 files changed, 9 insertions, 6 deletions
diff --git a/kud/hosting_providers/containerized/installer.sh b/kud/hosting_providers/containerized/installer.sh
index b2ec52af..eb30a23e 100755
--- a/kud/hosting_providers/containerized/installer.sh
+++ b/kud/hosting_providers/containerized/installer.sh
@@ -90,16 +90,13 @@ function install_k8s {
tee $cluster_log/setup-kubernetes.log
# Configure environment
+ # Requires kubeconfig_localhost and kubectl_localhost to be true
+ # in inventory/group_vars/k8s-cluster.yml
mkdir -p $HOME/.kube
cp $kud_inventory_folder/artifacts/admin.conf $HOME/.kube/config
- # Copy Kubespray kubectl to be usable in host running Ansible.
- # Requires kubectl_localhost: true in inventory/group_vars/k8s-cluster.yml
if !(which kubectl); then
cp $kud_inventory_folder/artifacts/kubectl /usr/local/bin/
fi
-
- cp -rf $kud_inventory_folder/artifacts \
- /opt/kud/multi-cluster/$cluster_name/
}
# install_addons() - Install Kubenertes AddOns
@@ -219,6 +216,10 @@ function install_cluster {
fi
echo "installed the addons"
+ # Copy installation artifacts to be usable in host running Ansible
+ cp -rf $kud_inventory_folder/artifacts \
+ /opt/kud/multi-cluster/$cluster_name/
+
_print_kubernetes_info
}
diff --git a/kud/hosting_providers/vagrant/installer.sh b/kud/hosting_providers/vagrant/installer.sh
index 2a15de33..9be77a1f 100755
--- a/kud/hosting_providers/vagrant/installer.sh
+++ b/kud/hosting_providers/vagrant/installer.sh
@@ -36,6 +36,8 @@ function _install_go {
export PATH=$PATH:/usr/local/go/bin
sudo sed -i "s|^PATH=.*|PATH=\"$PATH\"|" /etc/environment
+ #allow golang to work with sudo
+ sudo sed -i 's|secure_path="\([^"]\+\)"|secure_path="\1:/usr/local/go/bin"|' /etc/sudoers
}
# _install_pip() - Install Python Package Manager
@@ -182,7 +184,6 @@ function install_addons {
# install_plugin() - Install ONAP Multicloud Kubernetes plugin
function install_plugin {
echo "Installing multicloud/k8s plugin"
- _install_go
_install_docker
sudo -E pip install --no-cache-dir docker-compose
@@ -260,6 +261,7 @@ echo "Removing ppa for jonathonf/python-3.6"
sudo ls /etc/apt/sources.list.d/ || true
sudo find /etc/apt/sources.list.d -maxdepth 1 -name '*jonathonf*' -delete || true
sudo apt-get update
+_install_go
install_k8s
_set_environment_file
install_addons