]> git.openstreetmap.org Git - chef.git/blob - roles/db-master.rb
Configure max_wal_senders on slaves to match the master
[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-g wal-push %p --walg-prevent-wal-overwrite=true",
11         :max_replication_slots => "1",
12         :late_authentication_rules => [
13           { :database => "replication", :user => "replication", :address => "10.0.0.4/32" },   # snap-02
14           { :database => "replication", :user => "replication", :address => "10.0.0.10/32" },  # eddie
15           { :database => "replication", :user => "replication", :address => "10.0.32.40/32" }, # katla
16           { :database => "replication", :user => "replication", :address => "10.0.48.49/32" }, # snap-01
17           { :database => "replication", :user => "replication", :address => "10.0.48.50/32" }, # karm
18           { :database => "replication", :user => "replication", :address => "10.0.64.50/32" }  # snap-03
19         ]
20       }
21     }
22   }
23 )
24
25 run_list(
26   "role[db]",
27   "recipe[db::master]",
28   "recipe[rsyncd]"
29 )