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 wordpress_plugin "sem-static-front" do
 
  70   site "2007.stateofthemap.org"
 
  71   repository "git://chef.openstreetmap.org/sem-static-front.git"
 
  74 directory "/srv/2008.stateofthemap.org" do
 
  80 wordpress_site "2008.stateofthemap.org" do
 
  81   aliases "2008.stateofthemap.com"
 
  82   directory "/srv/2008.stateofthemap.org/wp"
 
  84   database_name "sotm2008"
 
  85   database_user "sotm2008"
 
  86   database_password passwords["sotm2008"]
 
  87   database_prefix "wp_sotm08_"
 
  90 wordpress_theme "refreshwp-11" do
 
  91   site "2008.stateofthemap.org"
 
  92   repository "git://git.openstreetmap.org/stateofthemap.git"
 
  96 wordpress_plugin "geopress" do
 
  97   site "2008.stateofthemap.org"
 
 100 directory "/srv/2009.stateofthemap.org" do
 
 106 git "/srv/2009.stateofthemap.org" do
 
 108   repository "git://git.openstreetmap.org/stateofthemap.git"
 
 109   revision "resources-2009"
 
 114 wordpress_site "2009.stateofthemap.org" do
 
 115   aliases "2009.stateofthemap.com"
 
 116   directory "/srv/2009.stateofthemap.org/wp"
 
 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"
 
 126 wordpress_theme "aerodrome" do
 
 127   site "2009.stateofthemap.org"
 
 128   repository "git://git.openstreetmap.org/stateofthemap.git"
 
 129   revision "theme-2009"
 
 132 wordpress_plugin "wp-sticky" do
 
 133   site "2009.stateofthemap.org"
 
 136 directory "/srv/2010.stateofthemap.org" do
 
 142 git "/srv/2010.stateofthemap.org" do
 
 144   repository "git://git.openstreetmap.org/stateofthemap.git"
 
 145   revision "resources-2010"
 
 150 wordpress_site "2010.stateofthemap.org" do
 
 151   aliases "2010.stateofthemap.com"
 
 152   directory "/srv/2010.stateofthemap.org/wp"
 
 154   database_name "sotm2010"
 
 155   database_user "sotm2010"
 
 156   database_password passwords["sotm2010"]
 
 157   urls "/register" => "/srv/2010.stateofthemap.org/register"
 
 160 wordpress_theme "aerodrome" do
 
 161   site "2010.stateofthemap.org"
 
 162   repository "git://git.openstreetmap.org/stateofthemap.git"
 
 163   revision "theme-2010"
 
 166 wordpress_plugin "sitepress-multilingual-cms" do
 
 167   site "2010.stateofthemap.org"
 
 168   repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
 
 171 wordpress_plugin "wp-sticky" do
 
 172   site "2010.stateofthemap.org"
 
 175 directory "/srv/2011.stateofthemap.org" do
 
 181 git "/srv/2011.stateofthemap.org" do
 
 183   repository "git://git.openstreetmap.org/stateofthemap.git"
 
 184   revision "resources-2011"
 
 189 wordpress_site "2011.stateofthemap.org" do
 
 190   aliases "2011.stateofthemap.com"
 
 191   directory "/srv/2011.stateofthemap.org/wp"
 
 193   database_name "sotm2011"
 
 194   database_user "sotm2011"
 
 195   database_password passwords["sotm2011"]
 
 196   urls "/register" => "/srv/2011.stateofthemap.org/register"
 
 199 wordpress_theme "aerodrome" do
 
 200   site "2011.stateofthemap.org"
 
 201   repository "git://git.openstreetmap.org/stateofthemap.git"
 
 202   revision "theme-2011"
 
 205 wordpress_plugin "sitepress-multilingual-cms" do
 
 206   site "2011.stateofthemap.org"
 
 207   repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
 
 210 wordpress_plugin "wp-sticky" do
 
 211   site "2011.stateofthemap.org"
 
 214 directory "/srv/2012.stateofthemap.org" do
 
 220 git "/srv/2012.stateofthemap.org" do
 
 222   repository "git://git.openstreetmap.org/stateofthemap.git"
 
 223   revision "resources-2012"
 
 228 wordpress_site "2012.stateofthemap.org" do
 
 229   aliases "2012.stateofthemap.com"
 
 230   directory "/srv/2012.stateofthemap.org/wp"
 
 232   database_name "sotm2012"
 
 233   database_user "sotm2012"
 
 234   database_password passwords["sotm2012"]
 
 235   urls "/register" => "/srv/2012.stateofthemap.org/register"
 
 238 wordpress_theme "aerodrome" do
 
 239   site "2012.stateofthemap.org"
 
 240   repository "git://git.openstreetmap.org/stateofthemap.git"
 
 241   revision "theme-2012"
 
 244 wordpress_plugin "leaflet-maps-marker" do
 
 245   site "2012.stateofthemap.org"
 
 248 wordpress_plugin "sitepress-multilingual-cms" do
 
 249   site "2012.stateofthemap.org"
 
 250   repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
 
 253 wordpress_plugin "wp-sticky" do
 
 254   site "2012.stateofthemap.org"
 
 257 template "/etc/cron.daily/sotm-backup" do
 
 258   source "backup.cron.erb"
 
 262   variables :passwords => passwords