Open ib2828 opened 4 years ago
Example for:
Installation on: СentOS
PostgresPro version: 12.4.1
:heavy_exclamation_mark: To use any version of Postgres Pro in production, you must purchase a license.
yum_repository:
- name: "postgrespro-std"
description: "Postgres Pro Standard repo"
baseurl: "http://repo.postgrespro.ru//pgpro-archive/pgpro-12.4.1/centos/{{ ansible_distribution_major_version }}/os/x86_64/rpms"
gpgkey: "http://repo.postgrespro.ru/keys/GPG-KEY-POSTGRESPRO"
gpgcheck: "yes"
and disable pgdg repo (optional)
install_postgresql_repo: false
postgresql_packages
variable (in the /vars/RedHat.yml variable file):postgresql_packages:
- postgrespro-std-{{ postgresql_version }}-server
- postgrespro-std-{{ postgresql_version }}-client
- postgrespro-std-{{ postgresql_version }}-contrib
- postgrespro-std-{{ postgresql_version }}-devel
Specify postgresql_bin_dir and postgresql_unix_socket_dir as follows:
postgresql_data_dir: "/var/lib/pgpro/std-{{ postgresql_version }}/data" # or other path to PGDATA
postgresql_bin_dir: "/opt/pgpro/std-{{ postgresql_version }}/bin"
postgresql_unix_socket_dir: "/tmp"
Add/edit the necessary PostgreSQL parameters (in the /vars/main.yml variable file):
postgresql_version: "12"
postgresql_users: # this is optional
postgresql_databases: # this is optional
postgresql_extensions: # this is optional
postgresql_parameters:
- {option: "max_connections", value: "100"}
- {option: "superuser_reserved_connections", value: "5"}
- {option: "max_locks_per_transaction", value: "512"}
...
Specify all other variables according to your personal requirements for the database cluster.
Tested with Postgres Pro Standard 12.2.1 on Centos 7 and 8.
Tested with Postgres Pro Standard 12.2.1 on Debian, Ubuntu.
PostgresPro repository for Debian / Ubuntu (ex. v12.4.1) (in the /vars/Debian.yml variable file)
apt_repository_keys:
- key: "http://repo.postgrespro.ru/keys/GPG-KEY-POSTGRESPRO"
apt_repository:
- repo: "deb http://repo.postgrespro.ru//pgpro-archive/pgpro-12.4.1/{{ ansible_distribution |lower }}/ {{ ansible_distribution_release }} main"
dev package is named differently (different from RHEL)
postgresql_packages:
- postgrespro-std-{{ postgresql_version }}-server
- postgrespro-std-{{ postgresql_version }}-client
- postgrespro-std-{{ postgresql_version }}-contrib
- postgrespro-std-{{ postgresql_version }}-dev
Compatibility with Postgres Pro Standard