aboutsummaryrefslogtreecommitdiffstats
path: root/vagrant
diff options
context:
space:
mode:
Diffstat (limited to 'vagrant')
-rwxr-xr-xvagrant/installer.sh2
-rwxr-xr-xvagrant/node.sh34
-rw-r--r--vagrant/playbooks/krd-vars.yml2
3 files changed, 32 insertions, 6 deletions
diff --git a/vagrant/installer.sh b/vagrant/installer.sh
index dd5b77b6..65c649e1 100755
--- a/vagrant/installer.sh
+++ b/vagrant/installer.sh
@@ -140,7 +140,7 @@ function install_k8s {
# Configure environment
mkdir -p $HOME/.kube
- mv $HOME/admin.conf $HOME/.kube/config
+ mv $krd_inventory_folder/artifacts/admin.conf $HOME/.kube/config
}
# install_addons() - Install Kubenertes AddOns
diff --git a/vagrant/node.sh b/vagrant/node.sh
index 5edc3a3c..3bf704b1 100755
--- a/vagrant/node.sh
+++ b/vagrant/node.sh
@@ -53,7 +53,33 @@ if [[ -n "${dict_volumes+x}" ]]; then
mount_external_partition ${kv%=*} ${kv#*=}
done
fi
-rmmod kvm-intel
-echo 'options kvm-intel nested=y' >> /etc/modprobe.d/dist.conf
-modprobe kvm-intel
-grep -q -i ^Y$ /sys/module/kvm_intel/parameters/nested || { echo "Nested virtualization is not enabled"; exit 1; }
+
+vendor_id=$(lscpu|grep "Vendor ID")
+if [[ $vendor_id == *GenuineIntel* ]]; then
+ kvm_ok=$(cat /sys/module/kvm_intel/parameters/nested)
+ if [[ $kvm_ok == 'N' ]]; then
+ echo "Enable Intel Nested-Virtualization"
+ rmmod kvm-intel
+ echo 'options kvm-intel nested=y' >> /etc/modprobe.d/dist.conf
+ modprobe kvm-intel
+ fi
+else
+ kvm_ok=$(cat /sys/module/kvm_amd/parameters/nested)
+ if [[ $kvm_ok == '0' ]]; then
+ echo "Enable AMD Nested-Virtualization"
+ rmmod kvm-amd
+ sh -c "echo 'options kvm-amd nested=1' >> /etc/modprobe.d/dist.conf"
+ modprobe kvm-amd
+ fi
+fi
+source /etc/os-release || source /usr/lib/os-release
+case ${ID,,} in
+ *suse)
+ ;;
+ ubuntu|debian)
+ apt-get install -y cpu-checker
+ kvm-ok
+ ;;
+ rhel|centos|fedora)
+ ;;
+esac
diff --git a/vagrant/playbooks/krd-vars.yml b/vagrant/playbooks/krd-vars.yml
index 89aa21db..b259e08d 100644
--- a/vagrant/playbooks/krd-vars.yml
+++ b/vagrant/playbooks/krd-vars.yml
@@ -47,4 +47,4 @@ nfd_version: 175305b1ad73be7301ac94add475cec6fef797a9
nfd_url: "https://github.com/kubernetes-incubator/node-feature-discovery"
go_version: 1.10.3
-kubespray_version: 2.6.0
+kubespray_version: 2.7.0