db2_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-db2_profile', '1.0.0'
Learn more about managing modules with a PuppetfileDocumentation
Table of Contents
Overview
The db2_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 DB2 databases with Puppet. Besides the db2_profile
module, this family also contains:
- db2_install For installing an DB2 databases.
- db2_config For configuring every aspect of your DB2 database
- db2_secured To secure your databases according to the CIS benchmarks or STIG documents.
This module support DB2 version 10 and 11
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 DB2 modules.
Description
The db2_profile::database
class contains all the Puppet code to install, create and populate an DB2 database. This class is an easy way to get started. It contains the following steps:
em_license
(setup Enterprise Modules licenses)setup
(Setup DB2 including fact caching)sysctl
(Set required sysctl settings)limits
(Set required security limits)groups_and_users
(Ensure required OS groups and users)packages
(Ensure require OS packages)firewall
(Configure firewall for DB2 usage)db_software
(Install the DB2 software)db_fixpack
(Install the DB2 fixpack)db_instance
(Ensure DB2 instances)db_definition
(Ensure DB2 databases)db_primary
(Set the database as primary database when using HADR)db_standby
(Set the database as standby database when using HADR)db_tablespaces
(Ensure DB2 tablespaces)db_users
(Ensure DB2 users in database)db_roles
(Ensure DB2 roles)db_groups
(Ensure DB2 groups in database)db_schemas
(Ensure DB2 schemas)db_startup
(Esnure DB2 startup after reboot)
All these steps have a default implementation. This implementation is suitable to get started with. These classes 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:
db2_profile::database::before_sysctl: my_profile::my_extra_class
or after:
db2_profile::database::after_sysctl: my_profile::my_extra_class
If you want to, you can also skip this provided class:
db2_profile::database::sysctl: skip
Or provide your own implementation:
db2_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.
Check here to see the full documentation for this module.
Setup
Requirements
The db2_profile
module requires:
- Puppet module
enterprisemodules-db2_config
installed. - Puppet module
enterprisemodules-db2_install
installed. - Puppet module
enterprisemodules-easy_type
installed. - Puppet module
enterprisemodules/db2_secured
installed. - Puppet module
ipcrm-echo
installed. - Puppet module
puppet-augeasproviders_core
installed. - Puppet module
herculesteam-augeasproviders_sysctl
installed. - Puppet module
saz-limits
installed. - Puppet module
puppetlabs-firewall
installed. - Puppet module
crayfishx-firewalld
installed. - Puppet module
puppetlabs-stdlib
installed. - Puppet version 4.0 or higher. Can be Puppet Enterprise or Puppet Open Source
- DB2 11 higher
- A valid IBM DB2 license
- A valid Enterprise Modules license for usage.
- Runs on most Linux systems.
- Windows systems are NOT supported
Installing the db2_profile module
To install these modules, you can use a Puppetfile
mod 'enterprisemodules/db2_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-db2_profile
Usage
To get started, include the db2_profile::database
class in your role and add the next hiera data for your node:
db2_profile::database::source: http://myserver/my_software
db2_profile::name: MYDB
db2_profile::location: /opt/ibm/db2/V11.5
db2_profile::version: '11.5'
db2_profile::database::db_software::file_name: DB2S_11.5.4_MPML.tar.gz
db2_profile::database::db_fixpack::version: '11.5.7'
db2_profile::database::db_fixpack::file_name: v11.5.7_linuxx64_universal_fixpack.tar.gz
Make sure the files:
- DB2S_11.5.4_MPML.tar.gz
- v11.5.7_linuxx64_universal_fixpack.tar.gz
Are downloaded and available in the location you specified as db2_profile::database::source
.
Run Puppet and you have a running IBM DB2 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 4. The module does NOT run on windows systems.
Reference
Table of Contents
Classes
db2_profile
: Common variablesdb2_profile::database
: This is a highly customizable Puppet profile class to define an IBM DB2 database on your system.db2_profile::database::cis_controls
: This class contains the actual code securing the database.db2_profile::database::db_definition
: This class contains the actual database definition using thedb2_database
type.db2_profile::database::db_fixpack
: This class ensure's that the correct DB2 fixpack is installed.db2_profile::database::db_fixpack_multiple
: This class ensure's that the correct DB2 fixpack is installed.db2_profile::database::db_groups
: This class contains the definition for all the database users you'd like on your system.db2_profile::database::db_instance
: This class allows you to specify what DB2 database instance you want to define on your databases.db2_profile::database::db_primary
: When the propertydb2_profile::database::primary
is set, and the current node is the designated primary server, this class will be applied.db2_profile::database::db_roles
: This class allows you to specify what DB2 database role you want to define on your databases.db2_profile::database::db_schemas
: This class contains the definition for all the database users you'd like on your system.db2_profile::database::db_software
: This class installs the IBM DB2 sofware on your system.db2_profile::database::db_software_multiple
: This class allows you in install mutiple instances of DB2 sofware on your system.db2_profile::database::db_standby
: When the propertydb2_profile::database::primary
is set, and the current node is not the designated primary server, this class will be applied.db2_profile::database::db_startup
: This class ensures that the specified instance will be started after a system reboot.db2_profile::database::db_tablespaces
: This class allows you to specify what DB2 database tablespace you want to define on your databases.db2_profile::database::db_users
: This class allows you to specify what DB2 database user you want to define on your databases.db2_profile::database::em_license
: db2_profile::database::em_license See the file "LICENSE" for the full license governing this code.db2_profile::database::fact_caching
: This class will enable DB2 fact caching, when enabled.db2_profile::database::pacemaker_setup
: This class takes care of applying all Pacemeker resources.db2_profile::database::passwordless_root
: The class enables passwordless root access between the nodes in the cluster.db2_profile::secured_database
: db2_profile::secured_database See the file "LICENSE" for the full license governing this code.
Data types
Classes
db2_profile
db2_profile::db2_profile
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the db2_profile
class:
location
Data type: String[1]
The locatin where the DB2 sofware is or will be installed.
source
Data type: Stdlib::Absolutepath
The location of the DB2 software. Here is an example on how to use this: class { '::db2_install::...': ... source => '/software', ... }
version
Data type: Db2_Install::Version
The version to be installed. Here is an example on how to use this: class { '::db2_install::software': ... version => '11.0.0.0', ... }
db2_profile::database
db2_profile::database
In it's core just adding:
contain db2_profile::database
Is enough to get an IBM DB2 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.
Steps
Defining and starting an DB2 database on you system goes through several steps :
em_license
(setup Enterprise Modules licenses)fact_caching
(Configure DB2 fact caching)sysctl
(Set required sysctl settings)limits
(Set required security limits)groups_and_users
(Ensure required OS groups and users)packages
(Ensure require OS packages)firewall
(Configure firewall for DB2 usage)db_software
(Install the DB2 software)db_fixpack
(Install the DB2 fixpack)db_instance
(Ensure DB2 instances)db_definition
(Ensure DB2 databases)db_primary
(Set the database as primary database when using HADR)db_standby
(Set the database as standby database when using HADR)db_tablespaces
(Ensure DB2 tablespaces)db_users
(Ensure DB2 users in database)db_roles
(Ensure DB2 roles)db_groups
(Ensure DB2 groups in database)db_schemas
(Ensure DB2 schemas)db_startup
(Esnure DB2 startup after reboot)
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:
db2_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:
db2_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:
db2_profile::database::sysctl: skip
Replacing
Or provide your own implementation:
db2_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.
Look at the description of the steps and their properties.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the db2_profile::database
class:
cluster_manager
passwordless_root
before_passwordless_root
after_passwordless_root
pacemaker_setup
before_pacemaker_setup
after_pacemaker_setup
after_db_primary
after_db_standby
before_db_primary
before_db_standby
db_primary
db_standby
primary
after_db_definition
after_db_fixpack
after_db_instance
after_db_roles
after_db_software
after_db_startup
after_db_tablespaces
after_db_users
after_db_groups
after_db_schemas
after_em_license
after_fact_caching
after_firewall
after_groups_and_users
after_limits
after_packages
after_sysctl
before_db_definition
before_db_fixpack
before_db_instance
before_db_roles
before_db_software
before_db_startup
before_db_schemas
before_db_tablespaces
before_db_users
before_db_groups
before_em_license
before_fact_caching
before_firewall
before_groups_and_users
before_limits
before_packages
before_sysctl
db_definition
db_fixpack
db_instance
db_roles
db_groups
db_schemas
db_software
db_startup
db_tablespaces
db_users
em_license
fact_caching
firewall
groups_and_users
limits
packages
sysctl
cluster_manager
Data type: Optional[String]
The cluster manager to apply when using a HADR setup. At this point in time only the Pacemaker cluster manager is supported. When you leave this paramater undefined, no cluster manager is applied.
Default value: undef
passwordless_root
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage limits
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::passwordless_root: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::passwordless_root: skip
Default value: undef
before_passwordless_root
Data type: Optional[String]
The name of the class you want to execute directly before the passwordless_root
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::before_passwordless_root: my_module::my_class
Default value: undef
after_passwordless_root
Data type: Optional[String]
The name of the class you want to execute directly after the passwordless_root
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::after_passwordless_root: my_module::my_class
Default value: undef
pacemaker_setup
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage pacemaker_setup
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::pacemaker_setup: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::pacemaker_setup: skip
Default value: undef
before_pacemaker_setup
Data type: Optional[String]
The name of the class you want to execute directly before the pacemaker_setup
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::before_pacemaker_setup: my_module::my_class
Default value: undef
after_pacemaker_setup
Data type: Optional[String]
The name of the class you want to execute directly after the pacemaker_setup
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::after_pacemaker_setup: my_module::my_class
Default value: undef
after_db_primary
Data type: Optional[String]
The name of the class you want to execute directly after the db_primary
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::after_db_primary: my_module::my_class
Default value: undef
after_db_standby
Data type: Optional[String]
The name of the class you want to execute directly after the db_standby
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::after_db_primary: my_module::my_class
Default value: undef
before_db_primary
Data type: Optional[String]
The name of the class you want to execute directly before the db_primary
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::before_db_primary: my_module::my_class
Default value: undef
before_db_standby
Data type: Optional[String]
The name of the class you want to execute directly before the db_standby
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::before_db_standby: my_module::my_class
Default value: undef
db_primary
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage db_primary
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::db_primary: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::db_primary: skip
Default value: undef
db_standby
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage db_standby
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::db_standby: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::db_standby: skip
Default value: undef
primary
Data type: Optional[String[1]]
The full qualified host name of the node you wan to use as primary DB2 node.
When you specify this variable, Puppet will create a HADR DB2 configuration. When the current FQDN equals the name specfied here, Puppet will create a primary DB2 node. When the FQDN is different, Puppet will configure the node as a standby database.
You'll have to ensure the the setting for the db2_database
for all nodes are set correctly. These values are relevant:
- hadr_local_host
- hadr_local_svc
- hadr_remote_host
- hadr_remote_svc
- hadr_remote_inst
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:
db2_profile::database::after_db_definition: my_module::my_class
Default value: undef
after_db_fixpack
Data type: Optional[String]
The name of the class you want to execute directly after the db_fixpack
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::after_db_fixpack: my_module::my_class
Default value: undef
after_db_instance
Data type: Optional[String]
The name of the class you want to execute directly after the db_instance
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::after_db_instance: 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_roles
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::after_db_roles: 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:
db2_profile::database::after_db_software: my_module::my_class
Default value: undef
after_db_startup
Data type: Optional[String]
The name of the class you want to execute directly after the db_startup
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::after_db_startup: 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:
db2_profile::database::after_db_tablespaces: my_module::my_class
Default value: undef
after_db_users
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:
db2_profile::database::after_db_users: my_module::my_class
Default value: undef
after_db_groups
Data type: Optional[String]
The name of the class you want to execute directly after the db_groups
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::after_db_groups: 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:
db2_profile::database::after_db_schemas: my_module::my_class
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:
db2_profile::database::after_em_license: my_module::my_class
Default value: undef
after_fact_caching
Data type: Optional[String]
The name of the class you want to execute directly after the fact_caching
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::after_fact_caching: 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:
db2_profile::database::after_firewall: 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:
db2_profile::database::after_groups_and_users: 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:
db2_profile::database::after_limits: 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:
db2_profile::database::after_packages: 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:
db2_profile::database::after_sysctl: 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_definitio
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::before_db_definitio: my_module::my_class
Default value: undef
before_db_fixpack
Data type: Optional[String]
The name of the class you want to execute directly before the db_fixpack
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::before_db_fixpack: my_module::my_class
Default value: undef
before_db_instance
Data type: Optional[String]
The name of the class you want to execute directly before the db_instance
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::before_db_instance: 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_roles
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::before_db_roles: 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:
db2_profile::database::before_db_software: my_module::my_class
Default value: undef
before_db_startup
Data type: Optional[String]
The name of the class you want to execute directly before the db_startup
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::before_db_startup: 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:
db2_profile::database::before_db_schemas: 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:
db2_profile::database::before_db_tablespaces: my_module::my_class
Default value: undef
before_db_users
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:
db2_profile::database::before_db_users: my_module::my_class
Default value: undef
before_db_groups
Data type: Optional[String]
The name of the class you want to execute directly before the db_groups
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::before_db_groups: my_module::my_class
Default value: undef
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:
db2_profile::database::before_em_license: my_module::my_class
Default value: undef
before_fact_caching
Data type: Optional[String]
The name of the class you want to execute directly before the fact_caching
class.
You can use hiera to set this value. Here is an example:
db2_profile::database::before_fact_caching: 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:
db2_profile::database::before_firewall: 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:
db2_profile::database::before_groups_and_users: 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:
db2_profile::database::before_limits: 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:
db2_profile::database::before_packages: 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:
db2_profile::database::before_sysctl: my_module::my_class
Default value: undef
db_definition
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage db_definition
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::db_definition: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::db_definition: skip
Default value: undef
db_fixpack
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage db_fixpack
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::db_fixpack: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::db_fixpack: skip
Default value: undef
db_instance
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage db_instance
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::db_instance: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::db_instance: skip
Default value: undef
db_roles
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage db_roles
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::db_roles: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::db_roles: skip
Default value: undef
db_groups
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage db_groups
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::db_groups: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::db_groups: skip
Default value: undef
db_schemas
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage db_schemas
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::db_schemas: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::db_schemas: skip
Default value: undef
db_software
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage db_software
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::db_software: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::db_software: skip
Default value: undef
db_startup
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage db_startup
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::db_startup: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::db_startup: skip
Default value: undef
db_tablespaces
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage db_tablespaces
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::db_tablespaces: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::db_tablespaces: skip
Default value: undef
db_users
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage db_users
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::db_users: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::db_users: skip
Default value: undef
em_license
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage em_license
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::em_license: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::em_license: skip
Default value: undef
fact_caching
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage fact_caching
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::fact_caching: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::fact_caching: skip
Default value: undef
firewall
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage firewall
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::firewall: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::firewall: 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 stage groups_and_users
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::groups_and_users: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::groups_and_users: skip
Default value: undef
limits
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage limits
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::limits: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::limits: skip
Default value: undef
packages
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage packages
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::packages: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::packages: skip
Default value: undef
sysctl
Data type: Optional[String]
Use this value if you want to skip or use your own class for stage sysctl
.
Use your own class
You can use hiera to set this value. Here is an example:
db2_profile::database::sysctl: my_module::my_class
Skip
You can use hiera to set this value. Here is an example:
db2_profile::database::sysctl: skip
Default value: undef
db2_profile::database::cis_controls
db2_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 db2_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 db2_profile::database::cis_controls
class:
instance
Data type: String[1]
The instance to use for the database.
database
Data type: String[1]
The database name to use for the primary or standby database. this needs to be the same on the primary and standby nodes.
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.
db2_profile::database::db_definition
db2_profile::database::db_definition
Here you can customize some of the attributes of your database.
When these customizations aren't enough, you can replace the class with your own class. See db2_config::db2_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 db2_profile::database::db_definition
class:
list
Data type: Hash
The list of [db2_database](/docs/db2_config/db2_database.
html) database you want db2_profile::database
to create and manage for you.
db2_profile::database::db_fixpack
db2_profile::database::db_fixpack
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the db2_profile::database::db_fixpack
class:
temp_dir
Data type: Stdlib::Absolutepath
This defined type uses a temporary directory.
By default this is \tmp
. If you want to use an other directory for this, you must specify this parameter.
Here is an example on how to use this:
class { '::db2_install::...':
...
temp_dir => '/my_tmp_dir',
...
}
On systems with a secured /tmp
direcory, you MUST specify the tmp_dir
parameter and specify a directory that puppet is allowed to execute scripts from. It must also have enough space to receive the extracted MQ installation kit.
Default value: '/tmp'
version
Data type: Optional[String[1]]
The version to be installed. Here is an example on how to use this: class { '::db2_install::software': ... version => '11.0.0.0', ... }
Default value: undef
source
Data type: String[1]
The location of the DB2 software. Here is an example on how to use this: class { '::db2_install::...': ... source => '/software', ... }
file_name
Data type: Optional[String[1]]
The file containing the install kit for the DB2 software.
Default value: undef
location
Data type: Stdlib::Absolutepath
The locatin where the DB2 sofware is or will be installed.
logoutput
Data type: Variant[Boolean,Enum['on_failure']]
If you want to see the output of the exec
resources in the type, you can set this value to true
.
The default is on_failure
.
Here is an example on how to use this:
class { '::db2_install::...':
...
logoutput => true,
...
}
Default value: lookup({ name => 'logoutput', default_value => 'on_failure' })
db2_profile::database::db_fixpack_multiple
db2_profile::database::db_fixpack_multiple
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the db2_profile::database::db_fixpack_multiple
class:
software
Data type: Hash[String[1], Db2_profile::Sw_def]
A Hash containing the locations you want the software of a fixpeck to be applied to.
source
Data type: String[1]
The location of the DB2 software. Here is an example on how to use this: class { '::db2_install::...': ... source => '/software', ... }
logoutput
Data type: Variant[Boolean,Enum['on_failure']]
If you want to see the output of the exec
resources in the type, you can set this value to true
.
The default is on_failure
.
Here is an example on how to use this:
class { '::db2_install::...':
...
logoutput => true,
...
}
Default value: lookup({ name => 'logoutput', default_value => 'on_failure' })
temp_dir
Data type: Stdlib::Absolutepath
This defined type uses a temporary directory.
By default this is \tmp
. If you want to use an other directory for this, you must specify this parameter.
Here is an example on how to use this:
class { '::db2_install::...':
...
temp_dir => '/my_tmp_dir',
...
}
On systems with a secured /tmp
direcory, you MUST specify the tmp_dir
parameter and specify a directory that puppet is allowed to execute scripts from. It must also have enough space to receive the extracted MQ installation kit.
Default value: '/tmp'
db2_profile::database::db_groups
db2_profile::database::db_users
When these customizations aren't enough, you can replace the class with your own class. See db2_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 db2_profile::database::db_groups
class:
list
Data type: Hash
A list of database users to define.
You must specify a Hash of db2_user
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 DB2 group, to override this class and add your own puppet implementation. This is much better maintainable
and adds more consistency.
db2_profile::database::db_instance
db2_profile::database::db_instance
Check the documentation of db2_instance on how to do this and what properties you can define on an instance.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the db2_profile::database::db_instance
class:
list
Data type: Hash
The list of [db2_instance](/docs/db2_config/db2_instance.
html) instances you want db2_profile::database
to create and manage for you.
db2_profile::database::db_primary
db2_profile::database::db_primary
It will set the database in archiving mode, create a backup and then set the database in primary mode.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the db2_profile::database::db_primary
class:
instance
Data type: String[1]
The instance to use for the database.
database
Data type: String[1]
The database name to use for the primary or standby database. this needs to be the same on the primary and standby nodes.
archive_path
Data type: Stdlib::Absolutepath
The path to use for DB2 archiving.
backup_path
Data type: Stdlib::Absolutepath
The location to put the DB2 database backup.
owner
Data type: String[1]
The owner to use for the archive and backup directories.
group
Data type: String[1]
The group to use for the archive and backup directories.
wait_time
Data type: Integer
The in seconds to wait to set he database in primary mode aftercthe backup has been made.
logoutput
Data type: Variant[Boolean,Enum['on_failure']]
If you want to see the output of the exec
resources in the type, you can set this value to true
.
The default is on_failure
.
Here is an example on how to use this:
class { '::db2_install::...':
...
logoutput => true,
...
}
Default value: lookup({ name => 'logoutput', default_value => 'on_failure' })
db2_profile::database::db_roles
db2_profile::database::db_roles
Check the documentation of db2_role on how to do this and what properties you can define on an role.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the db2_profile::database::db_roles
class:
list
Data type: Hash
The list of [db2_role](/docs/db2_config/db2_role.
html) roles you want db2_profile::database
to create and manage for you.
db2_profile::database::db_schemas
db2_profile::database::db_users
When these customizations aren't enough, you can replace the class with your own class. See db2_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 db2_profile::database::db_schemas
class:
list
Data type: Hash
A list of database users to define.
You must specify a Hash of db2_user
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 DB2 schemas, to override this class and add your own puppet implementation. This is much better maintainable
and adds more consistency.
db2_profile::database::db_software
db2_profile::database::db_software
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the db2_profile::database::db_software
class:
file_name
Data type: String[1]
The file containing the install kit for the DB2 software.
location
Data type: Stdlib::Absolutepath
The locatin where the DB2 sofware is or will be installed.
source
Data type: String[1]
The location of the DB2 software. Here is an example on how to use this: class { '::db2_install::...': ... source => '/software', ... }
version
Data type: Db2_Install::Version
The version to be installed. Here is an example on how to use this: class { '::db2_install::software': ... version => '11.0.0.0', ... }
db2_profile::database::db_software_multiple
db2_profile::database::db_software_multiple
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the db2_profile::database::db_software_multiple
class:
software
Data type: Hash[String[1], Db2_profile::Sw_def]
A Hash containing the locations you want the software of a fixpeck to be applied to.
source
Data type: String[1]
The location of the DB2 software. Here is an example on how to use this: class { '::db2_install::...': ... source => '/software', ... }
db2_profile::database::db_standby
db2_profile::database::db_standby
When the named database does not yet run on the server, Puppet will use the backup at the backup_path
to create an intial running database and set it in standby mode.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the db2_profile::database::db_standby
class:
list
Data type: Hash
A hash of db2_database
entries.
instance
Data type: String[1]
The instance to use for the database.
database
Data type: String[1]
The database name to use for the primary or standby database. this needs to be the same on the primary and standby nodes.
backup_path
Data type: Stdlib::Absolutepath
The path where DB2 can find the backup of this database.
Before applying this class, you'll have to use a before_db_standby
class to copy the backup from the primary DB2 node to the location specified by this parameter.
archive_path
Data type: String[1]
The path to use for DB2 archiving.
group
Data type: String[1]
The group to use for the archive and backup directories.
owner
Data type: String[1]
The owner to use for the archive and backup directories.
logoutput
Data type: Variant[Boolean,Enum['on_failure']]
If you want to see the output of the exec
resources in the type, you can set this value to true
.
The default is on_failure
.
Here is an example on how to use this:
class { '::db2_install::...':
...
logoutput => true,
...
}
Default value: lookup({ name => 'logoutput', default_value => 'on_failure' })
db2_profile::database::db_startup
db2_profile::database::db_startup
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the db2_profile::database::db_startup
class:
instance_name
Data type: String[1]
location
Data type: Stdlib::Absolutepath
The locatin where the DB2 sofware is or will be installed.
db2_profile::database::db_tablespaces
db2_profile::database::db_tablespaces
Check the documentation of db2_tablespace on how to do this and what properties you can define on an tablespace.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the db2_profile::database::db_tablespaces
class:
list
Data type: Hash
The list of [db2_tablespace](/docs/db2_config/db2_tablespace.
html) tablespaces you want db2_profile::database
to create and manage for you.
db2_profile::database::db_users
db2_profile::database::db_users
Check the documentation of db2_user on how to do this and what properties you can define on an user.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the db2_profile::database::db_users
class:
list
Data type: Hash
The list of [db2_user](/docs/db2_config/db2_user.
html) users you want db2_profile::database
to create and manage for you.
db2_profile::database::em_license
db2_profile::database::em_license
See the file "LICENSE" for the full license governing this code.
db2_profile::database::fact_caching
db2_profile::database::fact_caching
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the db2_profile::database::fact_caching
class:
enabled
Data type: Boolean
Boolean to determine if you want to enabled Puppet fact caching for the DB2 facts.
db2_profile::database::pacemaker_setup
db2_profile::database::pacemaker_setup
Together these resources define a running Pacemaker cluster with multiple nodes.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the db2_profile::database::pacemaker_setup
class:
clusters
Data type: Hash
databases
Data type: Hash
The Pacemaker database resources you want to ensure on the system. See here for the attributes of the pcmk_database
instances
Data type: Hash
The Pacemaker instance resources you want to ensure on the system. See here for the attributes of the pcmk_instance
qdevices
Data type: Hash
The Pacemaker qdevice resources you want to ensure on the system. See here for the attributes of the pcmk_qdevice
vips
Data type: Hash
The Pacemaker vip resources you want to ensure on the system. See here for the attributes of the pcmk_vip
db2_profile::database::passwordless_root
db2_profile::database::passwordless_root
It will enable ssh access for the root account based on the specified private and public keys.
For this to work, all of the nodes must be reachable on the network before this class is applied.
See the file "LICENSE" for the full license governing this code.
Parameters
The following parameters are available in the db2_profile::database::passwordless_root
class:
nodes
Data type: Array[String[1]]
An array of nodes you want to enable passwordless root access between.
private_key
Data type: String[1]
public_key
Data type: String[1]
The public key to use to enable passwordless access between the nodes in the cluster.
db2_profile::secured_database
db2_profile::secured_database
See the file "LICENSE" for the full license governing this code.
Data types
Db2_profile::Sw_def
The Db2_profile::Sw_def data type.
Alias of
Struct[{
location => Stdlib::Absolutepath,
version => String[1],
file_name => String[1],
}]
Changelog
All notable changes to this project will be documented in this file.
Release 1.0.0
Features
- [core] Add db2_config::setup to steps
- [core] Add support for Puppet 8 and ruby 3.2
Release 0.4.1
Fixes
- [release] Fix dependencies
Release 0.4.0
Features
- [cis_controls] Initial version
- [core] Add EL9 support
Release 0.3.1
Fixes
- [packages] Fix incompatibility between RHEL 7 and 8
- [database] Fix way we call pacemaker_setup
Release 0.3.0
Features
- [core] Add Pacemaker cluster manager support
Release 0.2.0
Features
- [core] Add support for hadr configurations
Release 0.1.0
Features
- Initial release
Dependencies
- enterprisemodules/easy_type (>= 2.41.3 < 3.0.0)
- enterprisemodules/db2_config (>= 0.4.0 < 2.0.0)
- enterprisemodules/db2_install (>= 0.3.0 < 2.0.0)
- enterprisemodules/db2_secured (>= 0.3.0 < 2.0.0)
- ipcrm-echo (>= 0.1.6 < 1.0.0)
- puppet-augeasproviders_core (>= 2.1.4 < 4.0.0)
- puppet-augeasproviders_sysctl (>= 2.2.0 < 4.0.0)
- saz-limits (>= 3.0.2 < 4.0.0)
- puppetlabs-firewall (>= 1.12.0 < 6.0.0)
- puppet-firewalld (>= 4.0.0 < 5.0.0)
- puppetlabs-stdlib (>= 4.25.0 < 10.0.0)