]> git.openstreetmap.org Git - chef.git/blob - roles/orm.rb
ebc81821fb3b0fd7f25cdd7377e52ef4c51bb3d4
[chef.git] / roles / orm.rb
1 name "orm"
2 description "Master role applied to orm"
3
4 default_attributes(
5   :devices => {
6     :ssd_samsung => {
7       :comment => "Tune scheduler for SSD",
8       :type => "block",
9       :bus => "ata",
10       :serial => "Samsung_SSD_840_PRO_Series_*",
11       :attrs => {
12         "queue/scheduler" => "noop",
13         "queue/nr_requests" => "256",
14         "queue/read_ahead_kb" => "2048"
15       }
16     },
17     :arecavoltune => {
18       :comment => "Tune scheduler for Areca",
19       :type => "block",
20       :bus => "scsi",
21       :serial => "2001b4d20*",
22       :attrs => {
23         "queue/scheduler" => "deadline",
24         "queue/nr_requests" => "512",
25         "queue/read_ahead_kb" => "2048"
26       }
27     }
28   },
29   :munin => {
30     :plugins => {
31       :ipmi_fans => {
32         :Sys3 => { :graph => "no" },
33         :Sys4 => { :graph => "no" },
34         :Sys5 => { :graph => "no" },
35         :Sys6 => { :graph => "no" },
36         :Sys7 => { :graph => "no" },
37         :Sys8 => { :graph => "no" },
38         :Sys9 => { :graph => "no" },
39         :Sys10 => { :graph => "no" }
40       },
41       :sensors_fan => {
42         :fan3 => { :graph => "no" },
43         :fan4 => { :graph => "no" },
44         :fan5 => { :graph => "no" },
45         :fan6 => { :graph => "no" },
46         :fan7 => { :graph => "no" },
47         :fan8 => { :graph => "no" },
48         :fan9 => { :graph => "no" },
49         :fan10 => { :graph => "no" },
50         :fan11 => { :graph => "no" },
51         :fan12 => { :graph => "no" }
52       },
53       :sensors_volt => {
54         :contacts => "null",
55         :volt6 => {
56           :warning => "2.992:3.536"
57         }
58       }
59     }
60   },
61   :networking => {
62     :interfaces => {
63       :external_ipv4 => {
64         :interface => "eth0",
65         :role => :external,
66         :family => :inet,
67         :address => "193.63.75.98"
68       },
69       :external_ipv6 => {
70         :interface => "eth0",
71         :role => :external,
72         :family => :inet6,
73         :address => "2001:630:12:500:2e0:81ff:fec5:2a8c"
74       }
75     }
76   },
77   :postgresql => {
78     :versions => [ "9.1" ],
79     :settings => {
80       :defaults => {
81         :shared_buffers => "8GB",
82         :maintenance_work_mem => "7144MB",
83         :effective_cache_size => "16GB"
84       }
85     }
86   },
87   :sysctl => {
88     :postgres => {
89       :comment => "Increase shared memory for postgres",
90       :parameters => { 
91         "kernel.shmmax" => 9 * 1024 * 1024 * 1024,
92         "kernel.shmall" => 9 * 1024 * 1024 * 1024 / 4096
93       }
94     }
95   },
96   :tile => {
97     :node_file => "/store/database/nodes",
98     :styles => {
99       :default => {
100         :tile_directories => [
101           { :name => "/store/tiles/default-low", :min_zoom => 0, :max_zoom => 17 },
102           { :name => "/store/tiles/default-high", :min_zoom => 18, :max_zoom => 19 }
103         ]
104       }
105     }
106   }
107 )
108
109 override_attributes(
110   :networking => {
111     :nameservers => [ "8.8.8.8", "8.8.4.4" ]
112   }
113 )
114
115 run_list(
116   "role[ic]",
117   "role[tile]"
118 )