forked from newmediadenver/drupal-lamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
70 lines (55 loc) · 2.46 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'json'
=begin
You can use a specific provider with vagrant's provider flag like so:
vagrant up --provider=vmware_fusion
vagrant up --provider=virtualbox
In order to use the vmware_fusion provider you will need to have a licensed
copy of vmware fusion installed. You will also need to purchase a vagrant
vmware seat http://www.vagrantup.com/vmware
Virtualbox and Vmware each have different base boxes that can be automatically
downloaded by uncommenting the appropriate server.vm.box_url line below. You
can read more regarding base boxes at a wiki page you can help correct and
keep up to date:
https://github.com/cyberswat/drupal-lamp/wiki/Vagrant-Base-Boxes
=end
data = JSON.parse(File.read("infrastructure/drupal_lamp.json"))
Vagrant.configure("2") do |config|
# for Vagrant-provided nfs support
#config.nfs.map_uid = 0
#config.nfs.map_gid = 0
config.omnibus.chef_version = :latest
config.berkshelf.enabled = true
config.berkshelf.berksfile_path = File.dirname(__FILE__) + "/Berksfile"
config.vm.define :drupaldev do |server|
server.ssh.forward_agent = true
server.vm.box = "precise64"
#server.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-fusion503.box"
server.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210.box"
server.vm.provider "vmware_fusion" do |v|
v.vmx["memsize"] = "1024"
end
server.vm.provider :virtualbox do |v|
v.name = "drupal"
v.customize ["modifyvm", :id, "--memory", "1024"]
end
server.vm.hostname = "drupal.local"
server.vm.network :private_network, ip: "192.168.50.5"
# For Vagrant-provided synced folders
# Ensure the second parameter (/assets) is the same as the Default['drupal']['server']['assets']
# destination in your drupal_lamp.json file
#server.vm.synced_folder "assets", "/assets", :nfs => false, :owner => "www-data", :group => "www-data"
# For Vagrant-provided nfs support
# Ensure the second parameter (/assets) is the same as the Default['drupal']['server']['assets']
# destination in your drupal_lamp.json file
#server.vm.synced_folder "assets", "/assets", :nfs => true
server.vm.provision :chef_solo do |chef|
chef.log_level = :info
chef.roles_path = "chef/roles"
chef.data_bags_path = "chef/data_bags"
chef.add_role("drupal_lamp")
chef.json = data
end
end
end