]> git.openstreetmap.org Git - chef.git/blob - roles/nominatim.rb
Update carto stylesheet to v2.13.0
[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 => 800,
22       :threads_per_child => 50
23     }
24   },
25   :apt => {
26     :sources => [ "ubuntugis-stable", "ubuntugis-unstable" ]
27   },
28   :postgresql => {
29     :versions => [ "9.1" ],
30     :settings => {
31       :defaults => {
32         :max_connections => "450",
33         :synchronous_commit => "off",
34         :checkpoint_segments => "50",
35         :checkpoint_timeout => "10min",
36         :checkpoint_completion_target => "0.9",
37         :autovacuum_max_workers => "1"
38       }
39     }
40   },
41   :sysctl => {
42     :postgres => {
43       :comment => "Increase shared memory for postgres",
44       :parameters => { 
45         "kernel.shmmax" => 26 * 1024 * 1024 * 1024,
46         "kernel.shmall" => 26 * 1024 * 1024 * 1024 / 4096
47       }
48     },
49     :kernel_scheduler_tune => {
50       :comment => "Tune kernel scheduler preempt",
51       :parameters => {
52         "kernel.sched_min_granularity_ns" => 10000000,
53         "kernel.sched_wakeup_granularity_ns" => 15000000
54       }
55     }
56   },
57   :nominatim => {
58     :repository => "git://git.openstreetmap.org/nominatim.git",
59     :database => {
60         :cluster => "9.1/main",
61         :dbname => "nominatim"
62     }
63   }
64 )
65
66 run_list(
67   "recipe[nominatim]"
68 )