]> git.openstreetmap.org Git - chef.git/blob - roles/nominatim.rb
Move readonly load to katla
[chef.git] / roles / nominatim.rb
1 name "nominatim"
2 description "Role applied to all nominatim servers"
3
4 default_attributes(
5   :accounts => {
6     :users => {
7       :lonvia => { :status => :administrator },
8       :twain => { :status => :administrator },
9       :nominatim => {
10         :status => :role,
11         :members => [:lonvia, :tomh, :twain]
12       }
13     }
14   },
15   :apache => {
16     :mpm => "event",
17     :timeout => 60,
18     :keepalive => false,
19     :event => {
20       :server_limit => 32,
21       :max_clients => 1600,
22       :threads_per_child => 50
23     }
24   },
25   :postgresql => {
26     :settings => {
27       :defaults => {
28         :max_connections => "450",
29         :synchronous_commit => "off",
30         :checkpoint_segments => "32",
31         :checkpoint_timeout => "10min",
32         :checkpoint_completion_target => "0.9",
33         :shared_buffers => "2GB",
34         :autovacuum_max_workers => "1"
35       }
36     }
37   },
38   :sysctl => {
39     :postgres => {
40       :comment => "Increase shared memory for postgres",
41       :parameters => {
42         "kernel.shmmax" => 26 * 1024 * 1024 * 1024,
43         "kernel.shmall" => 26 * 1024 * 1024 * 1024 / 4096
44       }
45     },
46     :kernel_scheduler_tune => {
47       :comment => "Tune kernel scheduler preempt",
48       :parameters => {
49         "kernel.sched_min_granularity_ns" => 10000000,
50         "kernel.sched_wakeup_granularity_ns" => 15000000
51       }
52     },
53     :swappiness => {
54       :comment => "Reduce swap usage",
55       :parameters => {
56         "vm.swappiness" => 10
57       }
58     },
59     :network_conntrack_time_wait => {
60       :comment => "Only track completed connections for 30 seconds",
61       :parameters => {
62         "net.netfilter.nf_conntrack_tcp_timeout_time_wait" => "30"
63       }
64     },
65     :network_conntrack_max => {
66       :comment => "Increase max number of connections tracked",
67       :parameters => {
68         "net.netfilter.nf_conntrack_max" => "131072"
69       }
70     }
71   },
72   :nominatim => {
73     :enabled => false,
74     :repository => "git://git.openstreetmap.org/nominatim.git",
75     :tablespaces => {
76       "Osm2pgsql_Data" => "data",
77       "Osm2pgsql_Index" => "data",
78       "Place_Data" => "data",
79       "Place_Index" => "ssd2",
80       "Address_Data" => "data",
81       "Address_Index" => "ssd2",
82       "Search_Data" => "ssd1",
83       "Search_Index" => "ssd1",
84       "Aux_Data" => "aux",
85       "Aux_Index" => "aux"
86     },
87     :redirects => {}
88   }
89 )