]> git.openstreetmap.org Git - chef.git/blob - roles/snap-01.rb
Drop roles for thorn-02 and thorn-03
[chef.git] / roles / snap-01.rb
1 name "snap-01"
2 description "Master role applied to snap-01"
3
4 default_attributes(
5   :networking => {
6     :interfaces => {
7       :internal_ipv4 => {
8         :interface => "bond0",
9         :role => :internal,
10         :family => :inet,
11         :address => "10.0.48.49",
12         :bond => {
13           :mode => "802.3ad",
14           :lacprate => "fast",
15           :xmithashpolicy => "layer3+4",
16           :slaves => %w[eno1 eno2 eno3 eno4]
17         }
18       }
19     }
20   },
21   :postgresql => {
22     :settings => {
23       :defaults => {
24         :shared_buffers => "128GB",
25         :work_mem => "128MB",
26         :maintenance_work_mem => "2GB",
27         :effective_cache_size => "360GB",
28         :effective_io_concurrency => "256",
29         :random_page_cost => "1.1"
30       }
31     }
32   },
33   :sysctl => {
34     :postgres => {
35       :comment => "Increase shared memory for postgres",
36       :parameters => {
37         "kernel.shmmax" => 132 * 1024 * 1024 * 1024,
38         "kernel.shmall" => 132 * 1024 * 1024 * 1024 / 4096
39       }
40     }
41   }
42 )
43
44 run_list(
45   "role[equinix-ams]",
46   "role[db-master]",
47   "role[db-backup]"
48 )