]> git.openstreetmap.org Git - chef.git/blob - roles/db-master.rb
imagery: next gb_os_sv_diff layer available
[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     :versions => ["9.1"],
7     :settings => {
8       :defaults => {
9         :wal_level => "hot_standby",
10         :archive_mode => "on",
11         :archive_command => "/bin/cp %p /store/postgresql/archive/%f",
12         :max_wal_senders => "2",
13         :late_authentication_rules => [
14           { :database => "replication", :user => "replication", :address => "146.179.159.168/32" },
15           { :database => "replication", :user => "replication", :address => "146.179.159.170/32" },
16           { :database => "replication", :user => "replication", :address => "10.0.16.4/32" }
17         ]
18       }
19     }
20   },
21   :rsyncd => {
22     :modules => {
23       :archive => {
24         :comment => "WAL Archive",
25         :path => "/store/arrays/slow/postgresql-archive",
26         :read_only => true,
27         :write_only => false,
28         :list => false,
29         :uid => "postgres",
30         :gid => "postgres",
31         :transfer_logging => false,
32         :hosts_allow => [
33           "146.179.159.168", "146.179.159.170, 10.0.16.4"
34         ]
35       }
36     }
37   }
38 )
39
40 run_list(
41   "role[db]",
42   "recipe[db::master]",
43   "recipe[rsyncd]"
44 )