]> git.openstreetmap.org Git - chef.git/blob - roles/base.rb
Apply the chef-server and chef-repository roles to ironbelly
[chef.git] / roles / base.rb
1 name "base"
2 description "Base role applied to all servers"
3
4 default_attributes(
5   :accounts => {
6     :users => {
7       :grant => { :status => :administrator },
8       :tomh => { :status => :administrator },
9       :matt => { :status => :administrator },
10       :jburgess => { :status => :administrator }
11     }
12   },
13   :apt => {
14     :sources => [ "openstreetmap" ]
15   },
16   :networking => {
17     :roles => {
18       :internal => { :metric => 200, :zone => "loc" },
19       :external => { :metric => 100 }
20     },
21     :search => [ "openstreetmap.org" ]
22   },
23   :sysctl => {
24     :panic => {
25       :comment => "Reboot automatically after a panic",
26       :parameters => { "kernel.panic" => "60" }
27     },
28     :blackhole => {
29       :comment => "Do TCP level MTU probing if we seem to have an ICMP blackhole",
30       :parameters => { "net.ipv4.tcp_mtu_probing" => "1" }
31     },
32     :network_buffers => {
33       :comment => "Tune network buffers",
34       :parameters => { 
35         "net.core.rmem_max" => "16777216",
36         "net.core.wmem_max" => "16777216",
37         "net.ipv4.tcp_rmem" => "4096\t87380\t16777216",
38         "net.ipv4.tcp_wmem" => "4096\t65536\t16777216"
39       }
40     },
41     :network_backlog => {
42       :comment => "Increase maximum backlog for incoming network packets",
43       :parameters => { "net.core.netdev_max_backlog" => "2500" }
44     },
45     :network_conntrack_established => {
46       :comment => "Only track established connections for four hours",
47       :parameters => { 
48         "net.netfilter.nf_conntrack_tcp_timeout_established" => "14400"
49       }
50     },
51     :tcp_syncookies => {
52       :comment => "Turn on syncookies to protect against SYN floods",
53       :parameters => {
54         "net.ipv4.tcp_syncookies" => "1"
55       }
56     }
57   },
58   :sysfs => {
59     :cpufreq_ondemand => {
60       :comment => "Tune the ondemand CPU frequency governor",
61       :parameters => {
62         "devices/system/cpu/cpufreq/ondemand/up_threshold" => "25",
63         "devices/system/cpu/cpufreq/ondemand/sampling_down_factor" => "10"
64       }
65     }
66   }
67 )
68
69 run_list(
70   "recipe[accounts]",
71   "recipe[apt]",
72   "recipe[chef]",
73   "recipe[devices]",
74   "recipe[hardware]",
75   "recipe[munin]",
76   "recipe[networking]",
77   "recipe[exim]",
78   "recipe[ntp]",
79   "recipe[openssh]",
80   "recipe[sysctl]",
81   "recipe[sysfs]",
82   "recipe[tools]"
83 )