aboutsummaryrefslogtreecommitdiffstats
path: root/vagrant/installer.sh
diff options
context:
space:
mode:
Diffstat (limited to 'vagrant/installer.sh')
-rwxr-xr-xvagrant/installer.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/vagrant/installer.sh b/vagrant/installer.sh
index b621afaa..860f63d6 100755
--- a/vagrant/installer.sh
+++ b/vagrant/installer.sh
@@ -158,7 +158,7 @@ function install_plugin {
pushd $GOPATH/src/k8-plugin-multicloud/deployments
./build.sh
- if [[ "${testing_enabled}" = "true" ]]; then
+ if [[ "${testing_enabled}" == "true" ]]; then
docker-compose up -d
pushd $krd_tests
for functional_test in plugin plugin_edgex; do
@@ -187,6 +187,16 @@ function _print_kubernetes_info {
echo "Admin password: secret" >> $k8s_info_file
}
+if ! sudo -n "true"; then
+ echo ""
+ echo "passwordless sudo is needed for '$(id -nu)' user."
+ echo "Please fix your /etc/sudoers file. You likely want an"
+ echo "entry like the following one..."
+ echo ""
+ echo "$(id -nu) ALL=(ALL) NOPASSWD: ALL"
+ exit 1
+fi
+
if [[ -n "${KRD_DEBUG}" ]]; then
set -o xtrace
verbose="-vvv"
@@ -200,7 +210,7 @@ krd_inventory=$krd_inventory_folder/hosts.ini
krd_playbooks=$krd_folder/playbooks
krd_tests=$krd_folder/tests
k8s_info_file=$krd_folder/k8s_info.log
-testing_enabled=${KRD_ENABLE_TESTS:-true}
+testing_enabled=${KRD_ENABLE_TESTS:-false}
mkdir -p $log_folder
mkdir -p /opt/csar
@@ -216,7 +226,7 @@ fi
apt-get update
install_k8s
install_addons
-if [[ "${KRD_PLUGIN_ENABLED:-true}" ]]; then
+if [[ "${KRD_PLUGIN_ENABLED:-false}" ]]; then
install_plugin
fi
_print_kubernetes_info