]> git.openstreetmap.org Git - chef.git/blob - roles/tilecache.rb
Merge remote-tracking branch 'github/pull/240'
[chef.git] / roles / tilecache.rb
1 name "tilecache"
2 description "Role applied to all tile cache servers"
3
4 default_attributes(
5   :accounts => {
6     :groups => {
7       :proxy => {
8         :members => [:tomh, :grant, :matt, :jburgess]
9       }
10     }
11   },
12   :apt => {
13     :sources => ["nginx"]
14   },
15   :networking => {
16     :tcp_fastopen_key => "tile"
17   },
18   :nginx => {
19     :access_log => false
20   },
21   :sysctl => {
22     :network_conntrack_time_wait => {
23       :comment => "Only track completed connections for 30 seconds",
24       :parameters => {
25         "net.netfilter.nf_conntrack_tcp_timeout_time_wait" => "30"
26       }
27     },
28     :network_conntrack_max => {
29       :comment => "Increase max number of connections tracked",
30       :parameters => {
31         "net.netfilter.nf_conntrack_max" => "524288"
32       }
33     },
34     :network_local_port_range => {
35       :comment => "Increase available local port range",
36       :parameters => {
37         "net.ipv4.ip_local_port_range" => "4096 64000"
38       }
39     },
40     :kernel_tfo_listen_enable => {
41       :comment => "Enable TCP Fast Open for listening sockets",
42       :parameters => {
43         "net.ipv4.tcp_fastopen" => 3
44       }
45     },
46     :squid_swappiness => {
47       :comment => "Prefer not to swapout to free memory",
48       :parameters => {
49         "vm.swappiness" => "30"
50       }
51     }
52   }
53 )
54
55 run_list(
56   "recipe[tilecache]"
57 )