SSL enable switch2osm and stateofthemap sites
[chef.git] / cookbooks / switch2osm / recipes / default.rb
1 #
2 # Cookbook Name:: switch2osm
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 node.default[:ssl][:certificates] = node[:ssl][:certificates] | ["osmfoundation"]
21
22 include_recipe "wordpress"
23
24 passwords = data_bag_item("switch2osm", "passwords")
25
26 wordpress_site "switch2osm.org" do
27   aliases ["www.switch2osm.org", "switch2osm.com", "www.switch2osm.com"]
28   directory "/srv/switch2osm.org"
29   ssl_enabled true
30   ssl_certificate "osmfoundation"
31   ssl_certificate_chain "startcom"
32   database_name "switch2osm-blog"
33   database_user "switch2osm-user"
34   database_password passwords["switch2osm-user"]
35 end
36
37 wordpress_theme "picolight" do
38   site "switch2osm.org"
39   repository "git://github.com/Firefishy/picolight-s2o.git"
40   revision "master"
41 end
42
43 wordpress_plugin "sitepress-multilingual-cms" do
44   site "switch2osm.org"
45   repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
46 end
47
48 wordpress_plugin "wpml-cms-nav" do
49   site "switch2osm.org"
50   repository "git://chef.openstreetmap.org/wpml-cms-nav.git"
51 end
52
53 wordpress_plugin "wpml-sticky-links" do
54   site "switch2osm.org"
55   repository "git://chef.openstreetmap.org/wpml-sticky-links.git"
56 end
57
58 wordpress_plugin "wpml-string-translation" do
59   site "switch2osm.org"
60   repository "git://chef.openstreetmap.org/wpml-string-translation.git"
61 end
62
63 wordpress_plugin "wpml-translation-analytics" do
64   site "switch2osm.org"
65   repository "git://chef.openstreetmap.org/wpml-translation-analytics.git"
66 end
67
68 wordpress_plugin "wpml-translation-management" do
69   site "switch2osm.org"
70   repository "git://chef.openstreetmap.org/wpml-translation-management.git"
71 end
72
73 wordpress_plugin "wpml-xliff" do
74   site "switch2osm.org"
75   repository "git://chef.openstreetmap.org/wpml-xliff.git"
76 end
77
78 template "/etc/cron.daily/switch2osm-backup" do
79   source "backup.cron.erb"
80   owner "root"
81   group "root"
82   mode 0750
83   variables :passwords => passwords
84 end