]> git.openstreetmap.org Git - chef.git/blob - roles/ironbelly.rb
0cdc647e1d4b16622b54a4f1dead9a868ccc763f
[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   :elasticsearch => {
9     :cluster => {
10       :routing => {
11         :allocation => {
12           :disk => {
13             :watermark => {
14               :low => "95%",
15               :high => "98%"
16             }
17           }
18         }
19       }
20     },
21     :path => {
22       :data => "/store/elasticsearch"
23     }
24   },
25   :git => {
26     :allowed_nodes => "*:*",
27     :user => "chefrepo",
28     :group => "chefrepo",
29     :backup => "chef-git"
30   },
31   :networking => {
32     :interfaces => {
33       :internal_ipv4 => {
34         :interface => "eth0",
35         :role => :internal,
36         :family => :inet,
37         :address => "146.179.159.177"
38       },
39       :external_ipv4 => {
40         :interface => "eth1",
41         :role => :external,
42         :family => :inet,
43         :address => "193.63.75.107"
44       },
45       :external_ipv6 => {
46         :interface => "eth1",
47         :role => :external,
48         :family => :inet6,
49         :address => "2001:630:12:500:225:90ff:fec4:f6ef"
50       }
51     }
52   },
53   :openvpn => {
54     :address => "10.0.16.2",
55     :tunnels => {
56       :ic2ucl => {
57         :port => "1194",
58         :mode => "server",
59         :peer => {
60           :host => "ridley.openstreetmap.org"
61         }
62       },
63       :aws2ic => {
64         :port => "1195",
65         :mode => "server",
66         :peer => {
67           :host => "fafnir.openstreetmap.org"
68         }
69       },
70       :ic2bm => {
71         :port => "1196",
72         :mode => "client",
73         :peer => {
74           :host => "grisu.openstreetmap.org",
75           :port => "1194"
76         }
77       }
78     }
79   },
80   :rsyncd => {
81     :modules => {
82       :hosts => {
83         :comment => "Host data",
84         :path => "/home/hosts",
85         :read_only => true,
86         :write_only => false,
87         :list => false,
88         :uid => "tomh",
89         :gid => "tomh",
90         :transfer_logging => false,
91         :hosts_allow => [
92           "212.110.172.32",                      # shenron
93           "2001:41c9:1:400::32",                 # shenron
94           "212.159.112.221"                      # grant
95         ]
96       },
97       :logs => {
98         :comment => "Log files",
99         :path => "/store/logs",
100         :read_only => false,
101         :write_only => true,
102         :list => false,
103         :uid => "www-data",
104         :gid => "www-data",
105         :transfer_logging => false,
106         :hosts_allow => [
107           "128.40.168.0/24",      # ucl external (wates)
108           "128.40.45.192/27",     # ucl external (wolfson)
109           "146.179.159.160/27",   # ic internal
110           "193.63.75.96/27",      # ic external
111           "2001:630:12:500::/64", # ic external
112           "127.0.0.0/8",          # localhost
113           "::1"                   # localhost
114         ],
115         :nodes_allow => "roles:tilecache"
116       }
117     }
118   }
119 )
120
121 run_list(
122   "role[ic]",
123   "role[gateway]",
124   "role[chef-server]",
125   "role[chef-repository]",
126   "role[web-storage]",
127   "role[supybot]",
128   "role[backup]",
129   "role[stats]",
130   "role[planet]",
131   "role[planetdump]",
132   "role[logstash]",
133   "recipe[rsyncd]",
134   "recipe[openvpn]",
135   "recipe[git::server]",
136   "recipe[tilelog]",
137   "recipe[serverinfo]"
138 )