]> git.openstreetmap.org Git - chef.git/blob - roles/equinix-dub.rb
Move OSUOSL hosts to use interface inheritance for network configuration
[chef.git] / roles / equinix-dub.rb
1 name "equinix-dub"
2 description "Role applied to all servers at Equinix Dublin"
3
4 default_attributes(
5   :sysctl => {
6     :enable_bbr_10g => {
7       :comment => "Enable BBR. Equinix Dub has 10G uplink unlikely to buffer overrun",
8       :parameters => {
9         "net.ipv4.tcp_congestion_control" => "bbr",
10         "net.ipv4.tcp_notsent_lowat" => "16384"
11       }
12     }
13   },
14   :networking => {
15     :interfaces => {
16       :internal => {
17         :interface => "bond0",
18         :role => :internal,
19         :metric => 200,
20         :inet => {
21           :prefix => "20",
22           :gateway => "10.0.64.2",
23           :routes => {
24             "10.0.0.0/8" => { :via => "10.0.64.2" }
25           },
26           :rules => [
27             { :to => "10.0.0.0/8", :table => "main", :priority => 50 },
28             { :to => "172.16.0.0/12", :table => "main", :priority => 50 },
29             { :to => "192.168.0.0/16", :table => "main", :priority => 50 }
30           ]
31         },
32         :bond => {
33           :mode => "802.3ad",
34           :lacprate => "fast",
35           :xmithashpolicy => "layer3+4"
36         }
37       }
38     }
39   },
40   :prometheus => {
41     :metrics => {
42       :host_location => {
43         :help => "Host location",
44         :labels => { :site => "dublin" }
45       }
46     }
47   },
48   :web => {
49     :readonly_database_host => "snap-03.dub.openstreetmap.org"
50   }
51 )
52
53 override_attributes(
54   :networking => {
55     :nameservers => ["10.0.64.2", "74.82.42.42", "2001:470:20::2"],
56     :search => ["dub.openstreetmap.org", "openstreetmap.org"]
57   },
58   :ntp => {
59     :servers => ["0.ie.pool.ntp.org", "1.ie.pool.ntp.org", "europe.pool.ntp.org"]
60   }
61 )
62
63 run_list(
64   "role[ie]"
65 )