-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
67 lines (52 loc) · 1.52 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
# Load config from htdocs
#
require 'yaml'
current_dir = File.dirname(File.expand_path(__FILE__))
file = File.read("#{current_dir}/htdocs/vagrant_config.json")
project_config = JSON.parse(file)
#
# Vagrant setup
#
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.hostname = project_config['name'] + ".dev"
config.vm.network "private_network", ip: "10.0.0.3"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "4096"]
vb.customize ["modifyvm", :id, "--cpus", 4]
end
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder "htdocs", "/var/www",
type: "rsync",
group: "www-data",
rsync__args: ["--verbose", "--archive", "--delete", "-z", "--perms", "--chmod=Dg+s,Dg+rwx"],
rsync__exclude: [
".git/",
".idea/",
".DS_Store",
"Configuration/PackageStates.php",
"Configuration/Production/" + project_config['nameClean'],
"Configuration/Development/" + project_config['nameClean'],
"Configuration/Testing/Behat",
"Data/Sessions/**",
"Data/Temporary/**",
"Data/Persistent/**",
"Data/Surf/**",
"Data/Logs/**",
"Web/_Resources/Persistent",
"Web/_Resources/Static"
]
config.ssh.forward_agent = true
config.omnibus.chef_version = :latest
config.vm.provision "chef_solo" do |chef|
chef.roles_path = "roles"
chef.cookbooks_path = ["site-cookbooks", "cookbooks"]
chef.add_role "webserver"
chef.json = {
"project" => project_config
}
end
end