]> git.openstreetmap.org Git - chef.git/blob - cookbooks/stateofthemap/recipes/default.rb
Revert "Take thorn-03 out of production"
[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 directory "/srv/2007.stateofthemap.org" do
25   owner "wordpress"
26   group "wordpress"
27   mode 0755
28 end
29
30 wordpress_site "2007.stateofthemap.org" do
31   aliases "2007.stateofthemap.com"
32   directory "/srv/2007.stateofthemap.org/wp"
33   ssl_enabled true
34   database_name "sotm2007"
35   database_user "sotm2007"
36   database_password passwords["sotm2007"]
37   database_prefix "wp_sotm_"
38 end
39
40 wordpress_theme "refreshwp-11" do
41   site "2007.stateofthemap.org"
42   repository "git://git.openstreetmap.org/stateofthemap.git"
43   revision "theme-2007"
44 end
45
46 wordpress_plugin "geopress" do
47   site "2007.stateofthemap.org"
48 end
49
50 wordpress_plugin "sem-static-front" do
51   site "2007.stateofthemap.org"
52   repository "git://chef.openstreetmap.org/sem-static-front.git"
53 end
54
55 directory "/srv/2008.stateofthemap.org" do
56   owner "wordpress"
57   group "wordpress"
58   mode 0755
59 end
60
61 wordpress_site "2008.stateofthemap.org" do
62   aliases "2008.stateofthemap.com"
63   directory "/srv/2008.stateofthemap.org/wp"
64   ssl_enabled true
65   database_name "sotm2008"
66   database_user "sotm2008"
67   database_password passwords["sotm2008"]
68   database_prefix "wp_sotm08_"
69 end
70
71 wordpress_theme "refreshwp-11" do
72   site "2008.stateofthemap.org"
73   repository "git://git.openstreetmap.org/stateofthemap.git"
74   revision "theme-2008"
75 end
76
77 wordpress_plugin "geopress" do
78   site "2008.stateofthemap.org"
79 end
80
81 directory "/srv/2009.stateofthemap.org" do
82   owner "wordpress"
83   group "wordpress"
84   mode 0755
85 end
86
87 git "/srv/2009.stateofthemap.org" do
88   action :sync
89   repository "git://git.openstreetmap.org/stateofthemap.git"
90   revision "resources-2009"
91   user "wordpress"
92   group "wordpress"
93 end
94
95 wordpress_site "2009.stateofthemap.org" do
96   aliases "2009.stateofthemap.com"
97   directory "/srv/2009.stateofthemap.org/wp"
98   ssl_enabled true
99   database_name "sotm2009"
100   database_user "sotm2009"
101   database_password passwords["sotm2009"]
102   urls "/register" => "/srv/2009.stateofthemap.org/register",
103        "/register-pro-user" => "/srv/2009.stateofthemap.org/register-pro-user",
104        "/podcasts" => "/srv/2009.stateofthemap.org/podcasts"
105 end
106
107 wordpress_theme "aerodrome" do
108   site "2009.stateofthemap.org"
109   repository "git://git.openstreetmap.org/stateofthemap.git"
110   revision "theme-2009"
111 end
112
113 wordpress_plugin "wp-sticky" do
114   site "2009.stateofthemap.org"
115 end
116
117 directory "/srv/2010.stateofthemap.org" do
118   owner "wordpress"
119   group "wordpress"
120   mode 0755
121 end
122
123 git "/srv/2010.stateofthemap.org" do
124   action :sync
125   repository "git://git.openstreetmap.org/stateofthemap.git"
126   revision "resources-2010"
127   user "wordpress"
128   group "wordpress"
129 end
130
131 wordpress_site "2010.stateofthemap.org" do
132   aliases "2010.stateofthemap.com"
133   directory "/srv/2010.stateofthemap.org/wp"
134   ssl_enabled true
135   database_name "sotm2010"
136   database_user "sotm2010"
137   database_password passwords["sotm2010"]
138   urls "/register" => "/srv/2010.stateofthemap.org/register"
139 end
140
141 wordpress_theme "aerodrome" do
142   site "2010.stateofthemap.org"
143   repository "git://git.openstreetmap.org/stateofthemap.git"
144   revision "theme-2010"
145 end
146
147 wordpress_plugin "sitepress-multilingual-cms" do
148   site "2010.stateofthemap.org"
149   repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
150 end
151
152 wordpress_plugin "wp-sticky" do
153   site "2010.stateofthemap.org"
154 end
155
156 directory "/srv/2011.stateofthemap.org" do
157   owner "wordpress"
158   group "wordpress"
159   mode 0755
160 end
161
162 git "/srv/2011.stateofthemap.org" do
163   action :sync
164   repository "git://git.openstreetmap.org/stateofthemap.git"
165   revision "resources-2011"
166   user "wordpress"
167   group "wordpress"
168 end
169
170 wordpress_site "2011.stateofthemap.org" do
171   aliases "2011.stateofthemap.com"
172   directory "/srv/2011.stateofthemap.org/wp"
173   ssl_enabled true
174   database_name "sotm2011"
175   database_user "sotm2011"
176   database_password passwords["sotm2011"]
177   urls "/register" => "/srv/2011.stateofthemap.org/register"
178 end
179
180 wordpress_theme "aerodrome" do
181   site "2011.stateofthemap.org"
182   repository "git://git.openstreetmap.org/stateofthemap.git"
183   revision "theme-2011"
184 end
185
186 wordpress_plugin "sitepress-multilingual-cms" do
187   site "2011.stateofthemap.org"
188   repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
189 end
190
191 wordpress_plugin "wp-sticky" do
192   site "2011.stateofthemap.org"
193 end
194
195 directory "/srv/2012.stateofthemap.org" do
196   owner "wordpress"
197   group "wordpress"
198   mode 0755
199 end
200
201 git "/srv/2012.stateofthemap.org" do
202   action :sync
203   repository "git://git.openstreetmap.org/stateofthemap.git"
204   revision "resources-2012"
205   user "wordpress"
206   group "wordpress"
207 end
208
209 wordpress_site "2012.stateofthemap.org" do
210   aliases "2012.stateofthemap.com"
211   directory "/srv/2012.stateofthemap.org/wp"
212   ssl_enabled true
213   database_name "sotm2012"
214   database_user "sotm2012"
215   database_password passwords["sotm2012"]
216   urls "/register" => "/srv/2012.stateofthemap.org/register"
217 end
218
219 wordpress_theme "aerodrome" do
220   site "2012.stateofthemap.org"
221   repository "git://git.openstreetmap.org/stateofthemap.git"
222   revision "theme-2012"
223 end
224
225 wordpress_plugin "leaflet-maps-marker" do
226   site "2012.stateofthemap.org"
227 end
228
229 wordpress_plugin "sitepress-multilingual-cms" do
230   site "2012.stateofthemap.org"
231   repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
232 end
233
234 wordpress_plugin "wp-sticky" do
235   site "2012.stateofthemap.org"
236 end
237
238 directory "/srv/2016.stateofthemap.org" do
239   owner "wordpress"
240   group "wordpress"
241   mode 0755
242 end
243
244 wordpress_site "2016.stateofthemap.org" do
245   aliases ["2016.stateofthemap.com",
246            "www.stateofthemap.org", "stateofthemap.org",
247            "www.stateofthemap.com", "stateofthemap.com"]
248   directory "/srv/2016.stateofthemap.org/wp"
249   ssl_enabled true
250   database_name "sotm2016"
251   database_user "sotm2016"
252   database_password passwords["sotm2016"]
253 end
254
255 wordpress_theme "aerodrome" do
256   site "2016.stateofthemap.org"
257   repository "git://git.openstreetmap.org/stateofthemap.git"
258   revision "theme-2012"
259 end
260
261 wordpress_plugin "leaflet-maps-marker" do
262   site "2016.stateofthemap.org"
263 end
264
265 wordpress_plugin "sitepress-multilingual-cms" do
266   site "2016.stateofthemap.org"
267   repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
268 end
269
270 wordpress_plugin "wp-sticky" do
271   site "2016.stateofthemap.org"
272 end
273
274 template "/etc/cron.daily/sotm-backup" do
275   source "backup.cron.erb"
276   owner "root"
277   group "root"
278   mode 0750
279   variables :passwords => passwords
280 end