# -*- mode: ruby -*- # vi: set ft=ruby : require_relative 'vagrant_rancheros_guest_plugin.rb' # To enable rsync folder share change to false $rsync_folder_disabled = true $number_of_nodes = 4 $vm_mem = "1024" $vb_gui = false # All Vagrant configuration is done below. The "2" in Vagrant.configure # configures the configuration version (we support older styles for # backwards compatibility). Please don't change it unless you know what # you're doing. Vagrant.configure(2) do |config| config.vm.box = "rancherio/rancheros" config.vm.box_version = ">=0.3.3" (1..$number_of_nodes).each do |i| hostname = "runner-%02d" % i hostname = "manager" if i == 4 config.vm.define hostname do |node| node.vm.provider "virtualbox" do |vb| vb.memory = $vm_mem vb.memory = "512" if i == 4 vb.gui = $vb_gui end ip = "172.19.8.#{i+100}" node.vm.network "private_network", ip: ip node.vm.hostname = hostname # Disabling compression because OS X has an ancient version of rsync installed. # Add -z or remove rsync__args below if you have a newer version of rsync on your machine. node.vm.synced_folder ".", "/opt/rancher", type: "rsync", rsync__exclude: ".git/", rsync__args: ["--verbose", "--archive", "--delete", "--copy-links"], disabled: $rsync_folder_disabled end end end