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 # https://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("blog", "passwords")
24 directory "/srv/blog.openstreetmap.org" do
30 wordpress_site "blog.openstreetmap.org" do
31 aliases ["blog.osm.org", "blog.openstreetmap.com",
32 "blog.openstreetmap.net", "blog.openstreetmaps.org",
33 "blog.osmfoundation.org"]
34 directory "/srv/blog.openstreetmap.org/wp"
35 database_name "osm-blog"
36 database_user "osm-blog-user"
37 database_password passwords["osm-blog-user"]
38 urls "/casts" => "/srv/blog.openstreetmap.org/casts",
39 "/images" => "/srv/blog.openstreetmap.org/images",
40 "/static" => "/srv/blog.openstreetmap.org/static"
43 wordpress_theme "blog.openstreetmap.org-osmblog-wp-theme" do
44 name "osmblog-wp-theme"
45 site "blog.openstreetmap.org"
46 repository "git://github.com/harry-wood/osmblog-wp-theme.git"
49 wordpress_plugin "blog.openstreetmap.org-google-analytics-for-wordpress" do
50 name "google-analytics-for-wordpress"
51 site "blog.openstreetmap.org"
54 wordpress_plugin "blog.openstreetmap.org-google-sitemap-generator" do
55 name "google-sitemap-generator"
56 site "blog.openstreetmap.org"
59 wordpress_plugin "blog.openstreetmap.org-shareadraft" do
61 site "blog.openstreetmap.org"
64 wordpress_plugin "blog.openstreetmap.org-sitepress-multilingual-cms" do
65 name "sitepress-multilingual-cms"
66 site "blog.openstreetmap.org"
67 repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
70 wordpress_plugin "blog.openstreetmap.org-wordpress-importer" do
71 name "wordpress-importer"
72 site "blog.openstreetmap.org"
75 git "/srv/blog.openstreetmap.org/casts" do
77 repository "git://github.com/openstreetmap/opengeodata-podcasts.git"
83 git "/srv/blog.openstreetmap.org/images" do
85 repository "git://github.com/openstreetmap/opengeodata-images.git"
91 git "/srv/blog.openstreetmap.org/static" do
93 repository "git://github.com/openstreetmap/opengeodata-static.git"
99 ssl_certificate "opengeodata.org" do
100 domains ["opengeodata.org", "www.opengeodata.org", "old.opengeodata.org"]
101 notifies :reload, "service[apache2]"
104 apache_site "opengeodata.org" do
105 template "opengeodata.erb"
106 directory "/srv/opengeodata.org"
109 template "/etc/cron.daily/blog-backup" do
110 source "backup.cron.erb"
114 variables :passwords => passwords