Overview

Overview

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.

Experience the Power of Puppet for Postgres

If you want to play and experiment with Puppet and Postgres, please take a look at our playgrounds. At our playgrounds, we provide you with a pre-installed environment, where you experiment fast and easy.

For Postgres   here at our playground...