]> git.openstreetmap.org Git - chef.git/blob - roles/db-master.rb
Move promscale tuning to role and tune WAL sizes
[chef.git] / roles / db-master.rb
1 name "db-master"
2 description "Role applied to all the master database server"
3
4 default_attributes(
5   :postgresql => {
6     :settings => {
7       :defaults => {
8         :wal_level => "logical",
9         :archive_mode => "on",
10         :archive_command => "/usr/local/bin/openstreetmap-wal-e --terse wal-push %p",
11         :max_wal_senders => "3",
12         :max_replication_slots => "1",
13         :late_authentication_rules => [
14           { :database => "replication", :user => "replication", :address => "10.0.48.49/32" },
15           { :database => "replication", :user => "replication", :address => "10.0.48.50/32" },
16           { :database => "replication", :user => "replication", :address => "10.0.48.5/32" },
17           { :database => "replication", :user => "replication", :address => "10.0.0.10/32" },
18           { :database => "replication", :user => "replication", :address => "10.0.32.40/32" }
19         ]
20       }
21     }
22   }
23 )
24
25 run_list(
26   "role[db]",
27   "recipe[db::master]",
28   "recipe[rsyncd]"
29 )