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