]> git.openstreetmap.org Git - chef.git/blob - roles/katla.rb
Add support for monitoring hosts behind NAT
[chef.git] / roles / katla.rb
1 name "katla"
2 description "Master role applied to katla"
3
4 default_attributes(
5   :apt => {
6     :sources => ["postgresql"]
7   },
8   :db => {
9     :cluster => "9.5/main"
10   },
11   :devices => {
12     :store_slow => {
13       :comment => "RAID array mounted on /store/arrays/slow",
14       :type => "block",
15       :bus => "scsi",
16       :serial => "3600605b005a0609019290f178be8de77",
17       :attrs => {
18         "queue/scheduler" => "deadline",
19         "queue/nr_requests" => "975",
20         "queue/rq_affinity" => "2"
21       }
22     },
23     :store_fast => {
24       :comment => "RAID array mounted on /store/arrays/fast",
25       :type => "block",
26       :bus => "scsi",
27       :serial => "3600605b005a0726019d062ae23b426fd",
28       :attrs => {
29         "queue/scheduler" => "deadline",
30         "queue/nr_requests" => "975",
31         "queue/rq_affinity" => "2"
32       }
33     },
34     :store_ssd_1 => {
35       :comment => "First disk of RAID array mounted on /store/arrays/ssd",
36       :type => "block",
37       :bus => "ata",
38       :serial => "INTEL_SSDSC2BA400G3_BTTV3141041E400HGN",
39       :attrs => {
40         "queue/scheduler" => "noop"
41       }
42     },
43     :store_ssd_2 => {
44       :comment => "Second disk of RAID array mounted on /store/arrays/ssd",
45       :type => "block",
46       :bus => "ata",
47       :serial => "INTEL_SSDSC2BA400G3_BTTV3141044Q400HGN",
48       :attrs => {
49         "queue/scheduler" => "noop"
50       }
51     }
52   },
53   :networking => {
54     :interfaces => {
55       :internal_ipv4 => {
56         :interface => "bond0",
57         :role => :internal,
58         :family => :inet,
59         :address => "10.0.32.40",
60         :bond => {
61           :slaves => %w[eth0 eth1]
62         }
63       }
64     }
65   },
66   :postgresql => {
67     :settings => {
68       :defaults => {
69         :shared_buffers => "64GB",
70         :work_mem => "64MB",
71         :maintenance_work_mem => "1GB",
72         :effective_cache_size => "180GB"
73       }
74     }
75   },
76   :sysctl => {
77     :ipv6_autoconf => {
78       :comment => "Disable IPv6 auto-configuration on internal interface",
79       :parameters => {
80         "net.ipv6.conf.bond0.autoconf" => "0",
81         "net.ipv6.conf.bond0.accept_ra" => "0"
82       }
83     },
84     :postgres => {
85       :comment => "Increase shared memory for postgres",
86       :parameters => {
87         "kernel.shmmax" => 66 * 1024 * 1024 * 1024,
88         "kernel.shmall" => 66 * 1024 * 1024 * 1024 / 4096
89       }
90     }
91   }
92 )
93
94 run_list(
95   "role[bytemark]",
96   "role[db-master]",
97   "role[db-backup]"
98 )