-
Notifications
You must be signed in to change notification settings - Fork 14
/
Vagrantfile
160 lines (141 loc) · 5.07 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::configure("2") do |config|
# Operating System
## Ubuntu 13.10 (64-bit)
config.vm.box = "pyro-quantal64"
config.vm.box_url = "https://dl.dropboxusercontent.com/u/37978558/quantal64.box"
# Set the default project share to use nfs
config.vm.synced_folder "./www", "/vagrant/www/", :owner => "www-data", :group => "www-data", :mount_options => ['dmode=775', 'fmode=644']
config.vm.synced_folder "./db", "/vagrant/db/", :owner => "www-data", :group => "www-data", :mount_options => ['dmode=775', 'fmode=644']
# Set the Timezone to something useful
config.vm.provision :shell, :inline => "echo \"Europe/London\" | sudo tee /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata"
# Update the server
config.vm.provision :shell, :inline => "apt-get update --fix-missing"
###
# Creates a basic LAMP stack with MySQL
#
# To launch run: vagrant up mysql
###
config.vm.define :mysql do |mysql_config|
# Map dev.pyrocms.mysql to this IP
config.vm.network :private_network, ip: "198.18.0.201"
# Enable Puppet
mysql_config.vm.provision :puppet do |puppet|
puppet.facter = {
"fqdn" => "dev.pyrocms.mysql",
"hostname" => "www",
"docroot" => '/vagrant/www/pyrocms/'
}
puppet.manifest_file = "ubuntu-apache2-mysql-php5.pp"
puppet.manifests_path = "puppet/manifests"
puppet.module_path = "puppet/modules"
puppet.options = "--hiera_config /vagrant/hiera.yaml"
end
end
###
# Creates a basic LAMP stack with MySQL and Professional
#
# To launch run: vagrant up pro_mysql
###
config.vm.define :pro_mysql do |mysqlp_config|
# Map dev.pyrocms-pro.mysql to this IP
mysqlp_config.vm.network :private_network, ip: "198.18.0.211"
# Enable Puppet
mysqlp_config.vm.provision :puppet do |puppet|
puppet.facter = {
"fqdn" => "dev.pyrocms-pro.mysql",
"hostname" => "www",
"docroot" => '/vagrant/www/pyrocms-pro/'
}
puppet.manifest_file = "ubuntu-apache2-mysql-php5.pp"
puppet.manifests_path = "puppet/manifests"
puppet.module_path = "puppet/modules"
puppet.options = "--hiera_config /vagrant/hiera.yaml"
end
end
###
# Creates an instance with SQLite as the database
#
# To launch run: vagrant up sqlite
###
config.vm.define :sqlite do |sqlite_config|
# Map dev.pyrocms.sqlite to this IP
sqlite_config.vm.network :private_network, ip: "198.18.0.202"
# Enable Puppet
sqlite_config.vm.provision :puppet do |puppet|
puppet.facter = {
"fqdn" => "dev.pyrocms.sqlite",
"hostname" => "www",
"docroot" => '/vagrant/www/pyrocms/'
}
puppet.manifest_file = "ubuntu-apache2-sqlite-php5.pp"
puppet.manifests_path = "puppet/manifests"
puppet.module_path = "puppet/modules"
puppet.options = "--hiera_config /vagrant/hiera.yaml"
end
end
###
# Creates an instance with SQLite as the database and Professional
#
# To launch run: vagrant up pro_sqlite
###
config.vm.define :pro_sqlite do |sqlite_config|
# Map dev.pyrocms.sqlite to this IP
sqlite_config.vm.network :private_network, ip: "198.18.0.212"
# Enable Puppet
sqlite_config.vm.provision :puppet do |puppet|
puppet.facter = {
"fqdn" => "dev.pyrocms-pro.sqlite",
"hostname" => "www",
"docroot" => '/vagrant/www/pyrocms-pro/'
}
puppet.manifest_file = "ubuntu-apache2-sqlite-php5.pp"
puppet.manifests_path = "puppet/manifests"
puppet.module_path = "puppet/modules"
puppet.options = "--hiera_config /vagrant/hiera.yaml"
end
end
###
# Creates an instance using PostgreSQL as the database
#
# To launch run: vagrant up pgsql
###
config.vm.define :pgsql do |pgsql_config|
# Map dev.pyrocms.postgres to this IP
pgsql_config.vm.network :private_network, ip: "198.18.0.203"
# Enable Puppet
pgsql_config.vm.provision :puppet do |puppet|
puppet.facter = {
"fqdn" => "dev.pyrocms.postgres",
"hostname" => "www",
"docroot" => '/vagrant/www/pyrocms/'
}
puppet.manifest_file = "ubuntu-apache2-pgsql-php5.pp"
puppet.manifests_path = "puppet/manifests"
puppet.module_path = "puppet/modules"
puppet.options = "--hiera_config /vagrant/hiera.yaml"
end
end
###
# Creates an instance using PostgreSQL as the database
#
# To launch run: vagrant up pro_pgsql
###
config.vm.define :pro_pgsql do |pgsql_config|
# Map dev.pyrocms.postgres to this IP
pgsql_config.vm.network :private_network, ip: "198.18.0.213"
# Enable Puppet
pgsql_config.vm.provision :puppet do |puppet|
puppet.facter = {
"fqdn" => "dev.pyrocms-pro.postgres",
"hostname" => "www",
"docroot" => '/vagrant/www/pyrocms-pro/'
}
puppet.manifest_file = "ubuntu-apache2-pgsql-php5.pp"
puppet.manifests_path = "puppet/manifests"
puppet.module_path = "puppet/modules"
puppet.options = "--hiera_config /vagrant/hiera.yaml"
end
end
end