]> git.openstreetmap.org Git - chef.git/blob - roles/base.rb
imagery: add environment agency night time aerial
[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 => {
31         "net.ipv4.tcp_mtu_probing" => "1",
32         "net.ipv4.tcp_base_mss" => "1024"
33       }
34     },
35     :network_buffers => {
36       :comment => "Tune network buffers",
37       :parameters => {
38         "net.core.rmem_max" => "16777216",
39         "net.core.wmem_max" => "16777216",
40         "net.ipv4.tcp_rmem" => "4096\t87380\t16777216",
41         "net.ipv4.tcp_wmem" => "4096\t65536\t16777216"
42       }
43     },
44     :network_backlog => {
45       :comment => "Increase maximum backlog for incoming network packets",
46       :parameters => { "net.core.netdev_max_backlog" => "2500" }
47     },
48     :network_conntrack_established => {
49       :comment => "Only track established connections for four hours",
50       :parameters => {
51         "net.netfilter.nf_conntrack_tcp_timeout_established" => "14400"
52       }
53     },
54     :tcp_syncookies => {
55       :comment => "Turn on syncookies to protect against SYN floods",
56       :parameters => {
57         "net.ipv4.tcp_syncookies" => "1"
58       }
59     }
60   },
61   :sysfs => {
62     :cpufreq_ondemand => {
63       :comment => "Tune the ondemand CPU frequency governor",
64       :parameters => {
65         "devices/system/cpu/cpufreq/ondemand/up_threshold" => "25",
66         "devices/system/cpu/cpufreq/ondemand/sampling_down_factor" => "100"
67       }
68     }
69   }
70 )
71
72 run_list(
73   "recipe[accounts]",
74   "recipe[apt]",
75   "recipe[chef]",
76   "recipe[devices]",
77   "recipe[hardware]",
78   "recipe[munin]",
79   "recipe[networking]",
80   "recipe[exim]",
81   "recipe[ntp]",
82   "recipe[openssh]",
83   "recipe[sysctl]",
84   "recipe[sysfs]",
85   "recipe[tools]",
86   "recipe[fail2ban]"
87 )