Table of Contents
Overview
On the Puppet forge there are already some modules available that can help you install the postgres software on your system. Most of these modules, however, are missing facilities for you to create and configure databases.
The pg_config module is the missing link. This module extends the puppet language so that Puppet knows about Postgres and the things there are to manage inside of a Postgres database.
The module support Postgres 10,11,12,13,14 and 15
The module supports multiple instances of Postgres on a system.
License
This is a commercially licensed module. But you can use the module on VirtualBox based development systems for FREE. When used on real systems a license is required.
You can license our modules in multiple ways. Our basic licensing model requires a subscription per node. But contact us for details.
Check the License for details.
Description
- Create, manage and drop Postgres databases (pg_database)
- Manage the parameter setting of a Postgres database (pg_parameter)
- Create, manage and drop Postgres users and roles (pg_role)
- Create, manage and drop Postgres tablespaces (pg_tablespaces)
- Create, update, manage and drop Postgres schema definitions (pg_schema_definition)
- Create, update, manage and drop (configuration) records in a Postgres table. (pg_record)
- Create your own custom facts based on Postgres database content
- An easy way to execute arbitrary SQL scripts with
unless
andonly_if
inhibitors to facilitate idempotence. (pg_exec)
Check the documentation here
Setup
Requirements
The pg_config
module requires:
- Puppet module
enterprisemodules-easy_type
installed. - Puppet version 6.0 or higher. Can be Puppet Enterprise or Puppet Open Source
- A valid Enterprise Modules license for usage.
- Runs on most Linux systems.
Installing the pg_config module
To install these modules, you can use a Puppetfile
mod 'enterprisemodules/pg_config' ,'x.x.x'
Then use the librarian-puppet
or r10K
to install the software.
You can also install the software using the puppet module
command:
puppet module install enterprisemodules-pg_config
Usage
Building a total Postgre setup requires quite some work. To help you, we have built some examples. The repo contains a demonstration of a simple database installation and configuration.
Reference
Here you can find some more information regarding this puppet module:
Limitations
This module runs on most Linux versions. It requires a puppet version 5 or higher. The module does NOT run on windows systems.