]> git.openstreetmap.org Git - chef.git/blob - roles/db.rb
zstd - add 1 additional fix
[chef.git] / roles / db.rb
1 name "db"
2 description "Role applied to all database servers"
3
4 default_attributes(
5   :apt => {
6     :unattended_upgrades => {
7       :enable => false
8     }
9   },
10   :postgresql => {
11     :settings => {
12       :defaults => {
13         :listen_addresses => "*",
14         :max_connections => "1500",
15         :max_stack_depth => "7MB",
16         :wal_level => "logical",
17         :max_wal_size => "1536MB",
18         :checkpoint_completion_target => "0.8",
19         :cpu_tuple_cost => "0.1",
20         :jit => "off",
21         :log_min_duration_statement => "1000",
22         :late_authentication_rules => [
23           { :address => "10.0.48.0/20" }, # amsterdam
24           { :address => "10.0.64.0/20" }, # dublin
25           { :database => "replication", :user => "replication", :address => "10.0.0.4/32" },   # snap-02
26           { :database => "replication", :user => "replication", :address => "10.0.0.10/32" },  # eddie
27           { :database => "replication", :user => "replication", :address => "10.0.48.49/32" }, # snap-01
28           { :database => "replication", :user => "replication", :address => "10.0.48.50/32" }, # karm
29           { :database => "replication", :user => "replication", :address => "10.0.64.50/32" }  # snap-03
30         ]
31       }
32     }
33   },
34   :sysctl => {
35     :swappiness => {
36       :comment => "Only swap in an emergency",
37       :parameters => {
38         "vm.swappiness" => 0
39       }
40     }
41   }
42 )