# Nominatim Cookbook
This cookbook installs and configures the Nominatim geocoding service.
-
-It contains three recipes:
-* default: sets up a complete Nominatim installation including postgres backend
- and apache frontend
-* master: defines additional attributes for running the server as DB master
-* slave: defines additional attributes for running the server as DB slave
mode "664"
end
-# exception granted for a limited time so that they can set up their own server
-firewall_rule "increase-limits-gnome-proxy" do
- action :accept
- family "inet"
- source "net:8.43.85.23"
- dest "fw"
- proto "tcp:syn"
- dest_ports "https"
- rate_limit "s:10/sec:30"
-end
-
## Postgresql
include_recipe "postgresql"
notifies :reload, "service[nginx]"
end
-package "apache2" do
- action :remove
-end
-
include_recipe "nginx"
nginx_site "default" do
:accounts => {
:users => {
:lonvia => { :status => :administrator },
- :twain => { :status => :administrator },
:nominatim => {
:status => :role,
- :members => [:lonvia, :tomh, :twain]
+ :members => [:lonvia, :tomh]
}
}
},
- :apache => {
- :mpm => "event",
- :timeout => 30,
- :keepalive => false,
- :reqtimeout => true,
- :event => {
- :server_limit => 100,
- :max_request_workers => 2400,
- :threads_per_child => 50,
- :min_spare_threads => 125,
- :max_spare_threads => 925,
- :async_request_worker_factor => 4,
- :listen_cores_buckets_ratio => 6
- }
- },
:networking => {
:firewall => {
:http_rate_limit => "s:2/sec:15"
}
}
},
- :apache => {
- :event => {
- :max_request_workers => 3000,
- :threads_per_child => 70
- }
- },
:nominatim => {
:state => "standalone",
:dbadmins => %w[lonvia tomh],