]> git.openstreetmap.org Git - chef.git/blob - roles/tilecache.rb
Added Luxembourg 2019 lidar hillshade
[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     :kernel_tfo_listen_enable => {
50       :comment => "Enable TCP Fast Open for listening sockets",
51       :parameters => {
52         "net.ipv4.tcp_fastopen" => 3
53       }
54     },
55     :squid_swappiness => {
56       :comment => "Prefer not to swapout to free memory",
57       :parameters => {
58         "vm.swappiness" => "1"
59       }
60     },
61     :sched_wakeup => {
62       :comment => "Tune scheduler",
63       :parameters => {
64         "kernel.sched_min_granularity_ns" => "10000000",
65         "kernel.sched_wakeup_granularity_ns" => "15000000"
66       }
67     }
68   },
69   :tools => {
70     :cron => {
71       :load => {
72         :nice => 19,
73         :io_scheduling_class => "best-effort",
74         :io_scheduling_priority => 7
75       }
76     }
77   }
78 )
79
80 run_list(
81   "recipe[tilecache]"
82 )