]> git.openstreetmap.org Git - chef.git/blob - roles/horntail.rb
Add a db::backup recipe to handle database backups
[chef.git] / roles / horntail.rb
1 name "horntail"
2 description "Master role applied to horntail"
3
4 default_attributes(
5   :accounts => {
6     :users => {
7       :osmbackup => { :status => :role },
8       :gravitystorm => { :status => :user }
9     }
10   },
11   :munin => {
12     :plugins => {
13       :ipmi_fans => {
14         :FAN1 => { :graph => "no" },
15         :FAN2 => { :graph => "no" },
16         :FAN3 => { :graph => "no" },
17         :FAN4 => { :graph => "no" },
18         :FAN5 => { :graph => "no" }
19       },
20       :sensors_fan => {
21         :fan1 => { :graph => "no" },
22         :fan2 => { :graph => "no" },
23         :fan3 => { :graph => "no" },
24         :fan4 => { :graph => "no" },
25         :fan5 => { :graph => "no" },
26         :fan6 => { :graph => "no" },
27         :fan9 => { :graph => "no" },
28         :fan10 => { :graph => "no" }
29       },
30       :sensors_volt => {
31         :contacts => "null",
32         :volt1 => {
33           :warning => "1.316:1.484",
34           :critical => "1.26:1.54"
35         },
36         :volt3 => {
37           :warning => "1.1:2.0",
38           :critical => "1.0:3.0"
39         },
40          :volt4 => {
41           :warning => "11.0:13.0",
42           :critical => "10.5:13.5"
43         }
44       }
45     }
46   },
47   :networking => {
48     :interfaces => {
49       :external_ipv4 => {
50         :interface => "eth0",
51         :role => :external,
52         :family => :inet,
53         :address => "193.63.75.101"
54       },
55       :external_ipv6 => {
56         :interface => "eth0",
57         :role => :external,
58         :family => :inet6,
59         :address => "2001:630:12:500:202:b3ff:feec:eeac"
60       },
61       :internal_ipv4 => {
62         :interface => "eth1",
63         :role => :internal,
64         :family => :inet,
65         :address => "146.179.159.164"
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     }
80   },
81   :rsyncd => {
82     :modules => {
83       :hosts => {
84         :comment => "Host data",
85         :path => "/home/hosts",
86         :read_only => true,
87         :write_only => false,
88         :list => false,
89         :uid => "tomh",
90         :gid => "tomh",
91         :transfer_logging => false,
92         :hosts_allow => [ 
93           "89.16.179.150",                       # shenron
94           "2001:41c8:10:996:21d:7dff:fec3:df70", # shenron
95           "212.159.112.221"                      # grant
96         ]
97       },
98       :logs => {
99         :comment => "Log files",
100         :path => "/store/logs",
101         :read_only => false,
102         :write_only => true,
103         :list => false,
104         :uid => "www-data",
105         :gid => "www-data",
106         :transfer_logging => false,
107         :hosts_allow => [
108           "128.40.168.0/24",      # ucl external
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       },
116       :backup => {
117         :comment => "Backups",
118         :path => "/store/backup",
119         :read_only => false,
120         :write_only => true,
121         :list => false,
122         :uid => "osmbackup",
123         :gid => "osmbackup",
124         :transfer_logging => false,
125         :hosts_allow => [
126           "128.40.168.0/24",      # ucl external
127           "146.179.159.160/27",   # ic internal
128           "193.63.75.96/27",      # ic external
129           "2001:630:12:500::/64", # ic external
130           "127.0.0.0/8",          # localhost
131           "::1"                   # localhost
132         ]
133       }
134     }
135   }
136 );
137
138 run_list(
139   "role[ic]",
140   "role[gateway]",
141   "role[chef-server]",
142   "role[chef-repository]",
143   "role[planet]",
144   "role[stats]",
145   "role[web-storage]",
146   "recipe[rsyncd]",
147   "recipe[openvpn]"
148 )