2 # Cookbook Name:: stateofthemap
5 # Copyright 2013, OpenStreetMap Foundation
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
11 # http://www.apache.org/licenses/LICENSE-2.0
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.
20 include_recipe "wordpress"
22 passwords = data_bag_item("stateofthemap", "passwords")
24 git "/srv/stateofthemap.org" do
26 repository "git://git.openstreetmap.org/stateofthemap.git"
32 ssl_certificate "stateofthemap.org" do
33 domains ["stateofthemap.org", "www.stateofthemap.org",
34 "stateofthemap.com", "www.stateofthemap.com"]
35 notifies :reload, "service[apache2]"
38 apache_site "stateofthemap.org" do
40 directory "/srv/stateofthemap.org"
43 directory "/srv/2007.stateofthemap.org" do
49 wordpress_site "2007.stateofthemap.org" do
50 aliases "2007.stateofthemap.com"
51 directory "/srv/2007.stateofthemap.org/wp"
53 database_name "sotm2007"
54 database_user "sotm2007"
55 database_password passwords["sotm2007"]
56 database_prefix "wp_sotm_"
59 wordpress_theme "refreshwp-11" do
60 site "2007.stateofthemap.org"
61 repository "git://git.openstreetmap.org/stateofthemap.git"
65 wordpress_plugin "geopress" do
66 site "2007.stateofthemap.org"
69 directory "/srv/2008.stateofthemap.org" do
75 wordpress_site "2008.stateofthemap.org" do
76 aliases "2008.stateofthemap.com"
77 directory "/srv/2008.stateofthemap.org/wp"
79 database_name "sotm2008"
80 database_user "sotm2008"
81 database_password passwords["sotm2008"]
82 database_prefix "wp_sotm08_"
85 wordpress_theme "refreshwp-11" do
86 site "2008.stateofthemap.org"
87 repository "git://git.openstreetmap.org/stateofthemap.git"
91 wordpress_plugin "geopress" do
92 site "2008.stateofthemap.org"
95 directory "/srv/2009.stateofthemap.org" do
101 git "/srv/2009.stateofthemap.org" do
103 repository "git://git.openstreetmap.org/stateofthemap.git"
104 revision "resources-2009"
109 wordpress_site "2009.stateofthemap.org" do
110 aliases "2009.stateofthemap.com"
111 directory "/srv/2009.stateofthemap.org/wp"
113 database_name "sotm2009"
114 database_user "sotm2009"
115 database_password passwords["sotm2009"]
116 urls "/register" => "/srv/2009.stateofthemap.org/register",
117 "/register-pro-user" => "/srv/2009.stateofthemap.org/register-pro-user",
118 "/podcasts" => "/srv/2009.stateofthemap.org/podcasts"
121 wordpress_theme "aerodrome" do
122 site "2009.stateofthemap.org"
123 repository "git://git.openstreetmap.org/stateofthemap.git"
124 revision "theme-2009"
127 wordpress_plugin "wp-sticky" do
128 site "2009.stateofthemap.org"
131 directory "/srv/2010.stateofthemap.org" do
137 git "/srv/2010.stateofthemap.org" do
139 repository "git://git.openstreetmap.org/stateofthemap.git"
140 revision "resources-2010"
145 wordpress_site "2010.stateofthemap.org" do
146 aliases "2010.stateofthemap.com"
147 directory "/srv/2010.stateofthemap.org/wp"
149 database_name "sotm2010"
150 database_user "sotm2010"
151 database_password passwords["sotm2010"]
152 urls "/register" => "/srv/2010.stateofthemap.org/register"
155 wordpress_theme "aerodrome" do
156 site "2010.stateofthemap.org"
157 repository "git://git.openstreetmap.org/stateofthemap.git"
158 revision "theme-2010"
161 wordpress_plugin "sitepress-multilingual-cms" do
162 site "2010.stateofthemap.org"
163 repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
166 wordpress_plugin "wp-sticky" do
167 site "2010.stateofthemap.org"
170 directory "/srv/2011.stateofthemap.org" do
176 git "/srv/2011.stateofthemap.org" do
178 repository "git://git.openstreetmap.org/stateofthemap.git"
179 revision "resources-2011"
184 wordpress_site "2011.stateofthemap.org" do
185 aliases "2011.stateofthemap.com"
186 directory "/srv/2011.stateofthemap.org/wp"
188 database_name "sotm2011"
189 database_user "sotm2011"
190 database_password passwords["sotm2011"]
191 urls "/register" => "/srv/2011.stateofthemap.org/register"
194 wordpress_theme "aerodrome" do
195 site "2011.stateofthemap.org"
196 repository "git://git.openstreetmap.org/stateofthemap.git"
197 revision "theme-2011"
200 wordpress_plugin "sitepress-multilingual-cms" do
201 site "2011.stateofthemap.org"
202 repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
205 wordpress_plugin "wp-sticky" do
206 site "2011.stateofthemap.org"
209 directory "/srv/2012.stateofthemap.org" do
215 git "/srv/2012.stateofthemap.org" do
217 repository "git://git.openstreetmap.org/stateofthemap.git"
218 revision "resources-2012"
223 wordpress_site "2012.stateofthemap.org" do
224 aliases "2012.stateofthemap.com"
225 directory "/srv/2012.stateofthemap.org/wp"
227 database_name "sotm2012"
228 database_user "sotm2012"
229 database_password passwords["sotm2012"]
230 urls "/register" => "/srv/2012.stateofthemap.org/register"
233 wordpress_theme "aerodrome" do
234 site "2012.stateofthemap.org"
235 repository "git://git.openstreetmap.org/stateofthemap.git"
236 revision "theme-2012"
239 wordpress_plugin "leaflet-maps-marker" do
240 site "2012.stateofthemap.org"
243 wordpress_plugin "sitepress-multilingual-cms" do
244 site "2012.stateofthemap.org"
245 repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
248 wordpress_plugin "wp-sticky" do
249 site "2012.stateofthemap.org"
252 template "/etc/cron.daily/sotm-backup" do
253 source "backup.cron.erb"
257 variables :passwords => passwords