-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
77 lines (66 loc) · 2.34 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
71
72
73
74
75
76
77
Vagrant.configure("2") do |config|
# The path to the Berksfile to use with Vagrant Berkshelf
config.berkshelf.enabled = true
config.berkshelf.berksfile_path = "./Berksfile"
# An array of symbols representing groups of cookbook described in the Vagrantfile
# to skip installing and copying to Vagrant's shelf.
# config.berkshelf.only = []
# An array of symbols representing groups of cookbook described in the Vagrantfile
# to skip installing and copying to Vagrant's shelf.
# config.berkshelf.except = []
config.vm.box = "squeeze"
config.vm.box_url = "https://s3.amazonaws.com/wa.milton.aws.bucket01/sqeeze.box"
config.vm.network :private_network, ip: "10.33.36.10"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", 2048]
end
config.ssh.max_tries = 40
config.ssh.timeout = 120
config.omnibus.chef_version = :latest
# Forward a port from the guest to the host, which allows for outside
# computers to access the VM, whereas host only networking does not.
# config.vm.network :forwared_port, guest: 80, host: 8080,
# auto_correct: true
# config.vm.network :forwared_port, guest: 22, host: 2201,
# auto_correct: true
project = 'dana-training'
# config.vm.hostname = "promet-#{project}"
config.vm.synced_folder ".", "/var/drupals/#{project}", :nfs => true
config.vm.provision :chef_solo do |chef|
chef.json = {
:mysql => {
:server_root_password => 'rootpass',
:server_debian_password => 'debpass',
:server_repl_password => 'replpass',
:tunable => {
:max_allowed_packet => '512M'
}
},
:apache => {
:prefork => {
:startservers => 5,
:minspareservers => 5,
:maxspareservers => 5,
:serverlimit => 10,
:maxclients => 10
}
},
:drupal => {
:sites => {
"#{project}.dev" => {
:root => "/var/drupals/#{project}",
:doc_root => "/var/drupals/#{project}/www",
:db => "#{project}DB",
:db_username => "#{project}DBA",
:db_password => "#{project}PASS",
:db_init => true
}
}
}
}
chef.add_recipe "solo-helper"
chef.add_recipe "drupal::default"
chef.add_recipe "drupal::node_sites"
chef.add_recipe "drupal::drush"
end
end