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