forked from DataReply/devBox_CDH
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
38 lines (31 loc) · 994 Bytes
/
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
$hosts_script = <<SCRIPT
cat > /etc/hosts <<EOF
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
EOF
SCRIPT
Vagrant.configure("2") do |config|
# Define base image
config.vm.box = "ubuntu/trusty64"
# Manage /etc/hosts on host and VMs
config.hostmanager.enabled = false
config.hostmanager.manage_host = true
config.hostmanager.include_offline = true
config.hostmanager.ignore_private_ip = false
config.vm.define :master do |master|
master.vm.provider :virtualbox do |v|
v.name = "databox"
v.customize ["modifyvm", :id, "--memory", "4096"]
end
master.vm.network :private_network, ip: "10.0.10.11"
master.vm.hostname = "databox"
master.vm.provision :shell, :inline => $hosts_script
master.vm.provision :hostmanager
master.vm.synced_folder "docker/", "/opt/docker"
end
end