-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathVagrantfile
45 lines (35 loc) · 1.39 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
44
45
# -*- mode: ruby -*-
# # vi: set ft=ruby :
require 'fileutils'
Vagrant.require_version ">= 1.6.0"
CLOUD_CONFIG_PATH = File.join(File.dirname(__FILE__), "user-data")
$num_instances = 3
$update_channel = "alpha"
$enable_serial_logging = false
$vb_gui = false
$vb_memory = 1024
$vb_cpus = 1
Vagrant.configure("2") do |config|
config.vm.box = "coreos-%s" % $update_channel
config.vm.box_version = ">= 308.0.1"
config.vm.box_url = "http://%s.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json" % $update_channel
config.vm.provider :virtualbox do |v|
v.check_guest_additions = false
v.functional_vboxsf = false
end
(1..$num_instances).each do |i|
config.vm.define vm_name = "coreos-intro-%02d" % i do |machine|
machine.vm.hostname = vm_name
machine.vm.network :private_network, ip: "172.17.8.#{i + 100}"
machine.vm.synced_folder ".", "/home/core/share", id: "core", :nfs => true, :mount_options => ['nolock,vers=3,udp']
machine.vm.provider :virtualbox do |vb|
vb.gui = $vb_gui
vb.memory = $vb_memory
vb.cpus = $vb_cpus
end
machine.vm.provision :file, :source => "#{CLOUD_CONFIG_PATH}", :destination => "/tmp/vagrantfile-user-data"
machine.vm.provision :shell, :inline => "mv /tmp/vagrantfile-user-data /var/lib/coreos-vagrant/", :privileged => true
machine.ssh.forward_agent = true
end
end
end