]> git.openstreetmap.org Git - chef.git/blob - cookbooks/stateofthemap/recipes/default.rb
Fix some tile parents
[chef.git] / cookbooks / stateofthemap / recipes / default.rb
1 #
2 # Cookbook Name:: stateofthemap
3 # Recipe:: default
4 #
5 # Copyright 2013, OpenStreetMap Foundation
6 #
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #     http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #
19
20 include_recipe "wordpress"
21
22 passwords = data_bag_item("stateofthemap", "passwords")
23
24 git "/srv/stateofthemap.org" do
25   action :sync
26   repository "git://git.openstreetmap.org/stateofthemap.git"
27   revision "chooser"
28   user "root"
29   group "root"
30 end
31
32 ssl_certificate "stateofthemap.org" do
33   domains ["stateofthemap.org", "www.stateofthemap.org",
34            "stateofthemap.com", "www.stateofthemap.com"]
35   notifies :reload, "service[apache2]"
36 end
37
38 apache_site "stateofthemap.org" do
39   template "apache.erb"
40   directory "/srv/stateofthemap.org"
41 end
42
43 directory "/srv/2007.stateofthemap.org" do
44   owner "wordpress"
45   group "wordpress"
46   mode 0o755
47 end
48
49 wordpress_site "2007.stateofthemap.org" do
50   aliases "2007.stateofthemap.com"
51   directory "/srv/2007.stateofthemap.org/wp"
52   ssl_enabled true
53   database_name "sotm2007"
54   database_user "sotm2007"
55   database_password passwords["sotm2007"]
56   database_prefix "wp_sotm_"
57 end
58
59 wordpress_theme "refreshwp-11" do
60   site "2007.stateofthemap.org"
61   repository "git://git.openstreetmap.org/stateofthemap.git"
62   revision "theme-2007"
63 end
64
65 wordpress_plugin "geopress" do
66   site "2007.stateofthemap.org"
67 end
68
69 wordpress_plugin "sem-static-front" do
70   site "2007.stateofthemap.org"
71   repository "git://chef.openstreetmap.org/sem-static-front.git"
72 end
73
74 directory "/srv/2008.stateofthemap.org" do
75   owner "wordpress"
76   group "wordpress"
77   mode 0o755
78 end
79
80 wordpress_site "2008.stateofthemap.org" do
81   aliases "2008.stateofthemap.com"
82   directory "/srv/2008.stateofthemap.org/wp"
83   ssl_enabled true
84   database_name "sotm2008"
85   database_user "sotm2008"
86   database_password passwords["sotm2008"]
87   database_prefix "wp_sotm08_"
88 end
89
90 wordpress_theme "refreshwp-11" do
91   site "2008.stateofthemap.org"
92   repository "git://git.openstreetmap.org/stateofthemap.git"
93   revision "theme-2008"
94 end
95
96 wordpress_plugin "geopress" do
97   site "2008.stateofthemap.org"
98 end
99
100 directory "/srv/2009.stateofthemap.org" do
101   owner "wordpress"
102   group "wordpress"
103   mode 0o755
104 end
105
106 git "/srv/2009.stateofthemap.org" do
107   action :sync
108   repository "git://git.openstreetmap.org/stateofthemap.git"
109   revision "resources-2009"
110   user "wordpress"
111   group "wordpress"
112 end
113
114 wordpress_site "2009.stateofthemap.org" do
115   aliases "2009.stateofthemap.com"
116   directory "/srv/2009.stateofthemap.org/wp"
117   ssl_enabled true
118   database_name "sotm2009"
119   database_user "sotm2009"
120   database_password passwords["sotm2009"]
121   urls "/register" => "/srv/2009.stateofthemap.org/register",
122        "/register-pro-user" => "/srv/2009.stateofthemap.org/register-pro-user",
123        "/podcasts" => "/srv/2009.stateofthemap.org/podcasts"
124 end
125
126 wordpress_theme "aerodrome" do
127   site "2009.stateofthemap.org"
128   repository "git://git.openstreetmap.org/stateofthemap.git"
129   revision "theme-2009"
130 end
131
132 wordpress_plugin "wp-sticky" do
133   site "2009.stateofthemap.org"
134 end
135
136 directory "/srv/2010.stateofthemap.org" do
137   owner "wordpress"
138   group "wordpress"
139   mode 0o755
140 end
141
142 git "/srv/2010.stateofthemap.org" do
143   action :sync
144   repository "git://git.openstreetmap.org/stateofthemap.git"
145   revision "resources-2010"
146   user "wordpress"
147   group "wordpress"
148 end
149
150 wordpress_site "2010.stateofthemap.org" do
151   aliases "2010.stateofthemap.com"
152   directory "/srv/2010.stateofthemap.org/wp"
153   ssl_enabled true
154   database_name "sotm2010"
155   database_user "sotm2010"
156   database_password passwords["sotm2010"]
157   urls "/register" => "/srv/2010.stateofthemap.org/register"
158 end
159
160 wordpress_theme "aerodrome" do
161   site "2010.stateofthemap.org"
162   repository "git://git.openstreetmap.org/stateofthemap.git"
163   revision "theme-2010"
164 end
165
166 wordpress_plugin "sitepress-multilingual-cms" do
167   site "2010.stateofthemap.org"
168   repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
169 end
170
171 wordpress_plugin "wp-sticky" do
172   site "2010.stateofthemap.org"
173 end
174
175 directory "/srv/2011.stateofthemap.org" do
176   owner "wordpress"
177   group "wordpress"
178   mode 0o755
179 end
180
181 git "/srv/2011.stateofthemap.org" do
182   action :sync
183   repository "git://git.openstreetmap.org/stateofthemap.git"
184   revision "resources-2011"
185   user "wordpress"
186   group "wordpress"
187 end
188
189 wordpress_site "2011.stateofthemap.org" do
190   aliases "2011.stateofthemap.com"
191   directory "/srv/2011.stateofthemap.org/wp"
192   ssl_enabled true
193   database_name "sotm2011"
194   database_user "sotm2011"
195   database_password passwords["sotm2011"]
196   urls "/register" => "/srv/2011.stateofthemap.org/register"
197 end
198
199 wordpress_theme "aerodrome" do
200   site "2011.stateofthemap.org"
201   repository "git://git.openstreetmap.org/stateofthemap.git"
202   revision "theme-2011"
203 end
204
205 wordpress_plugin "sitepress-multilingual-cms" do
206   site "2011.stateofthemap.org"
207   repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
208 end
209
210 wordpress_plugin "wp-sticky" do
211   site "2011.stateofthemap.org"
212 end
213
214 directory "/srv/2012.stateofthemap.org" do
215   owner "wordpress"
216   group "wordpress"
217   mode 0o755
218 end
219
220 git "/srv/2012.stateofthemap.org" do
221   action :sync
222   repository "git://git.openstreetmap.org/stateofthemap.git"
223   revision "resources-2012"
224   user "wordpress"
225   group "wordpress"
226 end
227
228 wordpress_site "2012.stateofthemap.org" do
229   aliases "2012.stateofthemap.com"
230   directory "/srv/2012.stateofthemap.org/wp"
231   ssl_enabled true
232   database_name "sotm2012"
233   database_user "sotm2012"
234   database_password passwords["sotm2012"]
235   urls "/register" => "/srv/2012.stateofthemap.org/register"
236 end
237
238 wordpress_theme "aerodrome" do
239   site "2012.stateofthemap.org"
240   repository "git://git.openstreetmap.org/stateofthemap.git"
241   revision "theme-2012"
242 end
243
244 wordpress_plugin "leaflet-maps-marker" do
245   site "2012.stateofthemap.org"
246 end
247
248 wordpress_plugin "sitepress-multilingual-cms" do
249   site "2012.stateofthemap.org"
250   repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
251 end
252
253 wordpress_plugin "wp-sticky" do
254   site "2012.stateofthemap.org"
255 end
256
257 template "/etc/cron.daily/sotm-backup" do
258   source "backup.cron.erb"
259   owner "root"
260   group "root"
261   mode 0o750
262   variables :passwords => passwords
263 end