![]() ![]() Then check the huge_pages parameter value: postgres=# show huge_pages SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, Connect to the server according to settings in pg_hba.conf: $ psql -h 127.0.0.1 -U postgres If required, connect to your remote host through SSH or use localhost. Then, test the playbook: $ ansible-playbook playbook_adv.yamlĬheck the connection to a newly deployed PostgreSQL server. Or for Fedora: # dnf install linux-system-roles Linux-system-roles.postgresql/meta/collection-requirements.ymlĪlternatively, for RHEL, use: # dnf install rhel-system-roles To install the requirements, use the ansible-galaxy command with the requirements file provided with the System Role: $ ansible-galaxy collection install -r \ This playbook installs PostgreSQL version 13, generates a self-signed certificate for SSL/TLS connections, sets the huge_pages option to value try in the nf file, modifies access to the database in the pg_hba.conf file, and sets the password for the super user.īecause this playbook installs a self-signed TLS certificate, it requires additional collections to run. This example shows a more advanced configuration by deploying a PostgreSQL server with a modified huge_pages option, enabled SSL/TLS connection, and configured access file pg_hba.conf:ĭefine playbook_adv.yaml: - name: Config postgresql version 13 But the PostgreSQL System Role also supports more advanced operations and settings. The previous example shows a simple database server deployment with the default configuration. Deploy PostgreSQL using advanced configuration If needed, connect to the remote host using SSH or run this command on the localhost: Check the connection to a newly deployed and running PostgreSQL server.Use parameter -K if your user requires a sudo password: Define your basic Ansible playbook playbook.yaml in your favorite editor:.If needed, prepare your remote host, or you can run it on your localhost.Ĭlone the System Role Git repository: $ git clone \ Here is a basic example of how to run the PostgreSQL System Role directly from the upstream GitHub: The role runs on RHEL 8 systems or Fedora 35 and later. You can find a couple of examples to use as templates in the repository. The PostgreSQL System Role is straightforward to deploy and use: Clone the repository and define your playbook. Get started with the PostgreSQL System Role How well do you know Linux? Take a quiz and get a badge.Linux system administration skills assessment.A guide to installing applications on Linux.Download RHEL 9 at no charge through the Red Hat Developer program.The upstream GitHub repo provides more information about the PostgreSQL System Role. Moreover, you can provide the SQL script for database initialization and many other options like SSL support, password settings, and more. The PostgreSQL System Role supports full database server configuration through configuration files. This feature is supposed to enable higher performance and stability of the database server by following upstream recommendations for the most important configuration options. A significant advantage is configuration and self-tuning based on provided hardware. It's suitable for various kinds of users as it offers quick deployment to run a simple database server without any further configuration. This new PostgreSQL System Role is intended to speed up and simplify deployment and management of a PostgreSQL server. Recently, the upstream project added a PostgreSQL role to the list. Also, managing several servers could take a nontrivial amount of time.įor such situations, Red Hat Enterprise Linux (RHEL) offers RHEL System Roles, which provide an abstract configuration interface for certain services using Ansible. Setting up and deploying a single PostgreSQL instance quickly is not complex, but it can still be challenging to deploy multiple servers. PostgreSQL is a robust open source relational database, and its popularity as a database server has grown in recent years. ![]()
0 Comments
Leave a Reply. |