]> git.openstreetmap.org Git - chef.git/blob - roles/tile.rb
Revert "Move db-backup role to eddie"
[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_request_workers => 1200,
19       :threads_per_child => 20,
20       :min_spare_threads => 300,
21       :max_spare_threads => 1200,
22       :max_connections_per_child => 0,
23       :async_request_worker_factor => 4
24     }
25   },
26   :munin => {
27     :plugins => {
28       :renderd_processed => {
29         :graph_order => "reqPrio req reqLow dirty reqBulk dropped",
30         :reqPrio => { :draw => "AREA" },
31         :req => { :draw => "STACK" }
32       }
33     }
34   },
35   :postgresql => {
36     :settings => {
37       :defaults => {
38         :temp_buffers => "32MB",
39         :work_mem => "128MB",
40         :wal_buffers => "1024kB",
41         :wal_writer_delay => "500ms",
42         :commit_delay => "10000",
43         :checkpoint_segments => "60",
44         :max_wal_size => "2880MB",
45         :random_page_cost => "1.1",
46         :track_activity_query_size => "16384",
47         :autovacuum_vacuum_scale_factor => "0.05",
48         :autovacuum_analyze_scale_factor => "0.02"
49       }
50     }
51   },
52   :sysctl => {
53     :sockets => {
54       :comment => "Increase size of connection queue",
55       :parameters => {
56         "net.core.somaxconn" => 10000
57       }
58     },
59     :kernel_scheduler_tune => {
60       :comment => "Tune kernel scheduler preempt",
61       :parameters => {
62         "kernel.sched_min_granularity_ns" => 10000000,
63         "kernel.sched_wakeup_granularity_ns" => 15000000
64       }
65     }
66   },
67   :tile => {
68     :data => {
69       :world_boundaries => {
70         :url => "https://planet.openstreetmap.org/historical-shapefiles/world_boundaries-spherical.tgz"
71       },
72       :simplified_land_polygons => {
73         :url => "http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip",
74         :refresh => true
75       },
76       :admin_boundaries => {
77         :url => "http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_boundary_lines_land.zip",
78         :directory => "ne_110m_admin_0_boundary_lines_land"
79       },
80       :land_polygons => {
81         :url => "http://data.openstreetmapdata.com/land-polygons-split-3857.zip",
82         :refresh => true
83       },
84       :antarctica_icesheet_polygons => {
85         :url => "http://data.openstreetmapdata.com/antarctica-icesheet-polygons-3857.zip",
86         :refresh => true
87       },
88       :antarctica_icesheet_outlines => {
89         :url => "http://data.openstreetmapdata.com/antarctica-icesheet-outlines-3857.zip",
90         :refresh => true
91       }
92     },
93     :styles => {
94       :default => {
95         :repository => "git://github.com/gravitystorm/openstreetmap-carto.git",
96         :revision => "v4.11.0",
97         :max_zoom => 19
98       }
99     }
100   }
101 )
102
103 run_list(
104   "recipe[tile]"
105 )