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