forked from vitabaks/autobase
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsystem.yml
159 lines (134 loc) · 4.91 KB
/
system.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
---
# yamllint disable rule:line-length
# yamllint disable rule:comments-indentation
# DNS servers (/etc/resolv.conf)
nameservers: []
# - "8.8.8.8" # example (Google Public DNS)
# - "9.9.9.9" # (Quad9 Public DNS)
# /etc/hosts (optional)
etc_hosts: []
# - "10.128.64.143 pgbackrest.minio.local minio.local s3.eu-west-3.amazonaws.com" # example (MinIO)
# - ""
ntp_enabled: false # or 'true' if you want to install and configure the ntp service
ntp_servers: []
# - "10.128.64.44"
# - "10.128.64.45"
timezone: ""
# timezone: "Europe/Moscow"
# Generate locale
# (except RHEL>=8,use glibc-langpack)
locale_gen:
- {language_country: "en_US", encoding: "UTF-8"}
- {language_country: "ru_RU", encoding: "UTF-8"} # optional
# - {language_country: "", encoding: ""}
# Set system locale (LANG,LC_ALL)
locale: "en_US.utf-8"
# Kernel parameters
sysctl_set: true # or 'false'
# these parameters for example! Specify kernel options for your system
sysctl_conf:
etcd_cluster: []
master: []
replica: []
postgres_cluster:
- {name: "vm.swappiness", value: "1"}
- {name: "vm.min_free_kbytes", value: "102400"}
- {name: "vm.dirty_expire_centisecs", value: "1000"}
- {name: "vm.dirty_background_bytes", value: "67108864"}
- {name: "vm.dirty_bytes", value: "536870912"}
# - {name: "vm.nr_hugepages", value: "9510"} # example "9510"=18GB
- {name: "vm.zone_reclaim_mode", value: "0"}
- {name: "kernel.numa_balancing", value: "0"}
- {name: "kernel.sched_migration_cost_ns", value: "5000000"}
- {name: "kernel.sched_autogroup_enabled", value: "0"}
- {name: "net.ipv4.ip_nonlocal_bind", value: "1"}
- {name: "net.ipv4.ip_forward", value: "1"}
- {name: "net.ipv4.ip_local_port_range", value: "10000 65535"}
- {name: "net.netfilter.nf_conntrack_max", value: "1048576"}
- {name: "net.core.netdev_max_backlog", value: "10000"}
- {name: "net.ipv4.tcp_max_syn_backlog", value: "8192"}
- {name: "net.core.somaxconn", value: "65535"}
- {name: "net.ipv4.tcp_tw_reuse", value: "1"}
# - {name: "", value: ""}
balancers:
- {name: "net.ipv4.ip_nonlocal_bind", value: "1"}
- {name: "net.ipv4.ip_forward", value: "1"}
- {name: "net.ipv4.ip_local_port_range", value: "10000 65535"}
- {name: "net.netfilter.nf_conntrack_max", value: "1048576"}
- {name: "net.core.netdev_max_backlog", value: "10000"}
- {name: "net.ipv4.tcp_max_syn_backlog", value: "8192"}
- {name: "net.core.somaxconn", value: "65535"}
- {name: "net.ipv4.tcp_tw_reuse", value: "1"}
# - {name: "", value: ""}
# Transparent Huge Pages
disable_thp: true # or 'false'
# Max open file limit
set_limits: true # or 'false'
limits_user: "postgres"
soft_nofile: 65536
hard_nofile: 200000
# I/O Scheduler (optional)
set_scheduler: false # or 'true'
scheduler:
- {sched: "deadline", nr_requests: "1024", device: "sda"}
# - {sched: "noop" , nr_requests: "1024", device: "sdb"}
# - {sched: "" , nr_requests: "1024", device: ""}
# Non-multiqueue I/O schedulers:
# cfq - for desktop systems and slow SATA drives
# deadline - for SAS drives (recommended for databases)
# noop - for SSD drives
# Multiqueue I/O schedulers (blk-mq):
# mq-deadline - (recommended for databases)
# none - (ideal for fast random I/O devices such as NVMe)
# bfq - (avoid for databases)
# kyber
# SSH Keys (optional)
enable_ssh_key_based_authentication: false # or 'true' for configure SSH Key-Based Authentication
ssh_key_user: "postgres"
ssh_key_state: "present"
ssh_known_hosts: "{{ groups['postgres_cluster'] }}"
# sudo
sudo_users:
- name: "postgres"
nopasswd: "yes" # or "no" to require a password
commands: "ALL"
# - name: "joe" # other user (example)
# nopasswd: "no"
# commands: "/usr/bin/find, /usr/bin/less, /usr/bin/tail, /bin/kill"
# Firewall (ansible-role-firewall)
firewall_enabled_at_boot: true
firewall_allowed_tcp_ports_for:
master: []
replica: []
postgres_cluster:
- "{{ ansible_ssh_port | default(22) }}"
- "{{ postgresql_port }}"
- "{{ pgbouncer_listen_port }}"
- "8008" # Patroni REST API port
# - "10050" # Zabbix agent
# - ""
etcd_cluster:
- "{{ ansible_ssh_port | default(22) }}"
- "2379" # ETCD port
- "2380" # ETCD port
# - ""
balancers:
- "{{ ansible_ssh_port | default(22) }}"
- "5000" # HAProxy (read/write) master
- "5001" # HAProxy (read only) all replicas
- "5002" # HAProxy (read only) synchronous replica only
- "5003" # HAProxy (read only) asynchronous replicas only
- "7000" # HAProxy stats
# - ""
firewall_additional_rules_for:
master: []
replica: []
postgres_cluster: []
etcd_cluster: []
balancers:
- "iptables -p vrrp -A INPUT -j ACCEPT" # Keepalived (vrrp)
- "iptables -p vrrp -A OUTPUT -j ACCEPT" # Keepalived (vrrp)
# disable firewalld (installed by default on RHEL/CentOS) or ufw (installed by default on Ubuntu)
firewall_disable_firewalld: true
firewall_disable_ufw: true
...