]> git.openstreetmap.org Git - chef.git/blob - roles/ramoth.rb
Bring the osmbackup account under chef control
[chef.git] / roles / ramoth.rb
1 name "ramoth"
2 description "Master role applied to ramoth"
3
4 default_attributes(
5   :accounts => {
6     :users => {
7       :osmbackup => { :status => :role }
8     }
9   },
10   :db => {
11     :cluster => "9.1/main"
12   },
13   :devices => {
14     :store_openstreetmap => {
15       :comment => "RAID array mounted on /store/postgresql/openstreetmap",
16       :type => "block",
17       :bus => "scsi",
18       :serial => "3600605b0039483a017092ecbe862082a",
19       :attrs => {
20         "queue/scheduler" => "deadline",
21         "queue/nr_requests" => "975"
22       }
23     },
24     :store_system => {
25       :comment => "RAID array mounted on /store/postgresql/system",
26       :type => "block",
27       :bus => "scsi",
28       :serial => "3600605b0039483a017092ff8fa5a6332",
29       :attrs => {
30         "queue/scheduler" => "deadline",
31         "queue/nr_requests" => "975"
32       }
33     }
34   },
35   :networking => {
36     :interfaces => {
37       :internal_ipv4 => {
38         :interface => "eth0",
39         :role => :internal,
40         :family => :inet,
41         :address => "146.179.159.170",
42         :hwaddress => "00:25:90:4b:05:9a"
43       }
44     }
45   },
46   :postgresql => {
47     :settings => {
48       :defaults => {
49         :shared_buffers => "64GB",
50         :work_mem => "64MB",
51         :maintenance_work_mem => "1GB",
52         :effective_cache_size => "180GB"
53       }
54     }
55   },
56   :sysctl => {
57     :postgres => {
58       :comment => "Increase shared memory for postgres",
59       :parameters => { 
60         "kernel.shmmax" => 66 * 1024 * 1024 * 1024,
61         "kernel.shmall" => 66 * 1024 * 1024 * 1024 / 4096
62       }
63     }
64   }
65 );
66
67 run_list(
68   "role[ic]",
69   "role[db-master]",
70   "role[db-backup]"
71 )