]> git.openstreetmap.org Git - chef.git/blob - roles/planet.rb
Drop roles for thorn-02 and thorn-03
[chef.git] / roles / planet.rb
1 name "planet"
2 description "Role applied to all planet servers"
3
4 default_attributes(
5   :apache => {
6     :mpm => "event",
7     :keepalive => true,
8     :event => {
9       :server_limit => 20,
10       :max_request_workers => 1000,
11       :threads_per_child => 50,
12       :min_spare_threads => 75,
13       :max_spare_threads => 525,
14       :listen_cores_buckets_ratio => 4
15     }
16   },
17   :networking => {
18     :firewall => {
19       :http_connection_limit => 10
20     }
21   },
22   :prometheus => {
23     :files => %w[
24       /store/planet/notes/planet-notes-latest.osn.bz2
25       /store/planet/pbf/planet-latest.osm.pbf
26       /store/planet/planet/changesets-latest.osm.bz2
27       /store/planet/planet/discussions-latest.osm.bz2
28       /store/planet/planet/planet-latest.osm.bz2
29       /store/planet/replication/changesets/state.yaml
30       /store/planet/replication/day/state.txt
31       /store/planet/replication/hour/state.txt
32       /store/planet/replication/minute/state.txt
33     ]
34   },
35   :rsyncd => {
36     :modules => {
37       :planet => {
38         :comment => "Semi public planet.osm archive",
39         :path => "/store/planet",
40         :read_only => true,
41         :write_only => false,
42         :list => true,
43         :uid => "nobody",
44         :gid => "nogroup",
45         :transfer_logging => false,
46         :exclude => [".*"],
47         :max_connections => 10,
48         :ignore_errors => true,
49         :ignore_nonreadable => true,
50         :timeout => 3600,
51         :refuse_options => ["checksum"]
52       },
53       :statistics => {
54         :comment => "Statistics",
55         :path => "/store/planet/statistics",
56         :read_only => false,
57         :write_only => true,
58         :list => false,
59         :uid => "planet",
60         :gid => "planet",
61         :transfer_logging => false,
62         :nodes_allow => "roles:web-statistics"
63       }
64     }
65   }
66 )
67
68 run_list(
69   "role[web-db]",
70   "recipe[planet]",
71   "recipe[planet::replication]",
72   "recipe[rsyncd]"
73 )