]> git.openstreetmap.org Git - chef.git/blob - cookbooks/mediawiki/recipes/default.rb
Fix rubocop warnings
[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 package "liblz4-tool"
48
49 # Mediawiki packages for VisualEditor support
50 package "curl"
51 package "parsoid"
52
53 template "/etc/mediawiki/parsoid/settings.js" do
54   source "parsoid-settings.js.erb"
55   owner "root"
56   group "root"
57   mode 0o644
58 end
59
60 service "parsoid" do
61   action [:enable]
62   supports :status => false, :restart => true, :reload => false
63   subscribes :restart, "template[/etc/mediawiki/parsoid/settings.js]"
64 end
65
66 link "/etc/php5/apache2/conf.d/20-wikidiff2.ini" do
67   to "../../mods-available/wikidiff2.ini"
68 end
69
70 apache_module "php5"
71 apache_module "rewrite"