]> git.openstreetmap.org Git - chef.git/blob - roles/longma.rb
Match number of apache workers on tile servers to the CPU count
[chef.git] / roles / longma.rb
1 name "longma"
2 description "Master role applied to longma"
3
4 default_attributes(
5   :networking => {
6     :interfaces => {
7       :internal => {
8         :interface => "bond0",
9         :role => :internal,
10         :inet => {
11           :address => "10.0.64.13"
12         },
13         :bond => {
14           :mode => "802.3ad",
15           :lacprate => "fast",
16           :xmithashpolicy => "layer3+4",
17           :slaves => %w[enp68s0f0 enp68s0f1 enp68s0f2 enp68s0f3]
18         }
19       },
20       :external => {
21         :interface => "bond0.101",
22         :role => :external,
23         :inet => {
24           :address => "184.104.226.109"
25         },
26         :inet6 => {
27           :address => "2001:470:1:b3b::d"
28         }
29       }
30     }
31   },
32   :postgresql => {
33     :versions => ["14"],
34     :settings => {
35       :defaults => {
36         :max_connections => "550",
37         :work_mem => "240MB",
38         :fsync => "on",
39         :effective_io_concurrency => "500"
40       }
41     }
42   },
43   :nominatim => {
44     :state => "standalone",
45     :dbcluster => "14/main",
46     :postgis => "3",
47     :enable_qa_tiles => true,
48     :flatnode_file => "/ssd/nominatim/nodes.store",
49     :logdir => "/ssd/nominatim/log",
50     :api_flavour => "python",
51     :api_workers => 24,
52     :api_pool_size => 10,
53     :fpm_pools => {
54       "nominatim.openstreetmap.org" => {
55         :max_children => 200
56       }
57     },
58     :config => {
59       :forward_dependencies => "yes"
60     }
61   }
62 )
63
64 run_list(
65   "role[equinix-dub]",
66   "role[nominatim]"
67 )