pg_profile
Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 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 < 9.0.0
- , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'enterprisemodules-pg_profile', '0.5.0'
Learn more about managing modules with a PuppetfileDocumentation
Table of Contents
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)
- disable_thp ) Disable transparant Huge pages)
- 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_clusters ( Manage the database clusters )
- db_instances ( Manage the database instances )
- 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:
- Puppet module
enterprisemodules-pg_config
installed. - Puppet module
enterprisemodules-easy_type
installed. - Puppet module
enterprisemodules/pg_secured
installed. - Puppet module
ipcrm-echo
installed. - Puppet module
puppet-augeasproviders_core
installed. - Puppet module
herculesteam-augeasproviders_sysctl
installed. - Puppet module
herculesteam-augeasproviders_grub
installed. - Puppet module
saz-limits
installed. - Puppet module
puppetlabs-firewall
installed. - Puppet module
puppet-firewalld
installed. - Puppet module
puppetlabs-stdlib
installed. - Puppet version 5.0 or higher. Can be Puppet Enterprise or Puppet Open Source
- Postgres 10 higher
- A valid Enterprise Modules license for usage.
- Runs on most Linux systems.
- Windows systems are NOT supported
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.
Reference
Table of Contents
Classes
pg_profile
: This is the interface class for this profile. This may only contain parameters and no actual configuration enforcingpg_profile::database
: ## Overviewpg_profile::database::cis_controls
: This class contains the actual code securing the database.pg_profile::database::db_clusters
: This class implements the steps to initialize the database for the foirst time.pg_profile::database::db_definition
: This class contains the actual database definition using thepg_database
type.pg_profile::database::db_instances
: This class contains the definition of the Postgres database instancespg_profile::database::db_parameters
: This class contains the definition for all the database parameters.pg_profile::database::db_records
: This class contains the definition for all the database records.pg_profile::database::db_roles
: This class contains the definition for all the database roles (users) you'd like on your system.pg_profile::database::db_schemas
: This class contains the definition for all the database schemas.pg_profile::database::db_software
: This class contains the definition of the Postgres software packages you want to use on this system.pg_profile::database::db_tablespaces
: This class contains the definition for all the tablespaces you'd like on your system.pg_profile::database::disable_thp
: This class contains the definition of the Transparent HugePages settings required for running Oracle.pg_profile::database::em_license
: This class will deploy the Enterprise Modules license.pg_profile::secured_database
: This is a highly customizable Puppet profile class to define an Secured Postgres database on your system.
Functions
set_param
: See the file "LICENSE" for the full license governing this code. Returns the value for requested parameter. Currently supported parameters:
Classes
pg_profile
This is the interface class for this profile. This may only contain parameters and no actual configuration enforcing
Parameters
The following parameters are available in the pg_profile
class:
os_group
Data type: String[1]
os_user
Data type: String[1]
version
Data type: Variant[String[1], Array[String[1]]]
db_name
Data type: Optional[String[1]]
Default value: undef
pg_profile::database
pg_profile::database
This is a highly customizable Puppet profile class to define an Postgres database on your system. In it's core just adding:
contain ::pg_profile::database
Is enough to get an Postgres database running on your system.
But sometimes you have specific uses cases that are not handled well by the standard classes. This profile class allows you to add your own code to the execution.
Stages
Defining and starting an Postgres database on you system goes through several 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_clusters ( Manage Postgres database clusters)
- db_instances ( Manage database instances)
- 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.
before classes
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
after classes
You can do the same when you want to add code after one of the stage classes:
pg_profile::database::after_sysctl: my_profile::my_extra_class
Skipping
Sometimes organisation use different modules and mechanisms to implement a feature and you want to skip the class:
pg_profile::database::sysctl: skip
Replacing
Or provide your own implementation:
pg_profile::database::sysctl: my_profile::my_own_implementation
This mechanism can be used for all named stages 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.
Look at the description of the stages and their properties.
At this level you can also customize some generic settings. Check the settings for:
version
Here is an example on how you can do this:
class {'pg_profile::database':
version => '13',
}
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the pg_profile::database
class:
before_em_license
before_sysctl
before_limits
before_groups_and_users
before_packages
before_firewall
before_db_software
before_db_clusters
before_db_instances
before_db_roles
before_db_definition
before_db_parameters
before_db_tablespaces
before_db_schemas
before_db_records
em_license
sysctl
limits
groups_and_users
packages
firewall
db_software
db_clusters
db_instances
db_roles
db_definition
db_parameters
db_tablespaces
db_schemas
db_records
after_em_license
after_sysctl
after_limits
after_groups_and_users
after_packages
after_firewall
after_db_software
after_db_clusters
after_db_instances
after_db_roles
after_db_definition
after_db_parameters
after_db_tablespaces
after_db_schemas
after_db_records
after_disable_thp
before_disable_thp
disable_thp
before_em_license
Data type: Optional[String]
The name of the class you want to execute directly before the em_license
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::before_em_license: my_module::my_class
Default value: undef
before_sysctl
Data type: Optional[String]
The name of the class you want to execute directly before the sysctl
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::before_sysctl: my_module::my_class
Default value: undef
before_limits
Data type: Optional[String]
The name of the class you want to execute directly before the limits
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::before_limits: my_module::my_class
Default value: undef
before_groups_and_users
Data type: Optional[String]
The name of the class you want to execute directly before the groups_and_users
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::before_groups_and_users: my_module::my_class
Default value: undef
before_packages
Data type: Optional[String]
The name of the class you want to execute directly before the packages
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::before_packages: my_module::my_class
Default value: undef
before_firewall
Data type: Optional[String]
The name of the class you want to execute directly before the firewall
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::before_firewall: my_module::my_class
Default value: undef
before_db_software
Data type: Optional[String]
The name of the class you want to execute directly before the db_software
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::before_db_software: my_module::my_class
Default value: undef
before_db_clusters
Data type: Optional[String]
The name of the class you want to execute directly before the db_clusters
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::before_db_clusters: my_module::my_class
Default value: undef
before_db_instances
Data type: Optional[String]
The name of the class you want to execute directly before the db_instances
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::before_db_instances: my_module::my_class
Default value: undef
before_db_roles
Data type: Optional[String]
The name of the class you want to execute directly before the db_users
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::before_db_users: my_module::my_class
Default value: undef
before_db_definition
Data type: Optional[String]
The name of the class you want to execute directly before the db_definition
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::before_db_definition: my_module::my_class
Default value: undef
before_db_parameters
Data type: Optional[String]
The name of the class you want to execute directly before the db_parameters
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::before_db_parameters: my_module::my_class
Default value: undef
before_db_tablespaces
Data type: Optional[String]
The name of the class you want to execute directly before the db_tablespaces
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::before_db_tablespaces: my_module::my_class
Default value: undef
before_db_schemas
Data type: Optional[String]
The name of the class you want to execute directly before the db_schemas
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::before_db_schemas: my_module::my_class
Default value: undef
before_db_records
Data type: Optional[String]
The name of the class you want to execute directly before the db_records
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::before_db_records: my_module::my_class
Default value: undef
em_license
Data type: Optional[String]
Use this value if you want to skip or use your own class for step em_license
.
Use your own class
You can use hiera to set this value. Here is an example:
pg_profile::database::em_license: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
pg_profile::database::em_license: skip
Default value: undef
sysctl
Data type: Optional[String]
Use this value if you want to skip or use your own class for step sysctl
.
Use your own class
You can use hiera to set this value. Here is an example:
pg_profile::database::db_definition: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
pg_profile::database::db_definition: skip
Default value: undef
limits
Data type: Optional[String]
Use this value if you want to skip or use your own class for step limits
.
Use your own class
You can use hiera to set this value. Here is an example:
pg_profile::database::limits: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
pg_profile::database::limits: skip
Default value: undef
groups_and_users
Data type: Optional[String]
Use this value if you want to skip or use your own class for step groups_and_users
.
Use your own class
You can use hiera to set this value. Here is an example:
pg_profile::database::groups_and_users: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
pg_profile::database::groups_and_users: skip
Default value: undef
packages
Data type: Optional[String]
Use this value if you want to skip or use your own class for step packages
.
Use your own class
You can use hiera to set this value. Here is an example:
pg_profile::database::packages: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
pg_profile::database::packages: skip
Default value: undef
firewall
Data type: Optional[String]
Use this value if you want to skip or use your own class for step firewall
.
Use your own class
You can use hiera to set this value. Here is an example:
pg_profile::database::firewall: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
pg_profile::database::firewall: skip
Default value: undef
db_software
Data type: Optional[String]
Use this value if you want to skip or use your own class for step db_software
.
Use your own class
You can use hiera to set this value. Here is an example:
pg_profile::database::db_software: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
pg_profile::database::db_software: skip
Default value: undef
db_clusters
Data type: Optional[String]
Use this value if you want to skip or use your own class for step db_clusters
.
Use your own class
You can use hiera to set this value. Here is an example:
pg_profile::database::db_clusters: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
pg_profile::database::db_clusters: skip
Default value: undef
db_instances
Data type: Optional[String]
Use this value if you want to skip or use your own class for step db_instances
.
Use your own class
You can use hiera to set this value. Here is an example:
pg_profile::database::db_instances: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
pg_profile::database::db_instances: skip
Default value: undef
db_roles
Data type: Optional[String]
Use this value if you want to skip or use your own class for step db_roles
.
Use your own class
You can use hiera to set this value. Here is an example:
pg_profile::database::db_roles: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
pg_profile::database::db_roles: skip
Default value: undef
db_definition
Data type: Optional[String]
Use this value if you want to skip or use your own class for step db_definition
.
Use your own class
You can use hiera to set this value. Here is an example:
pg_profile::database::db_definition: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
pg_profile::database::db_definition: skip
Default value: undef
db_parameters
Data type: Optional[String]
Use this value if you want to skip or use your own class for step db_parameters
.
Use your own class
You can use hiera to set this value. Here is an example:
pg_profile::database::db_parameters: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
pg_profile::database::db_parameters: skip
Default value: undef
db_tablespaces
Data type: Optional[String]
Use this value if you want to skip or use your own class for step db_tablespaces
.
Use your own class
You can use hiera to set this value. Here is an example:
pg_profile::database::db_tablespaces: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
pg_profile::database::db_tablespaces: skip
Default value: undef
db_schemas
Data type: Optional[String]
Use this value if you want to skip or use your own class for step db_schemas
.
Use your own class
You can use hiera to set this value. Here is an example:
pg_profile::database::db_schemas: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
pg_profile::database::db_schemas: skip
Default value: undef
db_records
Data type: Optional[String]
Use this value if you want to skip or use your own class for step db_records
.
Use your own class
You can use hiera to set this value. Here is an example:
pg_profile::database::db_records: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
pg_profile::database::db_records: skip
Default value: undef
after_em_license
Data type: Optional[String]
The name of the class you want to execute directly after the em_license
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::after_em_license: my_module::my_class
Default value: undef
after_sysctl
Data type: Optional[String]
The name of the class you want to execute directly after the sysctl
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::after_sysctl: my_module::my_class
Default value: undef
after_limits
Data type: Optional[String]
The name of the class you want to execute directly after the limits
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::after_limits: my_module::my_class
Default value: undef
after_groups_and_users
Data type: Optional[String]
The name of the class you want to execute directly after the groups_and_users
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::after_groups_and_users: my_module::my_class
Default value: undef
after_packages
Data type: Optional[String]
The name of the class you want to execute directly after the packages
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::after_packages: my_module::my_class
Default value: undef
after_firewall
Data type: Optional[String]
The name of the class you want to execute directly after the firewall
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::after_firewall: my_module::my_class
Default value: undef
after_db_software
Data type: Optional[String]
The name of the class you want to execute directly after the db_software
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::after_db_software: my_module::my_class
Default value: undef
after_db_clusters
Data type: Optional[String]
The name of the class you want to execute directly after the db_clusters
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::after_db_clusters: my_module::my_class
Default value: undef
after_db_instances
Data type: Optional[String]
The name of the class you want to execute directly after the db_instances
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::after_db_instances: my_module::my_class
Default value: undef
after_db_roles
Data type: Optional[String]
The name of the class you want to execute directly after the db_users
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::after_db_users: my_module::my_class
Default value: undef
after_db_definition
Data type: Optional[String]
The name of the class you want to execute directly after the db_definition
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::after_db_definition: my_module::my_class
Default value: undef
after_db_parameters
Data type: Optional[String]
The name of the class you want to execute directly after the db_parameters
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::after_db_parameters: my_module::my_class
Default value: undef
after_db_tablespaces
Data type: Optional[String]
The name of the class you want to execute directly after the db_tablespaces
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::after_db_tablespaces: my_module::my_class
Default value: undef
after_db_schemas
Data type: Optional[String]
The name of the class you want to execute directly after the db_schemas
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::after_db_schemas: my_module::my_class
Default value: undef
after_db_records
Data type: Optional[String]
The name of the class you want to execute directly after the db_records
class.
You can use hiera to set this value. Here is an example:
pg_profile::database::after_db_records: my_module::my_class
Default value: undef
after_disable_thp
Data type: Optional[String]
Default value: undef
before_disable_thp
Data type: Optional[String]
Default value: undef
disable_thp
Data type: Optional[String]
Default value: undef
pg_profile::database::cis_controls
pg_profile::database::cis_controls
Here you can customize the security by specifying the CIS rules you don't want to apply.
When these customizations aren't enough, you can replace the class with your own class. See pg_profile::secured_database for an explanation on how to do this.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the pg_profile::database::cis_controls
class:
dbname
The name of the database you want to secure
product_version
Data type: Optional[String[1]]
The database version of the CIS benchmark you want to apply.
Although not very logical, you can apply an older (or newer) database version to your database.
If you also don't specify a product_version
, Puppet will detect the version of Postgres running and use this to determine the product_version
. There is, however, one issue with the detection. On an initial run Puppet canot determine what the Postgres version is. In that case, the ora_cis defined type will skip applying the CIS benchmark and wait until (hopefully) the next run the version of Postgres for specified sid is available.
doc_version
Data type: Optional[String[1]]
The version of the CIS benchmark you want to apply to your database.
When you don't specify the doc_version
, puppet automatically uses the latest version for your current db_version
.
skip_list
Data type: Optional[Array[String[1]]]
This is the list of controls that you want to skip.
By default this value is empty, meaning ora_cis
will apply ALL controls. You must specify the name of the control.
instance
Data type: String[1]
pg_profile::database::db_clusters
pg_profile::database::db_clusters
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the pg_profile::database::db_clusters
class:
dirs
Data type: Hash
The directory your want to ensure before creating the Postgres clusters.
list
Data type: Hash
A Hash of Postgres clusters to be managed by Puppet.
pg_profile::database::db_definition
pg_profile::database::db_definition
Here you add additiona databases to your system.
When these customizations aren't enough, you can replace the class with your own class. See pg_profile::database for an explanation on how to do this.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the pg_profile::database::db_definition
class:
list
Data type: Hash
A list of database profiles to define.
The default value is: {}
This is a simple way to get started. It is easy to get started, but soon your hiera yaml become a nigtmare. Our advise is when you need to let puppet manage your database, to override this class and add your own puppet implementation. This is much better maintainable and adds more consistency.
pg_profile::database::db_instances
pg_profile::database::db_instances
When these customizations aren't enough, you can replace the class with your own class. See ora_profile::database for an explanation on how to do this.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the pg_profile::database::db_instances
class:
defaults
Data type: Hash
list
Data type: Hash
pg_profile::database::db_parameters
pg_profile::database::db_parameters
When these customizations aren't enough, you can replace the class with your own class. See pg_profile::database for an explanation on how to do this.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the pg_profile::database::db_parameters
class:
list
Data type: Hash
A list of database properties to define.
The default value is: {}
This is a simple way to get started. It is easy to get started, but soon your hiera yaml become a nigtmare. Our advise is when you need to let puppet manage your database, to override this class and add your own puppet implementation. This is much better maintainable and adds more consistency.
pg_profile::database::db_records
pg_profile::database::db_records
When these customizations aren't enough, you can replace the class with your own class. See pg_profile::database for an explanation on how to do this.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the pg_profile::database::db_records
class:
list
Data type: Hash
A Hash of the database records you want to add to the system.
The default value is {}
pg_profile::database::db_roles
pg_profile::database::db_roles
When these customizations aren't enough, you can replace the class with your own class. See pg_profile::database for an explanation on how to do this.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the pg_profile::database::db_roles
class:
list
Data type: Hash
A list of database profiles to define.
The default value is: {}
This is a simple way to get started. It is easy to get started, but soon your hiera yaml become a nigtmare. Our advise is when you need to let puppet manage your roles, to override this class and add your own puppet implementation. This is much better maintainable and adds more consistency.
pg_profile::database::db_schemas
pg_profile::database::db_schemas
When these customizations aren't enough, you can replace the class with your own class. See pg_profile::database for an explanation on how to do this.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the pg_profile::database::db_schemas
class:
list
Data type: Hash
A Hash of the database schemas you want to add to the system.
The default value is {}
pg_profile::database::db_software
pg_profile::database::db_software
When these customizations aren't enough, you can replace the class with your own class. See pg_profile::database for an explanation on how to do this.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the pg_profile::database::db_software
class:
proxy
base_url
install_contrib
install_devel
install_docs
install_llvmjit
install_odbc
install_plperl
install_plpython3
install_pltcl
install_test
proxy
Data type: Optional[String[1]]
The url of a proxy to use for accessing the Purgres yum server
base_url
Data type: String[1]
The base URL for the Postgres yum channel.
install_contrib
Data type: Boolean
If you want to install the Postgres contrib
package, set this value to true
.
The default value is false
.
install_devel
Data type: Boolean
If you want to install the Postgres devel
package, set this value to true
.
The default value is false
.
install_docs
Data type: Boolean
If you want to install the Postgres docs
package, set this value to true
.
The default value is false
.
install_llvmjit
Data type: Boolean
If you want to install the Postgres llvmjit
package, set this value to true
.
The default value is false
.
install_odbc
Data type: Boolean
If you want to install the Postgres odbc
package, set this value to true
.
The default value is false
.
install_plperl
Data type: Boolean
If you want to install the Postgres plperl
package, set this value to true
.
The default value is false
.
install_plpython3
Data type: Boolean
If you want to install the Postgres plpython3
package, set this value to true
.
The default value is false
.
install_pltcl
Data type: Boolean
If you want to install the Postgres pltcl
package, set this value to true
.
The default value is false
.
install_test
Data type: Boolean
If you want to install the Postgres test
package, set this value to true
.
The default value is false
.
pg_profile::database::db_tablespaces
pg_profile::database::db_tablespaces
When these customizations aren't enough, you can replace the class with your own class. See pg_profile::database for an explanation on how to do this.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the pg_profile::database::db_tablespaces
class:
list
Data type: Hash
A list of database tablespaces to define.
The default value is: {}
This is a simple way to get started. It is easy to get started, but soon your hiera yaml become a nigtmare. Our advise is when you need to let puppet manage your Postgres tablespaces, to override this class and add your own puppet implementation. This is much better maintainable
and adds more consistency.
pg_profile::database::disable_thp
ora_profile::database::disable_thp
As documented in Oracle support ALERT https://support.oracle.com/epmos/faces/DocumentDisplay?id=1557478.1, the class will disable Transparent HugePages on RedHat os family starting with version 6.
When these customizations aren't enough, you can replace the class with your own class. See ora_profile::database for an explanation on how to do this.
See the file "LICENSE" for the full license governing this code.
pg_profile::database::em_license
pg_profile::database::em_license
See the file "LICENSE" for the full license governing this code.
pg_profile::secured_database
pg_profile::secured_database
In it's core just adding:
contain pg_profile::secured_database
Is enough to get a secured Postgres database running on your system.
This profile class is based on the more generic pg_profile::database
class, but extends this class with securing the database conforming to the Postgres Center for Internet Security (CIS) rules.
See the file "LICENSE" for the full license governing this code.
Functions
set_param
Type: Ruby 4.x API
See the file "LICENSE" for the full license governing this code.
Returns the value for requested parameter. Currently supported parameters:
- instance_name
- instance_number
- thread_number
rubocop: disable Metrics/AbcSize rubocop: disable Metrics/CyclomaticComplexity rubocop: disable Metrics/PerceivedComplexity rubocop: disable Metrics/MethodLength
set_param(String $param_name, String $dbname, Optional[Undef] $cluster_nodes)
The set_param function.
Returns: String
param_name
Data type: String
dbname
Data type: String
cluster_nodes
Data type: Optional[Undef]
set_param(String $param_name, String $dbname, Array $cluster_nodes)
The set_param function.
Returns: Any
param_name
Data type: String
dbname
Data type: String
cluster_nodes
Data type: Array
Changelog
All notable changes to this project will be documented in this file.
Release 0.5.0
- [data] Updated GPG key for repo's
- [core] Add puppet 8 support
Release 0.4.0
- [core] Add support for EL 9
- [release] Update dependencies
Release 0.3.0
- [core] Add support for multiple postgres instances
Release 0.2.0
- [release] Add support for AlmaLinux and Rocky
- [em_license] Use license::activate instead of license::available
Release 0.1.1
Bug fixes
- [db_software] Fix when running on RHEL 8 release
Release 0.1.0
New Features
- Initial release
Bug fixes
Dependencies
- enterprisemodules/easy_type (>= 2.16.0 < 3.0.0)
- enterprisemodules/pg_config (>= 1.0.0 < 2.0.0)
- enterprisemodules/pg_secured (>= 0.1.0 < 1.0.0)
- puppetlabs-yumrepo_core (>= 1.0.0 < 3.0.0)
- ipcrm-echo (>= 0.1.6 < 1.0.0)
- puppet-augeasproviders_core (>= 2.1.4 < 5.0.0)
- puppet-augeasproviders_sysctl (>= 2.2.0 < 4.0.0)
- puppet-augeasproviders_grub (>= 2.2.0 < 6.0.0)
- puppet-augeasproviders_postgresql (>= 2.2.0 < 6.0.0)
- saz-limits (>= 3.0.2 < 4.0.0)
- puppetlabs-firewall (>= 1.12.0 < 8.0.0)
- puppet-firewalld (>= 4.0.0 < 6.0.0)
- puppetlabs-stdlib (>= 4.25.0 < 10.0.0)
- puppet-systemd (>= 3.0.0 < 7.0.0)