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