2 # Cookbook:: wiki.openstreetmap.org
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 "squid"
22 include_recipe "mediawiki"
24 passwords = data_bag_item("wiki", "passwords")
26 package "lua5.1" # newer versions do not work with Scribuntu!
28 apache_site "default" do
32 mediawiki_site "wiki.openstreetmap.org" do
33 aliases ["wiki.osm.org", "wiki.openstreetmap.com", "wiki.openstreetmap.net",
34 "wiki.openstreetmap.ca", "wiki.openstreetmap.eu",
35 "wiki.openstreetmap.pro", "wiki.openstreetmaps.org"]
36 directory "/srv/wiki.openstreetmap.org"
39 database_user "wiki-user"
40 database_password passwords["database"]
42 admin_password passwords["admin"]
44 logo "/osm_logo_wiki.png"
46 email_contact "webmaster@openstreetmap.org"
47 email_sender "wiki@noreply.openstreetmap.org"
48 email_sender_name "OpenStreetMap Wiki"
52 recaptcha_public_key "6LdFIQATAAAAAMwtHeI8KDgPqvRbXeNYSq1gujKz"
53 recaptcha_private_key passwords["recaptcha"]
55 # site_notice "MAINTENANCE: WIKI READ-ONLY UNTIL Monday 16 May 2016 - 11:00am UTC/GMT."
56 # site_readonly "MAINTENANCE: WIKI READ-ONLY UNTIL Monday 16 May 2016 - 11:00am UTC/GMT."
59 mediawiki_extension "CodeEditor" do
60 site "wiki.openstreetmap.org"
63 mediawiki_extension "CodeMirror" do
64 site "wiki.openstreetmap.org"
67 mediawiki_extension "Scribunto" do
68 site "wiki.openstreetmap.org"
69 template "mw-ext-Scribunto.inc.php.erb"
70 template_cookbook "wiki"
73 mediawiki_extension "Wikibase" do
74 site "wiki.openstreetmap.org"
75 template "mw-ext-Wikibase.inc.php.erb"
76 template_cookbook "wiki"
79 mediawiki_extension "OsmWikibase" do
80 site "wiki.openstreetmap.org"
81 repository "git://github.com/nyurik/OsmWikibase.git"
85 mediawiki_extension "Echo" do
86 site "wiki.openstreetmap.org"
87 template "mw-ext-Echo.inc.php.erb"
88 template_cookbook "wiki"
91 mediawiki_extension "Thanks" do
92 site "wiki.openstreetmap.org"
93 template "mw-ext-Thanks.inc.php.erb"
94 template_cookbook "wiki"
97 mediawiki_extension "TimedMediaHandler" do
98 site "wiki.openstreetmap.org"
101 mediawiki_extension "MultiMaps" do
102 site "wiki.openstreetmap.org"
103 template "mw-ext-MultiMaps.inc.php.erb"
104 template_cookbook "wiki"
105 variables :thunderforest_key => passwords["thunderforest"]
108 cookbook_file "/srv/wiki.openstreetmap.org/osm_logo_wiki.png" do
109 owner node[:mediawiki][:user]
110 group node[:mediawiki][:group]
114 template "/srv/wiki.openstreetmap.org/robots.txt" do
115 owner node[:mediawiki][:user]
116 group node[:mediawiki][:group]
118 source "robots.txt.erb"
121 cookbook_file "/srv/wiki.openstreetmap.org/favicon.ico" do
122 owner node[:mediawiki][:user]
123 group node[:mediawiki][:group]
127 directory "/srv/wiki.openstreetmap.org/dump" do
128 owner node[:mediawiki][:user]
129 group node[:mediawiki][:group]
133 template "/etc/cron.d/wiki-dump" do
137 source "wiki-dump.erb"
138 variables :directory => "/srv/wiki.openstreetmap.org"