]> git.openstreetmap.org Git - chef.git/blob - roles/db.rb
Update carto stylesheet to v2.22.0
[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   :munin => {
14     :plugins => {
15       :postgres_connections_openstreetmap => {
16         :waiting => { 
17           :warning => 10,
18           :critical => 20
19         }
20       },
21       :postgres_locks_openstreetmap => {
22         :accesssharelock => { 
23           :warning => 900,
24           :critical => 1000
25         },
26         :rowexclusivelock => { 
27           :warning => 250,
28           :critical => 300
29         }
30       }
31     }
32   },
33   :nfs => {
34     "/store/rails" => { :host => "ironbelly", :path => "/store/rails" }
35   },
36   :postgresql => {
37     :versions => [ "9.1" ],
38     :settings => {
39       :defaults => {
40         :listen_addresses => "*",
41         :max_connections => "500",
42         :max_stack_depth => "7MB",
43         :checkpoint_segments => "32",
44         :checkpoint_completion_target => "0.8",
45         :cpu_tuple_cost => "0.1",
46         :late_authentication_rules => [
47           { :address => "146.179.159.160/27" }
48         ]
49       }
50     }
51   },
52   :sysctl => {
53     :swappiness => {
54       :comment => "Only swap in an emergency",
55       :parameters => {
56         "vm.swappiness" => 0
57       }
58     }
59   }
60 )
61
62 run_list(
63   "recipe[nfs]"
64 )