]> git.openstreetmap.org Git - chef.git/blob - roles/tile.rb
907b1ae8810386b65a2d2abe206ae8a5f3192e60
[chef.git] / roles / tile.rb
1 name "tile"
2 description "Role applied to all tile servers"
3
4 default_attributes(
5   :accounts => {
6     :users => {
7       :tile => {
8         :status => :role,
9         :members => [:jburgess, :tomh]
10       }
11     }
12   },
13   :apache => {
14     :mpm => "event",
15     :timeout => 60,
16     :event => {
17       :server_limit => 60,
18       :max_clients => 1200,
19       :threads_per_child => 20,
20       :min_spare_threads => 30,
21       :max_spare_threads => 180,
22       :max_requests_per_child => 100000
23     }
24   },
25   :postgresql => {
26     :versions => ["9.1"],
27     :settings => {
28       :defaults => {
29         :temp_buffers => "32MB",
30         :work_mem => "128MB",
31         :wal_buffers => "1024kB",
32         :wal_writer_delay => "500ms",
33         :commit_delay => "10000",
34         :checkpoint_segments => "60"
35       }
36     }
37   },
38   :sysctl => {
39     :sockets => {
40       :comment => "Increase size of connection queue",
41       :parameters => {
42         "net.core.somaxconn" => 10000
43       }
44     },
45     :kernel_scheduler_tune => {
46       :comment => "Tune kernel scheduler preempt",
47       :parameters => {
48         "kernel.sched_min_granularity_ns" => 10000000,
49         "kernel.sched_wakeup_granularity_ns" => 15000000
50       }
51     }
52   },
53   :tile => {
54     :database => {
55       :cluster => "9.1/main"
56     },
57     :data => {
58       :world_boundaries => {
59         :url => "http://planet.openstreetmap.org/historical-shapefiles/world_boundaries-spherical.tgz"
60       },
61       :simplified_land_polygons => {
62         :url => "http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip",
63         :refresh => true
64       },
65       :admin_boundaries => {
66         :url => "http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_boundary_lines_land.zip",
67         :directory => "ne_110m_admin_0_boundary_lines_land"
68       },
69       :populated_places => {
70         :url => "http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip",
71         :directory => "ne_10m_populated_places",
72         :original => "ne_10m_populated_places.shp",
73         :processed => "ne_10m_populated_places_fixed.shp"
74       },
75       :land_polygons => {
76         :url => "http://data.openstreetmapdata.com/land-polygons-split-3857.zip",
77         :refresh => true
78       }
79     },
80     :styles => {
81       :default => {
82         :repository => "git://github.com/gravitystorm/openstreetmap-carto.git",
83         :revision => "v2.29.1",
84         :max_zoom => 19
85       }
86     }
87   }
88 )
89
90 run_list(
91   "recipe[tile]"
92 )