]> git.openstreetmap.org Git - chef.git/blob - roles/web-backend.rb
Only reserve one CPU for other tasks on render servers
[chef.git] / roles / web-backend.rb
1 name "web-backend"
2 description "Role applied to all web/api backend servers"
3
4 default_attributes(
5   :apache => {
6     :mpm => "event",
7     :event => {
8       :max_connections_per_child => 10000,
9       :async_request_worker_factor => 4
10     }
11   },
12   :logstash => {
13     :forwarder => {
14       "filebeat.prospectors" => [
15         { "input_type" => "log", "paths" => ["/var/log/apache2/access.log"], "fields" => { "type" => "apache" } },
16         { "input_type" => "log", "paths" => ["/var/log/web/rails-logstash.log"], "fields" => { "type" => "rails" } }
17       ]
18     }
19   },
20   :memcached => {
21     :memory_limit => 4096
22   },
23   :passenger => {
24     :max_pool_size => 12
25   }
26 )
27
28 run_list(
29   "role[web]",
30   "role[logstash-forwarder]",
31   "recipe[web::backend]"
32 )