forked from rancher/os-vagrant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
43 lines (34 loc) · 1.38 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# -*- 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 = 1
$vm_mem = "2048"
$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.4.1"
(1..$number_of_nodes).each do |i|
hostname = "rancher-%02d" % i
config.vm.define hostname do |node|
node.vm.provider "virtualbox" do |vb|
vb.memory = $vm_mem
vb.gui = $vb_gui
end
ip = "172.19.8.#{i+100}"
node.vm.network "private_network", ip: ip
node.vm.hostname = hostname
node.vm.network :forwarded_port, guest: 8080, host: 8080
# 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