]> git.openstreetmap.org Git - chef.git/blob - cookbooks/forum/recipes/default.rb
Remove arcfour (RC4) cipher no longer available in newer OpenSSH
[chef.git] / cookbooks / forum / recipes / default.rb
1 #
2 # Cookbook Name:: forum
3 # Recipe:: default
4 #
5 # Copyright 2014, 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 include_recipe "apache::ssl"
20 include_recipe "git"
21 include_recipe "mysql"
22
23 passwords = data_bag_item("forum", "passwords")
24
25 package "php5"
26 package "php5-cli"
27 package "php5-mysql"
28 package "php-apc"
29
30 apache_module "php5"
31
32 apache_site "default" do
33   action [:disable]
34 end
35
36 apache_site "forum.openstreetmap.org" do
37   template "apache.erb"
38 end
39
40 directory "/srv/forum.openstreetmap.org" do
41   owner "forum"
42   group "forum"
43   mode 0755
44 end
45
46 git "/srv/forum.openstreetmap.org/html/" do
47   action :sync
48   repository "http://github.com/fluxbb/fluxbb.git"
49   revision "refs/tags/fluxbb-1.5.6"
50   depth 1
51   user "forum"
52   group "forum"
53 end
54
55 directory "/srv/forum.openstreetmap.org/html/cache/" do
56   owner "www-data"
57   group "www-data"
58   mode 0755
59 end
60
61 directory "/srv/forum.openstreetmap.org/html/img/avatars/" do
62   owner "www-data"
63   group "www-data"
64   mode 0755
65 end
66
67 mysql_user "forum@localhost" do
68   password passwords["database"]
69 end
70
71 mysql_database "forum" do
72   permissions "forum@localhost" => :all
73 end
74
75 template "/etc/cron.daily/forum-backup" do
76   source "backup.cron.erb"
77   owner "root"
78   group "root"
79   mode 0750
80   variables :passwords => passwords
81 end