]> git.openstreetmap.org Git - chef.git/blob - roles/tilecache.rb
Disable firewall on tile caches
[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   :networking => {
13     :firewall => {
14       :enabled => false
15     }
16   },
17   :nginx => {
18     :access_log => false
19   },
20   :sysctl => {
21     :sockets => {
22       :comment => "Increase size of connection queue",
23       :parameters => {
24         "net.core.somaxconn" => 10000
25       }
26     },
27     :network_conntrack_time_wait => {
28       :comment => "Only track completed connections for 30 seconds",
29       :parameters => {
30         "net.netfilter.nf_conntrack_tcp_timeout_time_wait" => "30"
31       }
32     },
33     :network_conntrack_max => {
34       :comment => "Increase max number of connections tracked",
35       :parameters => {
36         "net.netfilter.nf_conntrack_max" => "524288"
37       }
38     },
39     :network_local_port_range => {
40       :comment => "Increase available local port range",
41       :parameters => {
42         "net.ipv4.ip_local_port_range" => "1024\t65535"
43       }
44     },
45     :network_tcp_timewait_reuse => {
46       :comment => "Allow tcp timewait reuse",
47       :parameters => {
48         "net.ipv4.tcp_tw_reuse" => 1
49       }
50     },
51     :squid_swappiness => {
52       :comment => "Prefer not to swapout to free memory",
53       :parameters => {
54         "vm.swappiness" => "1"
55       }
56     },
57     :sched_wakeup => {
58       :comment => "Tune scheduler",
59       :parameters => {
60         "kernel.sched_min_granularity_ns" => "10000000",
61         "kernel.sched_wakeup_granularity_ns" => "15000000"
62       }
63     }
64   },
65   :tools => {
66     :cron => {
67       :load => {
68         :nice => 19,
69         :io_scheduling_class => "best-effort",
70         :io_scheduling_priority => 7
71       }
72     }
73   }
74 )
75
76 run_list(
77   "recipe[tilecache]"
78 )