summaryrefslogtreecommitdiffstats
path: root/kud
diff options
context:
space:
mode:
Diffstat (limited to 'kud')
-rw-r--r--kud/deployment_infra/playbooks/configure-onap4k8s.yml8
-rw-r--r--kud/hosting_providers/containerized/README.md2
-rwxr-xr-xkud/hosting_providers/containerized/installer.sh36
-rwxr-xr-xkud/hosting_providers/vagrant/installer.sh23
4 files changed, 48 insertions, 21 deletions
diff --git a/kud/deployment_infra/playbooks/configure-onap4k8s.yml b/kud/deployment_infra/playbooks/configure-onap4k8s.yml
index cacb41c9..11729171 100644
--- a/kud/deployment_infra/playbooks/configure-onap4k8s.yml
+++ b/kud/deployment_infra/playbooks/configure-onap4k8s.yml
@@ -19,6 +19,14 @@
repo: 'https://github.com/onap/multicloud-k8s.git'
dest: /opt/multicloud
+ - name: install make package for ubuntu systems
+ apt: name=make state=present update_cache=yes
+ when: ansible_distribution == "Ubuntu"
+
+ - name: install make package for centos systems
+ yum: name=make state=present update_cache=yes
+ when: ansible_distribution == "CentOS"
+
- name: Change the onap4k8s directory and run the command make repo
command: /usr/bin/make repo
register: make_repo
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 52fe6279..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
}
@@ -100,7 +100,14 @@ function install_k8s {
# install_addons() - Install Kubenertes AddOns
function install_addons {
- local plugins_name=$1
+ if [ ${1:+1} ]; then
+ local plugins_name="$1"
+ echo "additional addons plugins $1"
+ else
+ local plugins_name=""
+ echo "no additional addons pluigns"
+ fi
+
source /etc/environment
echo "Installing Kubernetes AddOns"
ansible-galaxy install $verbose -r \
@@ -109,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
@@ -189,7 +201,13 @@ function install_pkg {
function install_cluster {
install_k8s $1
- install_addons $2
+ if [ ${2:+1} ]; then
+ echo "install default addons and $2"
+ install_addons "$2"
+ else
+ install_addons
+ fi
+
echo "installed the addons"
if ${KUD_PLUGIN_ENABLED:-false}; then
install_plugin
@@ -254,7 +272,7 @@ if [ "$1" == "--cluster" ]; then
cp $kud_multi_cluster_path/$cluster_name/hosts.ini $kud_inventory_folder/
cp -rf $kud_folder/inventory/group_vars $kud_inventory_folder/
- if [ -n "$3" ]; then
+ if [ ${3:+1} ]; then
if [ "$3" == "--plugins" ]; then
if [ -z "${4-}" ]; then
echo "Error: plugins arguments is null; Refer the usage"
@@ -262,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; \
diff --git a/kud/hosting_providers/vagrant/installer.sh b/kud/hosting_providers/vagrant/installer.sh
index 5cc701db..235736e1 100755
--- a/kud/hosting_providers/vagrant/installer.sh
+++ b/kud/hosting_providers/vagrant/installer.sh
@@ -21,6 +21,11 @@ function _install_go {
version=$(grep "go_version" ${kud_playbooks}/kud-vars.yml | awk -F "'" '{print $2}')
local tarball=go$version.linux-amd64.tar.gz
+ #gcc is required for go apps compilation
+ if ! which gcc; then
+ sudo apt-get install -y gcc
+ fi
+
if $(go version &>/dev/null); then
return
fi
@@ -149,23 +154,19 @@ function install_addons {
echo "Installing Kubernetes AddOns"
_install_ansible
sudo ansible-galaxy install $verbose -r $kud_infra_folder/galaxy-requirements.yml --ignore-errors
-
ansible-playbook $verbose -i $kud_inventory $kud_playbooks/configure-kud.yml | sudo tee $log_folder/setup-kud.log
- for addon in ${KUD_ADDONS:-virtlet ovn4nfv nfd}; do
+ for addon in ${KUD_ADDONS:-virtlet ovn4nfv nfd sriov}; do
echo "Deploying $addon using configure-$addon.yml playbook.."
ansible-playbook $verbose -i $kud_inventory $kud_playbooks/configure-${addon}.yml | sudo tee $log_folder/setup-${addon}.log
- if [[ "${testing_enabled}" == "true" ]]; then
- pushd $kud_tests
- bash ${addon}.sh
- popd
- fi
done
- ansible-playbook $verbose -i $kud_inventory $kud_playbooks/configure-sriov.yml | sudo tee $log_folder/setup-sriov.log
- if [[ "${testing_enabled}" == "true" ]]; then
+ 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}; do
pushd $kud_tests
- bash sriov.sh
+ bash ${addon}.sh
popd
- fi
+ done
+ fi
echo "Add-ons deployment complete..."
}