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