]> git.openstreetmap.org Git - chef.git/blob - roles/ironbelly.rb
Move remaining planet serving work to norbert
[chef.git] / roles / ironbelly.rb
1 name "ironbelly"
2 description "Master role applied to ironbelly"
3
4 default_attributes(
5   :bind => {
6     :clients => "equinix-ams"
7   },
8   :dhcpd => {
9     :first_address => "10.0.63.1",
10     :last_address => "10.0.63.254"
11   },
12   :elasticsearch => {
13     :cluster => {
14       :routing => {
15         :allocation => {
16           :disk => {
17             :watermark => {
18               :low => "95%",
19               :high => "98%",
20               :flood_stage => "99%"
21             }
22           }
23         }
24       }
25     },
26     :path => {
27       :data => "/store/elasticsearch"
28     }
29   },
30   :networking => {
31     :interfaces => {
32       :internal_ipv4 => {
33         :interface => "bond0",
34         :role => :internal,
35         :family => :inet,
36         :address => "10.0.48.10",
37         :bond => {
38           :mode => "802.3ad",
39           :lacprate => "fast",
40           :xmithashpolicy => "layer3+4",
41           :slaves => %w[eth0 eth1]
42         }
43       },
44       :external_ipv4 => {
45         :interface => "bond0.2",
46         :role => :external,
47         :family => :inet,
48         :address => "130.117.76.10"
49       },
50       :external_ipv6 => {
51         :interface => "bond0.2",
52         :role => :external,
53         :family => :inet6,
54         :address => "2001:978:2:2C::172:A"
55       }
56     }
57   },
58   :prometheus => {
59     :snmp => {
60       "pdu1" => { :address => "10.0.48.100", :modules => %w[apcups], :labels => { "site" => "amsterdam" } },
61       "pdu2" => { :address => "10.0.48.101", :modules => %w[apcups], :labels => { "site" => "amsterdam" } },
62       "switch1" => { :address => "130.117.76.2", :modules => %w[if_mib juniper_ex4300], :labels => { "site" => "amsterdam" } }
63     },
64     :metrics => {
65       :uplink_interface => {
66         :help => "Site uplink interface name",
67         :labels => { :site => "amsterdam", :name => "ge-[01]/2/0" }
68       }
69     }
70   },
71   :rsyncd => {
72     :modules => {
73       :logs => {
74         :comment => "Log files",
75         :path => "/store/logs",
76         :read_only => false,
77         :write_only => true,
78         :list => false,
79         :uid => "www-data",
80         :gid => "www-data",
81         :transfer_logging => false,
82         :hosts_allow => [
83           "193.60.236.0/24",          # ucl external
84           "10.0.48.0/20",             # amsterdam internal
85           "130.117.76.0/27",          # amsterdam external
86           "2001:978:2:2C::172:0/112", # amsterdam external
87           "10.0.64.0/20",             # dublin internal
88           "184.104.226.96/27",        # dublin external
89           "2001:470:1:b3b::/64",      # dublin external
90           "10.0.32.0/20",             # bytemark internal
91           "89.16.162.16/28",          # bytemark external
92           "2001:41c9:2:d6::/64",      # bytemark external
93           "127.0.0.0/8",              # localhost
94           "::1"                       # localhost
95         ]
96       }
97     }
98   }
99 )
100
101 run_list(
102   "role[equinix-ams]",
103   "role[gateway]",
104   "role[supybot]",
105   "recipe[rsyncd]",
106   "recipe[dhcpd]"
107 )