-
Notifications
You must be signed in to change notification settings - Fork 3
/
Vagrantfile
105 lines (87 loc) · 2.83 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# -*- mode: ruby -*-
# vi: set ft=ruby :
required_vagrant_version = '1.2.0'
if Vagrant::VERSION < required_vagrant_version
puts <<-EOF
You need at least version #{required_vagrant_version} of Vagrant to use this
project. Get it at http://downloads.vagrantup.com
EOF
exit 1
end
Vagrant.configure("2") do |config|
#config.vm.network :public_network
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "forwarded_port", guest: 443, host: 4443
config.vm.network "forwarded_port", guest: 8000, host: 8000
# we want latest chef version available
config.omnibus.chef_version = :latest
# enable berkshelf integration
config.berkshelf.enabled = true
#
config.vm.box = "chef/ubuntu-12.04"
# Let's use vagrant-cachier to speed things up
# if Vagrant.has_plugin?("vagrant-cachier")
# config.cache.scope = :box
# config.cache.synced_folder_opts = {
# type: :nfs
# }
# end
# we want an automatic shared & synced folder
config.vm.synced_folder "shared", "/srv/airtime/stor/shared",
owner: "root", group: "www-data"
config.vm.provider "vmware_fusion" do |vmware, override|
vmware.vmx["memsize"] = "1024"
vmware.vmx["numvcpus"] = "2"
end
config.vm.provider "virtualbox" do |vb, override|
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
# This is the default, regular airtime profile
config.vm.define "airtime", primary: true do |config|
config.vm.hostname = "airtime-vm"
config.vm.provision :shell, :inline => "apt-get update"
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ['cookbooks', 'site-cookbooks']
chef.data_bags_path = "data_bags"
chef.roles_path = "roles"
chef.add_role 'base'
chef.add_role 'web'
chef.add_role 'db'
chef.add_role 'icecast'
chef.add_role 'rabbitmq'
chef.add_role 'airtime'
chef.custom_config_path = "Vagrantfile.chef"
chef.json = {
'postgresql' => {
'password' => {
'postgres' => 'uberpassword'
}
}
}
end
end
# This is the undocumented ultrasecret phauneradio profile
config.vm.define "phauneradio" do |config|
config.vm.hostname = "phauneradio-vm"
config.vm.provision :shell, :inline => "apt-get update"
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ['cookbooks', 'site-cookbooks']
chef.data_bags_path = "data_bags"
chef.roles_path = "roles"
chef.add_role 'base'
chef.add_role 'web'
chef.add_role 'db'
chef.add_role 'icecast'
chef.add_role 'rabbitmq'
chef.add_role 'airtime'
chef.add_recipe 'phauneradio'
chef.json = {
'postgresql' => {
'password' => {
'postgres' => 'uberpassword'
}
}
}
end
end
end