]> git.openstreetmap.org Git - chef.git/blob - roles/lockheed.rb
Make bond configuration more robust
[chef.git] / roles / lockheed.rb
1 name "lockheed"
2 description "Master role applied to lockheed"
3
4 default_attributes(
5   :networking => {
6     :interfaces => {
7       :internal => {
8         :inet => {
9           :address => "10.0.48.16"
10         },
11         :bond => {
12           :slaves => %w[eno49 eno50]
13         }
14       },
15       :henet => {
16         :inet => {
17           :address => "184.104.179.144"
18         },
19         :inet6 => {
20           :address => "2001:470:1:fa1::10"
21         }
22       },
23       :equinix => {
24         :inet => {
25           :address => "82.199.86.112"
26         },
27         :inet6 => {
28           :address => "2001:4d78:500:5e3::10"
29         }
30       }
31     }
32   },
33   :sysctl => {
34     :sockets => {
35       :comment => "Increase size of connection queue",
36       :parameters => {
37         "net.core.somaxconn" => 10000
38       }
39     },
40     :network_conntrack_time_wait => {
41       :comment => "Only track completed connections for 30 seconds",
42       :parameters => {
43         "net.netfilter.nf_conntrack_tcp_timeout_time_wait" => "30"
44       }
45     },
46     :network_conntrack_max => {
47       :comment => "Increase max number of connections tracked",
48       :parameters => {
49         "net.netfilter.nf_conntrack_max" => "524288"
50       }
51     },
52     :no_tcp_slow_start => {
53       :comment => "Disable TCP slow start",
54       :parameters => {
55         "net.ipv4.tcp_slow_start_after_idle" => "0"
56       }
57     },
58     :tcp_use_bbr => {
59       :comment => "Use TCP BBR Congestion Control",
60       :parameters => {
61         "net.core.default_qdisc" => "fq",
62         "net.ipv4.tcp_congestion_control" => "bbr"
63       }
64     }
65   },
66   :nginx => {
67     :cache => {
68       :fastcgi => {
69         :enable => true,
70         :keys_zone => "fastcgi_cache_zone:2048M",
71         :inactive => "180d",
72         :max_size => "196608M"
73       },
74       :proxy => {
75           :enable => true,
76           :keys_zone => "proxy_cache_zone:2048M",
77           :inactive => "180d",
78           :max_size => "196608M"
79       }
80     }
81   }
82 )
83
84 run_list(
85   "role[equinix-ams-public]",
86   "role[hp-g9]",
87   "role[imagery]"
88 )