]> git.openstreetmap.org Git - chef.git/blob - roles/ironbelly.rb
Increase replication slots
[chef.git] / roles / ironbelly.rb
1 name "ironbelly"
2 description "Master role applied to ironbelly"
3
4 default_attributes(
5   :apt => {
6     :sources => ["ubuntugis-unstable"]
7   },
8   :bind => {
9     :clients => "equinix"
10   },
11   :dhcpd => {
12     :first_address => "10.0.63.1",
13     :last_address => "10.0.63.254"
14   },
15   :elasticsearch => {
16     :cluster => {
17       :routing => {
18         :allocation => {
19           :disk => {
20             :watermark => {
21               :low => "95%",
22               :high => "98%",
23               :flood_stage => "99%"
24             }
25           }
26         }
27       }
28     },
29     :path => {
30       :data => "/store/elasticsearch"
31     }
32   },
33   :networking => {
34     :interfaces => {
35       :internal_ipv4 => {
36         :interface => "bond0",
37         :role => :internal,
38         :family => :inet,
39         :address => "10.0.48.10",
40         :bond => {
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   :planet => {
59     :replication => "enabled"
60   },
61   :prometheus => {
62     :snmp => {
63       "pdu1" => { :address => "10.0.48.100", :module => "apcups", :labels => { "site" => "amsterdam" } },
64       "pdu2" => { :address => "10.0.48.101", :module => "apcups", :labels => { "site" => "amsterdam" } },
65       "switch1" => { :address => "130.117.76.2", :module => "if_mib", :labels => { "site" => "amsterdam" } }
66     }
67   },
68   :rsyncd => {
69     :modules => {
70       :hosts => {
71         :comment => "Host data",
72         :path => "/home/hosts",
73         :read_only => true,
74         :write_only => false,
75         :list => false,
76         :uid => "tomh",
77         :gid => "tomh",
78         :transfer_logging => false,
79         :hosts_allow => [
80           "212.110.172.32",                      # shenron
81           "2001:41c9:1:400::32",                 # shenron
82           "212.159.112.221"                      # grant
83         ]
84       },
85       :logs => {
86         :comment => "Log files",
87         :path => "/store/logs",
88         :read_only => false,
89         :write_only => true,
90         :list => false,
91         :uid => "www-data",
92         :gid => "www-data",
93         :transfer_logging => false,
94         :hosts_allow => [
95           "193.60.236.0/24",          # ucl external
96           "10.0.48.0/20",             # equinix internal
97           "130.117.76.0/27",          # equinix external
98           "2001:978:2:2C::172:0/112", # equinix external
99           "10.0.32.0/20",             # bytemark internal
100           "89.16.162.16/28",          # bytemark external
101           "2001:41c9:2:d6::/64",      # bytemark external
102           "127.0.0.0/8",              # localhost
103           "::1"                       # localhost
104         ],
105         :nodes_allow => "roles:tilecache"
106       }
107     }
108   }
109 )
110
111 run_list(
112   "role[equinix]",
113   "role[gateway]",
114   "role[web-storage]",
115   "role[supybot]",
116   "role[backup]",
117   "role[planet]",
118   "role[planetdump]",
119   "recipe[rsyncd]",
120   "recipe[dhcpd]",
121   "recipe[tilelog]"
122 )