]> git.openstreetmap.org Git - chef.git/blob - roles/ironbelly.rb
Use postgres 10 and postgis 2.4 on scorch
[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   :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             }
21           }
22         }
23       }
24     },
25     :path => {
26       :data => "/store/elasticsearch"
27     }
28   },
29   :munin => {
30     :graphs => {
31       :apcpdu_ams => {
32         :title => "Current for Amsterdam",
33         :vlabel => "Amps",
34         :category => "Ups",
35         :values => {
36           :load => {
37             :sum => ["apcpdu_pdu1.load", "apcpdu_pdu2.load"],
38             :label => "Load"
39           }
40         }
41       }
42     }
43   },
44   :networking => {
45     :interfaces => {
46       :internal_ipv4 => {
47         :interface => "bond0",
48         :role => :internal,
49         :family => :inet,
50         :address => "10.0.48.10",
51         :bond => {
52           :slaves => %w[eth0 eth1]
53         }
54       },
55       :external_ipv4 => {
56         :interface => "bond0.2",
57         :role => :external,
58         :family => :inet,
59         :address => "130.117.76.10"
60       },
61       :external_ipv6 => {
62         :interface => "bond0.2",
63         :role => :external,
64         :family => :inet6,
65         :address => "2001:978:2:2C::172:A"
66       }
67     }
68   },
69   :openvpn => {
70     :address => "10.0.16.2",
71     :tunnels => {
72       :ic2ucl => {
73         :port => "1194",
74         :mode => "server",
75         :peer => {
76           :host => "ridley.openstreetmap.org"
77         }
78       },
79       :aws2ic => {
80         :port => "1195",
81         :mode => "server",
82         :peer => {
83           :host => "fafnir.openstreetmap.org"
84         }
85       },
86       :ic2bm => {
87         :port => "1196",
88         :mode => "client",
89         :peer => {
90           :host => "grisu.openstreetmap.org",
91           :port => "1194"
92         }
93       }
94     }
95   },
96   :planet => {
97     :replication => "disabled"
98   },
99   :rsyncd => {
100     :modules => {
101       :hosts => {
102         :comment => "Host data",
103         :path => "/home/hosts",
104         :read_only => true,
105         :write_only => false,
106         :list => false,
107         :uid => "tomh",
108         :gid => "tomh",
109         :transfer_logging => false,
110         :hosts_allow => [
111           "212.110.172.32",                      # shenron
112           "2001:41c9:1:400::32",                 # shenron
113           "212.159.112.221"                      # grant
114         ]
115       },
116       :logs => {
117         :comment => "Log files",
118         :path => "/store/logs",
119         :read_only => false,
120         :write_only => true,
121         :list => false,
122         :uid => "www-data",
123         :gid => "www-data",
124         :transfer_logging => false,
125         :hosts_allow => [
126           "193.60.236.0/24",          # ucl external
127           "10.0.48.0/20",             # equinix internal
128           "130.117.76.0/27",          # equinix external
129           "2001:978:2:2C::172:0/112", # equinix external
130           "10.0.32.0/20",             # bytemark internal
131           "89.16.162.16/28",          # bytemark external
132           "2001:41c9:2:d6::/64",      # bytemark external
133           "127.0.0.0/8",              # localhost
134           "::1"                       # localhost
135         ],
136         :nodes_allow => "roles:tilecache"
137       }
138     }
139   }
140 )
141
142 run_list(
143   "role[equinix]",
144   "role[gateway]",
145   "role[web-storage]",
146   "role[supybot]",
147   "role[backup]",
148   "role[stats]",
149   "role[planet]",
150   # "role[planetdump]",
151   "role[logstash]",
152   "recipe[rsyncd]",
153   "recipe[dhcpd]",
154   "recipe[openvpn]",
155   "recipe[tilelog]"
156 )