]> git.openstreetmap.org Git - chef.git/blob - cookbooks/mediawiki/recipes/default.rb
mediawiki: Add visualeditor support
[chef.git] / cookbooks / mediawiki / recipes / default.rb
1 #
2 # Cookbook Name:: mediawiki
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 include_recipe "memcached"
21 include_recipe "apache::ssl"
22 include_recipe "mysql"
23 include_recipe "git"
24
25 # Mediawiki Base Requirements
26 package "php5"
27 package "php5-cli"
28 package "php5-curl"
29 package "php5-mysql"
30 package "php5-gd"
31 package "php-apc"
32 package "php5-intl"
33 package "libapache2-mod-php5"
34
35 package "php-wikidiff2"
36
37 # Mediawiki Image + SVG support
38 package "imagemagick"
39 package "librsvg2-bin"
40
41 # Mediawiki PDF support via Extension:PdfHandler
42 package "ghostscript"
43 package "poppler-utils"
44
45 # Mediawiki backup
46 package "xz-utils"
47
48 # Mediawiki packages for VisualEditor support
49 package "curl"
50 package "parsoid"
51
52 template "/etc/mediawiki/parsoid/settings.js" do
53   source "parsoid-settings.js.erb"
54   owner "root"
55   group "root"
56   mode 0644
57 end
58
59 service "parsoid" do
60   action [:enable]
61   supports :status => false, :restart => true, :reload => false
62   subscribes :restart, "template[/etc/mediawiki/parsoid/settings.js]"
63 end
64
65 link "/etc/php5/apache2/conf.d/20-wikidiff2.ini" do
66   to "../../mods-available/wikidiff2.ini"
67 end
68
69 apache_module "php5"
70 apache_module "rewrite"