summaryrefslogtreecommitdiffstats
path: root/vagrant/Vagrantfile
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2018-12-06 06:17:34 -0800
committerVictor Morales <victor.morales@intel.com>2018-12-07 00:50:18 -0800
commit830141329068683777ffcb0abb36415168c2ac20 (patch)
treeae745f344c07f68d3c3fdcd249489524b92d23bb /vagrant/Vagrantfile
parentf19da653ff0b1e7a45e8ba66c1a8458390566b1b (diff)
Enable downloading binaries and containers
The *download_run_once* kubespray config option allows to download container images only once then push to cluster nodes and the *download_localhost* option makes the installer node a delegate for pushing images while running the deployment with ansible. These two options pretends to reduce the amount of traffic during the deployment time of the Kubernetes cluster. Change-Id: I8239cebbf5c322ed52ae0a0bc8774e5e33aada3c Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: MULTICLOUD-425
Diffstat (limited to 'vagrant/Vagrantfile')
-rw-r--r--vagrant/Vagrantfile14
1 files changed, 10 insertions, 4 deletions
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile
index 8cfa4e04..1b84cb4b 100644
--- a/vagrant/Vagrantfile
+++ b/vagrant/Vagrantfile
@@ -23,7 +23,7 @@ nodes = YAML.load_file(pdf)
# Inventory file creation
File.open(File.dirname(__FILE__) + "/inventory/hosts.ini", "w") do |inventory_file|
- inventory_file.puts("[all:vars]\nansible_connection=ssh\nansible_ssh_user=vagrant\nansible_ssh_pass=vagrant\n\n[all]")
+ inventory_file.puts("[all:vars]\nansible_connection=ssh\nansible_ssh_user=vagrant\n[all]")
nodes.each do |node|
inventory_file.puts("#{node['name']}\tansible_ssh_host=#{node['ip']} ansible_ssh_port=22")
end
@@ -59,6 +59,7 @@ end
Vagrant.configure("2") do |config|
config.vm.box = box[provider][:name]
config.vm.box_version = box[provider][:version]
+ config.ssh.insert_key = false
if ENV['http_proxy'] != nil and ENV['https_proxy'] != nil
if Vagrant.has_plugin?('vagrant-proxyconf')
@@ -114,10 +115,15 @@ Vagrant.configure("2") do |config|
config.vm.define :installer, primary: true, autostart: false do |installer|
installer.vm.hostname = "multicloud"
installer.vm.network :private_network, :ip => "10.10.10.2", :type => :static
- installer.vm.synced_folder '../', '/root/go/src/k8-plugin-multicloud/', type: sync_type
- installer.vm.provision 'shell' do |sh|
+ installer.vm.synced_folder '../', '/home/vagrant/multicloud-k8s/', type: sync_type
+ installer.vm.provision 'shell', privileged: false do |sh|
sh.env = {'KRD_PLUGIN_ENABLED': 'true'}
- sh.path = "main.sh"
+ sh.inline = <<-SHELL
+ cp /vagrant/insecure_keys/key /home/vagrant/.ssh/id_rsa
+ chown vagrant /home/vagrant/.ssh/id_rsa
+ chmod 400 /home/vagrant/.ssh/id_rsa
+ cd /home/vagrant/multicloud-k8s/vagrant/ && ./installer.sh | tee krd_installer.log
+ SHELL
end
end
end