]> git.openstreetmap.org Git - chef.git/blob - roles/odin.rb
Push external network config in Amsterdam down to the hosts
[chef.git] / roles / odin.rb
1 name "odin"
2 description "Master role applied to odin"
3
4 default_attributes(
5   :networking => {
6     :interfaces => {
7       :internal => {
8         :interface => "bond0",
9         :role => :internal,
10         :inet => {
11           :address => "10.0.48.15"
12         },
13         :bond => {
14           :mode => "802.3ad",
15           :lacprate => "fast",
16           :xmithashpolicy => "layer3+4",
17           :slaves => %w[eno1 eno2]
18         }
19       },
20       :external => {
21         :interface => "bond0.2",
22         :role => :external,
23         :inet => {
24           :address => "130.117.76.15",
25           :prefix => "27",
26           :gateway => "130.117.76.1"
27         },
28         :inet6 => {
29           :address => "2001:978:2:2c::172:f",
30           :prefix => "64",
31           :gateway => "2001:978:2:2c::172:1",
32           :routes => {
33             "2001:470:1:b3b::/64" => { :type => "unreachable" }
34           }
35         }
36       }
37     }
38   },
39   :postgresql => {
40     :settings => {
41       :defaults => {
42         :shared_buffers => "8GB",
43         :maintenance_work_mem => "7144MB",
44         :effective_cache_size => "16GB"
45       }
46     }
47   },
48   :sysctl => {
49     :postgres => {
50       :comment => "Increase shared memory for postgres",
51       :parameters => {
52         "kernel.shmmax" => 9 * 1024 * 1024 * 1024,
53         "kernel.shmall" => 9 * 1024 * 1024 * 1024 / 4096
54       }
55     }
56   },
57   :tile => {
58     :database => {
59       :cluster => "14/main",
60       :postgis => "3"
61     },
62     :mapnik => "3.1",
63     :styles => {
64       :default => {
65         :tile_directories => [
66           { :name => "/store/tiles/default", :min_zoom => 0, :max_zoom => 19 }
67         ]
68       }
69     }
70   }
71 )
72
73 run_list(
74   "role[equinix-ams]",
75   "role[tile]"
76 )