Skip to content

Commit

Permalink
Merge pull request #64 from galexrt/fix_63
Browse files Browse the repository at this point in the history
vagrant: remove pre variables file
  • Loading branch information
galexrt authored Apr 1, 2020
2 parents bb8e265 + 479f412 commit 63e8ef3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 27 deletions.
3 changes: 0 additions & 3 deletions vagrantfiles/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ VAGRANT_DEFAULT_PROVIDER = ENV['VAGRANT_DEFAULT_PROVIDER'] || 'virtualbox'.freez
# Vagrantfile OS set to use
BOX_OS = ENV['BOX_OS'] || 'fedora'.freeze

$osprefile = File.expand_path("../#{BOX_OS}/pre", __FILE__)
load $osprefile if File.exist?($osprefile)

# Load the Vagrantfile_vars file
$vagrantfilecommon = File.expand_path('../Vagrantfile_vars', __FILE__)
load $vagrantfilecommon
Expand Down
2 changes: 1 addition & 1 deletion vagrantfiles/Vagrantfile_vars
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ $storagecontroller = 'k8svmSATAController'
$storagecontrollerneedstobecreated = true

# Common scripts
$osPrepareScript = ""
$osPrepareScript = "echo OS PREPARE SCRIPT EMPTY."

$prepareScript = <<SCRIPT
set -x
Expand Down
24 changes: 24 additions & 0 deletions vagrantfiles/ubuntu/common
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ if $kubernetes_pkg_version_suffix == ''
$kubernetes_pkg_version_suffix = '-00'
end

$osPrepareScript = <<SCRIPT
set -x

sed -i 's/^DNS=.*/DNS=8.8.8.8 8.8.4.4/' /etc/systemd/resolved.conf

sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
sudo update-alternatives --set arptables /usr/sbin/arptables-legacy
sudo update-alternatives --set ebtables /usr/sbin/ebtables-legacy

retries=5
for ((i=1; i<=retries; i++)); do
apt-get update
apt-get -y install apt-transport-https curl software-properties-common ca-certificates && \
break

[[ $retries -eq i ]] && { echo "Failed to install apt-transport-https and other dependenices after 5 tries"; exit 1; }
done
SCRIPT

$docker_version = '5:18.09.1~3-0~ubuntu-bionic'

$containerRuntimeInstallScript = <<SCRIPT
Expand All @@ -24,3 +44,7 @@ for ((i=1; i<=retries; i++)); do
[[ $retries -eq i ]] && { echo "Failed to install docker-ce after 5 tries"; exit 1; }
done
SCRIPT

$kubeletExtraArgsFile = '/etc/default/kubelet'

$kube_network = 'canal'
23 changes: 0 additions & 23 deletions vagrantfiles/ubuntu/pre

This file was deleted.

0 comments on commit 63e8ef3

Please sign in to comment.