-
-
Notifications
You must be signed in to change notification settings - Fork 418
/
RedHat.yml
242 lines (213 loc) · 10.8 KB
/
RedHat.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
---
# PostgreSQL variables
#
# You can specify custom data dir path. Example: "/pgdata/{{ postgresql_version }}/data"
postgresql_data_dir: "\
{% if cloud_provider | default('') | length > 0 %}\
{{ pg_data_mount_path | default('/pgdata') }}/{{ postgresql_version }}/data\
{% else %}\
/var/lib/pgsql/{{ postgresql_version }}/data\
{% endif %}"
# Note: When deploying to cloud providers, we create a disk and mount the data directory,
# along the path defined in the 'pg_data_mount_path' variable (or use '/pgdata' by default).
# You can specify custom WAL dir path. Example: "/pgwal/{{ postgresql_version }}/pg_wal"
postgresql_wal_dir: "" # if defined, symlink will be created [optional]
postgresql_conf_dir: "{{ postgresql_data_dir }}"
postgresql_bin_dir: "/usr/pgsql-{{ postgresql_version }}/bin"
postgresql_log_dir: "/var/log/postgresql"
postgresql_unix_socket_dir: "/var/run/postgresql"
postgresql_home_dir: "/var/lib/pgsql"
# stats_temp_directory (mount the statistics directory in tmpfs)
# if postgresql_version < 15
postgresql_stats_temp_directory_path: "/var/lib/pgsql_stats_tmp" # or 'none'
postgresql_stats_temp_directory_size: "1024m"
# Repository
yum_repository: []
# - name: "repo name"
# description: "repo description"
# baseurl: "https://my-repo.url"
# gpgkey: "https://my-repo-key.url"
# gpgcheck: "yes"
install_postgresql_repo: true # or 'false' (installed from the package "pgdg-redhat-repo-latest.noarch.rpm")
install_epel_repo: true # or 'false' (installed from the package "epel-release-latest.noarch.rpm")
install_scl_repo: true # or 'false' (Redhat 7 family only)
# Packages (for yum repo)
python_version: "3" # override the version (e.q, 3.11) only if patroni_installation_method: "pip" is used
os_specific_packages:
RedHat-8:
- python2
- python3-libselinux
- python3-libsemanage
- python3-policycoreutils
- dnf-utils
RedHat-9:
- python3-libselinux
- python3-libsemanage
- python3-policycoreutils
- dnf-utils
system_packages:
- "{{ os_specific_packages[ansible_os_family ~ '-' ~ ansible_distribution_major_version] }}"
- python{{ python_version }}
- python{{ python_version }}-devel
- python{{ python_version }}-psycopg2
- python{{ python_version }}-setuptools
- python{{ python_version }}-pip
- python{{ python_version }}-urllib3
- less
- sudo
- vim
- gcc
- jq
- iptables
- acl
- bind-utils
- moreutils
- unzip
- tar
- zstd
install_perf: false # or 'true' to install "perf" (Linux profiling with performance counters) and "FlameGraph".
# The glibc-langpack package includes the basic information required to support the language in your applications.
# for RHEL version 8 (only)
glibc_langpack:
- "glibc-langpack-en"
# - "glibc-langpack-ru"
# - "glibc-langpack-de"
postgresql_packages:
- postgresql{{ postgresql_version }}
- postgresql{{ postgresql_version }}-server
- postgresql{{ postgresql_version }}-contrib
- postgresql{{ postgresql_version }}-devel
- postgresql{{ postgresql_version }}-debuginfo
# - pg_repack_{{ postgresql_version }}
# - pg_cron_{{ postgresql_version }}
# - pg_stat_kcache_{{ postgresql_version }}
# - pg_wait_sampling_{{ postgresql_version }}
# - postgis33_{{ postgresql_version }}
# - pgrouting_{{ postgresql_version }}
# - pgvector_{{ postgresql_version }}
# - pgaudit17_{{ postgresql_version }}
# - pg_partman_{{ postgresql_version }}
# Extra packages
etcd_package_repo: "https://github.com/etcd-io/etcd/releases/download/v{{ etcd_version }}/etcd-v{{ etcd_version }}-linux-amd64.tar.gz"
vip_manager_package_repo:
"https://github.com/cybertec-postgresql/vip-manager/releases/download/v{{ vip_manager_version }}/vip-manager_{{ vip_manager_version }}_Linux_x86_64.rpm"
installation_method: "repo" # "repo" (default) or "file"
# The Patroni package will be installed from the rpm package by default.
# You also have the option of choosing an installation method using the pip package.
patroni_installation_method: "rpm" # "rpm" (default) or "pip"
# if patroni_installation_method: "pip"
patroni_install_version: "latest" # or a specific version (e.q., '3.3.2')
# if patroni_installation_method: "rpm"
patroni_packages:
- patroni
- patroni-{{ dcs_type }}
# if patroni_installation_method: "rpm" (optional)
# You can preload the patroni rpm package to your YUM repository, or explicitly specify the path to the package in this variable:
patroni_rpm_package_repo: []
# - "https://download.postgresql.org/pub/repos/yum/common/redhat/rhel-8-x86_64/patroni-3.3.2-1PGDG.rhel8.noarch.rpm" # (package for RHEL 8)
# if patroni_installation_method: "pip" (optional)
# Packages from your repository will be used to install. By default, it is installed from the public pip repository.
pip_package_repo: "https://bootstrap.pypa.io/get-pip.py" # latest version pip3 for python3 (or use "pip-<version>.tar.gz").
patroni_pip_requirements_repo: []
# - "http://my-repo.url/setuptools-41.2.0.zip"
# - "http://my-repo.url/setuptools_scm-3.3.3.tar.gz"
# - "http://my-repo.url/urllib3-1.24.3.tar.gz"
# - "http://my-repo.url/PyYAML-5.1.2.tar.gz"
# - "http://my-repo.url/chardet-3.0.4.tar.gz"
# - "http://my-repo.url/idna-2.8.tar.gz"
# - "http://my-repo.url/certifi-2019.9.11.tar.gz"
# - "http://my-repo.url/requests-2.22.0.tar.gz"
# - "http://my-repo.url/six-1.12.0.tar.gz"
# - "http://my-repo.url/kazoo-2.6.1.tar.gz"
# - "http://my-repo.url/dnspython-1.16.0.zip"
# - "http://my-repo.url/python-etcd-0.4.5.tar.gz"
# - "http://my-repo.url/Click-7.0.tar.gz"
# - "http://my-repo.url/prettytable-0.7.2.tar.gz"
# - "http://my-repo.url/pytz-2019.2.tar.gz"
# - "http://my-repo.url/tzlocal-2.0.0.tar.gz"
# - "http://my-repo.url/wheel-0.33.6.tar.gz"
# - "http://my-repo.url/python-dateutil-2.8.0.tar.gz"
# - "http://my-repo.url/psutil-5.6.3.tar.gz"
# - "http://my-repo.url/cdiff-1.0.tar.gz"
patroni_pip_package_repo: []
# - "http://my-repo.url/patroni-1.6.0.tar.gz"
# if with_haproxy_load_balancing: true
haproxy_installation_method: "rpm" # "rpm" (default) or "src"
confd_package_repo: "https://github.com/kelseyhightower/confd/releases/download/v0.16.0/confd-0.16.0-linux-amd64"
# if haproxy_installation_method: 'src' (optional)
haproxy_major: "1.8"
haproxy_version: "1.8.31" # version to build from source
lua_src_repo: "https://www.lua.org/ftp/lua-5.3.5.tar.gz" # required for build haproxy
haproxy_src_repo: "https://www.haproxy.org/download/{{ haproxy_major }}/src/haproxy-{{ haproxy_version }}.tar.gz"
haproxy_compile_requirements:
- unzip
- gzip
- make
- gcc
- gcc-c++
- pcre-devel
- zlib-devel
- readline-devel
- openssl
- openssl-devel
- openssl-libs
- systemd-devel
# ================================================================================================= #
# Offline installation (if installation_method: "file")
#
# You can also download the necessary packages into postgresql_cluster/files/ directory.
# Packages from this directory will be used for installation.
# if installation_method: "file" and patroni_installation_method: "rpm"
patroni_rpm_package_file: "patroni-3.3.2-1PGDG.rhel8.noarch.rpm"
# (package for RHEL 8) https://download.postgresql.org/pub/repos/yum/common/redhat/rhel-8-x86_64/
# if installation_method: "file" and patroni_installation_method: "pip"
pip_package_file: "pip-24.2.tar.gz" # https://pypi.org/project/pip/#files
patroni_pip_requirements_file: []
# - "setuptools-41.2.0.zip" # https://pypi.org/project/setuptools/#files
# - "setuptools_scm-3.3.3.tar.gz" # https://pypi.org/project/setuptools-scm/#files
# - "urllib3-1.24.3.tar.gz" # https://pypi.org/project/urllib3/1.24.3/#files
# - "PyYAML-5.1.2.tar.gz" # https://pypi.org/project/PyYAML/#files
# - "chardet-3.0.4.tar.gz" # https://pypi.org/project/chardet/#files # (required for "requests")
# - "idna-2.8.tar.gz" # https://pypi.org/project/idna/#files # (required for "requests")
# - "certifi-2019.9.11.tar.gz" # https://pypi.org/project/certifi/#files # (required for "requests")
# - "requests-2.22.0.tar.gz" # https://pypi.org/project/requests/#files
# - "six-1.12.0.tar.gz" # https://pypi.org/project/six/#files
# - "kazoo-2.6.1.tar.gz" # https://pypi.org/project/kazoo/#files
# - "dnspython-1.16.0.zip" # https://pypi.org/project/dnspython/#files # (required for "python-etcd")
# - "python-etcd-0.4.5.tar.gz" # https://pypi.org/project/python-etcd/#files
# - "Click-7.0.tar.gz" # https://pypi.org/project/click/#files
# - "prettytable-0.7.2.tar.gz" # https://pypi.org/project/PrettyTable/#files
# - "pytz-2019.2.tar.gz" # https://pypi.org/project/pytz/#files # (required for "tzlocal")
# - "tzlocal-2.0.0.tar.gz" # https://pypi.org/project/tzlocal/#files
# - "wheel-0.33.6.tar.gz" # https://pypi.org/project/wheel/#files
# - "python-dateutil-2.8.0.tar.gz" # https://pypi.org/project/python-dateutil/#files
# - "psutil-5.6.3.tar.gz" # https://pypi.org/project/psutil/#files
# - "cdiff-1.0.tar.gz" # https://pypi.org/project/cdiff/#files
patroni_pip_package_file: []
# - "patroni-3.3.2.tar.gz" # https://pypi.org/project/patroni/#files
# additional packages
etcd_package_file: "etcd-v3.5.15-linux-amd64.tar.gz" # https://github.com/etcd-io/etcd/releases
vip_manager_package_file: "vip-manager-1.0.2-1.x86_64.rpm" # https://github.com/cybertec-postgresql/vip-manager/releases
wal_g_package_file: "wal-g.linux-amd64.tar.gz" # https://github.com/wal-g/wal-g/releases
# if with_haproxy_load_balancing: true
haproxy_package_file: []
# - "rh-haproxy18-runtime-3.1-2.el7.x86_64.rpm"
# - "rh-haproxy18-haproxy-1.8.31-1.el7.x86_64.rpm"
confd_package_file: "confd-0.16.0-linux-amd64" # https://github.com/kelseyhightower/confd/releases
# if haproxy_installation_method: 'src' (optional)
lua_src_file: "lua-5.3.5.tar.gz" # https://www.lua.org/ftp/lua-5.3.5.tar.gz (required for build haproxy)
haproxy_src_file: "haproxy-1.8.31.tar.gz" # http://www.haproxy.org/download/1.8/src/
# ------------------------------------------------------------------------------------------------- #
# (optional) Specify additional rpm packages if required (for any installation_method)
# this packages will be installed before all other packages.
packages_from_file: []
# - "python3-psycopg2-2.7.7-2.el7.x86_64.rpm" # https://mirror.linux-ia64.org/epel/7/x86_64/Packages/p/ # (required for patroni rpm)
# - "libyaml-0.1.4-11.el7_0.x86_64.rpm" # (required for patroni rpm)
# - "jq-1.5-1.el7.x86_64.rpm" # https://mirror.linux-ia64.org/epel/7/x86_64/Packages/j/
# - "other-package-name_1_amd64.rpm"
# - ""
# ----------------------------------------------------------------------------------------------------------------------------------
# Attention! If you want to use the installation method "file".
# You need to independently determine all the necessary the dependencies of rpm packages for your version of the Linux distribution.
# ----------------------------------------------------------------------------------------------------------------------------------
...