2015-02-22 03:49:04 +00:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
2015-03-18 08:34:33 +00:00
|
|
|
require_relative 'vagrant_rancheros_guest_plugin.rb'
|
|
|
|
|
2015-03-09 19:09:29 +00:00
|
|
|
# To enable rsync folder share change to false
|
|
|
|
$rsync_folder_disabled = true
|
2015-03-18 08:34:33 +00:00
|
|
|
$number_of_nodes = 1
|
|
|
|
$vm_mem = "1024"
|
|
|
|
$vb_gui = false
|
2015-03-09 19:09:29 +00:00
|
|
|
|
|
|
|
|
2015-02-22 03:49:04 +00:00
|
|
|
# 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|
|
2015-03-18 08:34:33 +00:00
|
|
|
config.vm.box = "rancherio/rancheros"
|
2015-07-03 08:28:48 +00:00
|
|
|
config.vm.box_version = ">=0.3.3"
|
2015-03-18 08:34:33 +00:00
|
|
|
|
|
|
|
(1..$number_of_nodes).each do |i|
|
|
|
|
hostname = "rancher-%02d" % i
|
2015-02-22 03:49:04 +00:00
|
|
|
|
2015-03-18 08:34:33 +00:00
|
|
|
config.vm.define hostname do |node|
|
|
|
|
node.vm.provider "virtualbox" do |vb|
|
|
|
|
vb.memory = $vm_mem
|
|
|
|
vb.gui = $vb_gui
|
|
|
|
end
|
2015-03-09 19:09:29 +00:00
|
|
|
|
2015-03-18 08:34:33 +00:00
|
|
|
ip = "172.19.8.#{i+100}"
|
|
|
|
node.vm.network "private_network", ip: ip
|
|
|
|
|
|
|
|
# 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
|
2015-02-22 03:49:04 +00:00
|
|
|
end
|