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