forked from dkdeploy/dkdeploy-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
53 lines (46 loc) · 1.72 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
46
47
48
49
50
51
52
53
unless Vagrant.has_plugin?('vagrant-berkshelf')
puts "Please install vagrant plugin vagrant-berkshelfs first\n"
puts " vagrant plugin install vagrant-berkshelf\n\n"
puts "Exit vagrant\n\n"
abort
end
Vagrant.require_version '~> 2.0.0'
chef_version = '12.9.41'
Vagrant.configure(2) do |config|
domain = 'dkdeploy-core.dev'
ip_address = '192.168.156.180'
# Search boxes at https://atlas.hashicorp.com/search.
config.vm.box = 'ubuntu/trusty64'
config.vm.box_check_update = false
config.berkshelf.enabled = true
config.vm.define('dkdeploy-core', primary: true) do |master_config|
master_config.vm.network 'private_network', ip: ip_address
# Chef settings
master_config.vm.provision :chef_solo do |chef|
chef.install = true
chef.channel = 'stable'
chef.version = chef_version
chef.log_level = :info
chef.add_recipe 'dkdeploy-core'
end
# Memory limit and name of Virtualbox
master_config.vm.provider 'virtualbox' do |virtualbox|
virtualbox.name = domain
virtualbox.gui = ENV['ENABLE_GUI_MODE'] && ENV['ENABLE_GUI_MODE'] =~ /^(true|yes|y|1)$/i
virtualbox.customize [
'modifyvm', :id,
'--natdnsproxy1', 'off',
'--natdnshostresolver1', 'on',
'--memory', '1024'
]
end
end
if Vagrant.has_plugin?('landrush')
config.landrush.enabled = true
config.landrush.guest_redirect_dns = false
config.landrush.tld = 'dev'
config.landrush.host domain, ip_address
else
config.vm.post_up_message = "Either install Vagrant plugin 'landrush' or add this entry to your host file: #{ip_address} #{domain}"
end
end