]> git.openstreetmap.org Git - chef.git/blob - roles/nominatim.rb
Tell machines at IC to use ironbelly as the gateway
[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       :max_clients => 560,
21       :threads_per_child => 35
22     }
23   },
24   :apt => {
25     :sources => [ "ubuntugis-stable", "ubuntugis-unstable" ]
26   },
27   :postgresql => {
28     :versions => [ "9.1" ],
29     :settings => {
30       :defaults => {
31         :max_connections => "450",
32         :synchronous_commit => "off",
33         :checkpoint_segments => "50",
34         :checkpoint_timeout => "10min",
35         :checkpoint_completion_target => "0.9",
36         :autovacuum_max_workers => "1"
37       }
38     }
39   },
40   :sysctl => {
41     :postgres => {
42       :comment => "Increase shared memory for postgres",
43       :parameters => { 
44         "kernel.shmmax" => 16 * 1024 * 1024 * 1024,
45         "kernel.shmall" => 16 * 1024 * 1024 * 1024 / 4096
46       }
47     }
48   },
49   :nominatim => {
50     :repository => "git://git.openstreetmap.org/nominatim.git",
51     :database => {
52         :cluster => "9.1/main",
53         :dbname => "nominatim"
54     },
55     :fpm_pools => {
56         :www => {
57             :pm => "dynamic",
58             :max_children => "50"
59         },
60         :bulk => {
61             :pm => "static",
62             :max_children => "7"
63         }
64     }
65   }
66 )
67
68 run_list(
69   "recipe[nominatim]"
70 )