Forge Home

pg_profile

pdk
Puppet profiles for installing Postgres Database software and creating and managing databases

Enterprise Modules

enterprisemodules

612 downloads

612 latest version

4.4 quality score

Version information

  • 0.1.0 (latest)
released May 11th 2021
This version is compatible with:
  • Puppet Enterprise 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 8.0.0
  • CentOS
    ,
    OracleLinux
    ,
    RedHat

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this declaration to your Puppetfile:

mod 'enterprisemodules-pg_profile', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to a Bolt project:

bolt module add enterprisemodules-pg_profile
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install enterprisemodules-pg_profile --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

enterprisemodules/pg_profile — version 0.1.0 May 11th 2021

Enterprise Modules

Table of Contents

  1. Overview
  2. License
  3. Description - What the module does and why it is useful
  4. Setup
  1. Usage - Configuration options and additional functionality
  2. Reference - An under-the-hood peek at what the module is doing and how
  3. Limitations - OS compatibility, etc.

Overview

The pg_profile module allows an easy path from first simple installation to a fully customized Enterprise setup. It is part of our family of Puppet modules to install, manage and secure Postgres databases with Puppet. Besides the pg_profile module, this family also contains:

  • pg_config For configuring every aspect of your Postgres database
  • pg_secured To secure your databases according to the CIS benchmarks.

This module support Postgres 10, 11, 12, and 13.

License

Most of the Enterprise Modules modules are commercial modules. This one is NOT. It is an Open Source module. You are free to use it any way you like. It, however, is based on our commercial Puppet Postgres modules.

Description

The pg_profile::database class contains all the Puppet code to install, create and populate an Postgres database. This class is an easy way to get started. It contains the following steps:

  • em_license ( Manage Enterprise Modules Licenses)
  • sysctl ( Setup any sysctl parameters)
  • limits ( Setup any security limits)
  • groups_and_users ( Setup required groups and users)
  • packages ( Setup any required after_packages)
  • firewall ( Setup the firewall)
  • db_software ( Install the postgres software)
  • db_init ( Take care of initial database stup)
  • db_startup ( Manage starting the database)
  • db_roles ( Ensure required Postgres database roles)
  • db_definition ( Ensure required Postgress databases)
  • db_parameters ( Ensure required Postgres database settings)
  • db_tablespaces ( Ensure needed tablespaces)
  • db_schemas ( Ensure needed database schema's)
  • db_records ( Ensure required database records (for settings))

All these steps have a default implementation. This implementation is suitable to get started with. These classed all have parameters you can customize through hiera values. The defaults are specified in the module's data/default.yaml file.

But sometimes this is not enough and you would like to add some extra definitions, you can, for example, add a Puppet class to be executed after the systctl stage is done and before the limits is done. You can do this by adding the next line to your yaml data:

pg_profile::database::before_sysctl:   my_profile::my_extra_class

or after:

pg_profile::database::after_sysctl:   my_profile::my_extra_class

If you want to, you can also skip this provided class:

pg_profile::database::sysctl:   skip

Or provide your own implementation:

pg_profile::database::sysctl:   my_profile::my_own_implementation

This mechanism can be used for all named steps and makes it easy to move from an easy setup with a running standard database to a fully customized setup using a lot of your own classes plugged in.

Check here to see the full documentation for this module.

Setup

Requirements

The pg_profile module requires:

Installing the pg_profile module

To install these modules, you can use a Puppetfile

mod 'enterprisemodules/pg_profile'               ,'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_profile

Usage

To get started, include the pg_profile::database class in your role. Run Puppet and you have a running Postgres database.

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 higher than 5. The module does NOT run on windows systems.