forked from kubernetes-retired/bootkube
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathVagrantfile
More file actions
54 lines (41 loc) · 1.58 KB
/
Vagrantfile
File metadata and controls
54 lines (41 loc) · 1.58 KB
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
46
47
48
49
50
51
52
53
54
# -*- mode: ruby -*-
# # vi: set ft=ruby :
require 'fileutils'
require 'open-uri'
require 'tempfile'
require 'yaml'
$update_channel = "stable"
Vagrant.require_version ">= 1.6.0"
NODE_IP = "172.17.4.100"
USER_DATA_PATH = File.expand_path("cluster/user-data")
Vagrant.configure("2") do |config|
# always use Vagrant's insecure key
config.ssh.insert_key = false
config.vm.box = "coreos-%s" % $update_channel
config.vm.box_version = ">= 962.0.0"
config.vm.box_url = "http://%s.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json" % $update_channel
["vmware_fusion", "vmware_workstation"].each do |vmware|
config.vm.provider vmware do |v, override|
v.vmx['numvcpus'] = 1
v.vmx['memsize'] = 2048
v.gui = false
override.vm.box_url = "http://%s.release.core-os.net/amd64-usr/current/coreos_production_vagrant_vmware_fusion.json" % $update_channel
end
end
config.vm.provider :virtualbox do |v|
v.cpus = 1
v.gui = false
v.memory = 2048
# On VirtualBox, we don't have guest additions or a functional vboxsf
# in CoreOS, so tell Vagrant that so it can be smarter.
v.check_guest_additions = false
v.functional_vboxsf = false
end
# plugin conflict
if Vagrant.has_plugin?("vagrant-vbguest") then
config.vbguest.auto_update = false
end
config.vm.network :private_network, ip: NODE_IP
config.vm.provision :file, :source => USER_DATA_PATH, :destination => "/tmp/vagrantfile-user-data"
config.vm.provision :shell, :inline => "mv /tmp/vagrantfile-user-data /var/lib/coreos-vagrant/", :privileged => true
end