Version information
This version is compatible with:
- Puppet Enterprise 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
- Puppet >= 5.0.0 < 7.0.0
- , ,
Start using this module
Add this module to your Puppetfile:
mod 'treydock-pcp', '1.4.1'
Learn more about managing modules with a PuppetfileDocumentation
puppet-module-pcp
- Overview
- Usage - Configuration options
- Reference - Parameter and detailed reference to all options
- Compatibility
- Development - Guide for contributing to the module
Overview
This module manages Performance Co-Pilot (PCP)
Only PCP >= 3.11.3 is supported
Usage
To install PCP to log locally
class { 'pcp': }
Example of using PCP without default logger and pmie as well as disabling pmlogger log archival
class { '::pcp':
include_default_pmlogger => false,
include_default_pmie => false,
pmlogger_daily_args => '-M -k forever',
}
Define a new primary logger that logs to a shared location
pcp::pmlogger { 'supremm':
ensure => 'present',
hostname => 'LOCALHOSTNAME',
primary => true,
socks => false,
log_dir => '/data/supremm/pmlogger/LOCALHOSTNAME',
args => '-r -c config.default',
}
Install and enable a PMDA
pcp::pmda { 'slurm': }
Reference
http://treydock.github.io/puppet-module-pcp/
Compatibility
This module only works with PCP >= 3.11.3
Tested using
- CentOS 6
- CentOS 7
Development
Testing
Testing requires the following dependencies:
- rake
- bundler
Install gem dependencies
bundle install
Run unit tests
bundle exec rake test
If you have Vagrant >= 1.2.0 installed you can run system tests
bundle exec rake beaker
Reference
Table of Contents
Classes
Public Classes
pcp
: Manage PCP
Private Classes
pcp::config
:pcp::install
:pcp::params
:pcp::repo
:pcp::resources
:pcp::service
:pcp::user
:
Defined types
pcp::pmda
: Install, enable and optionally configure a PMDApcp::pmie
: Configure a pmiepcp::pmlogger
: Configure a pmlogger
Classes
pcp
Manage PCP
Examples
include ::pcp
Parameters
The following parameters are available in the pcp
class.
ensure
Data type: Enum['running', 'stopped', 'absent']
Defines state of PCP.
Valid values are running
, stopped
, or absent
.
Default is running
.
Default value: 'running'
manage_repo
Data type: Boolean
Determines if PCP repo should be managed.
Default is true
.
Default value: true
repo_baseurl
Data type: String
Base URL to pcp yum repo.
Default is https://dl.bintray.com/pcp/el%{::operatingsystemmajrelease}
.
Default value: $pcp::params::repo_baseurl
package_ensure
Data type: String
Package ensure property.
Value is set to absent if ensure
is absent
.
Default is present
.
Default value: 'present'
package_name
Data type: String
Name of PCP package.
Default is pcp
.
Default value: 'pcp'
extra_packages
Data type: Array
Array of extra packages to install for PCP
Default value: []
service_ensure
Data type: Optional[String]
Set service ensure property for pmcd
, pmie
and pmlogger
services.
Default is based on ensure
parameter.
Default value: undef
service_enable
Data type: Optional[Boolean]
Set service enable property for pmcd
, pmie
and pmlogger
services.
Default is based on ensure
parameter.
Default value: undef
enable_pmproxy
Data type: Boolean
Boolean that determines if pmproxy service is running/enabled.
Default is false
.
Default value: false
manage_user
Data type: Boolean
Boolean that sets if pcp user / group is managed.
Default is true
.
Default value: true
pcp_group_gid
Data type: Optional[Integer]
pcp group GID.
Default is undef
.
Default value: undef
pcp_user_uid
Data type: Optional[Integer]
pcp user UID.
Default is undef
.
Default value: undef
cron_ensure
Data type: Optional[String]
Ensure passed to cron files.
Default based on value of ensure
.
Default value: undef
pmlogger_cron_template
Data type: String
Template used for pmlogger cron.
Default is pcp/pcp-pmlogger.cron.erb
.
Default value: 'pcp/pcp-pmlogger.cron.erb'
pmie_cron_template
Data type: String
Template used for pmie cron.
Default is pcp/pcp-pmie.cron.erb
.
Default value: 'pcp/pcp-pmie.cron.erb'
include_default_pmlogger
Data type: Boolean
Boolean that determines if default install pmlogger is installed.
Default is true
.
Default value: true
include_default_pmie
Data type: Boolean
Boolean that determines if default install pmie is installed.
Default is true
.
Default value: true
pmlogger_daily_args
Data type: String
Arguments given to pmlogger_daily that is executed via cron.
Default is '-X xz -x 3'
.
Default value: '-X xz -x 3'
pmdas
Data type: Hash
Hash that defines pcp::pmda
resources.
Default value: {}
Defined types
pcp::pmda
Install, enable and optionally configure a PMDA
Examples
pcp::pmda { 'nfsclient':
ensure => 'present',
}
Parameters
The following parameters are available in the pcp::pmda
defined type.
ensure
Data type: Enum['present', 'absent']
Ensure property for the PMDA.
Valid values are 'present'
and 'absent'
.
Default is 'present'
.
Default value: 'present'
has_package
Data type: Boolean
Boolean that determines of a package is associated with the PMDA.
Default is true
.
Default value: true
package_name
Data type: Optional[String]
Package name of PMDA.
Default is pcp-pmda-$name
.
Default value: undef
remove_package
Data type: Boolean
Boolean that determines if the package should be removed when ensure
is absent
.
Default is false
.
Default value: false
config_path
Data type: Optional[Stdlib::Absolutepath]
Configuration file path for this PMDA.
Default is /var/lib/pcp/config/${name}/${name}.conf
.
Default value: undef
config_content
Data type: Optional[String]
Configuration file content for the PMDA.
Default is undef
.
Default value: undef
config_source
Data type: Optional[String]
Configuration file source for the PMDA.
Default is undef
.
Default value: undef
args
Data type: Optional[String]
Arguments that will be added to pmcd.conf for this PMDA
Default value: undef
pcp::pmie
Configure a pmie
Parameters
The following parameters are available in the pcp::pmie
defined type.
ensure
Data type: Enum['present', 'absent']
The pmie ensure property.
Valid values are present
and absent
.
Default is present
.
Default value: 'present'
hostname
Data type: String
Hostname associated with the pmie.
Default is 'LOCALHOSTNAME'
.
Default value: 'LOCALHOSTNAME'
primary
Data type: Boolean
Boolean that sets if this pmie is primary.
Default is false
.
Default value: false
socks
Data type: Boolean
Boolean that sets if this pmie uses pmsocks.
Default is false
.
Default value: false
log_file
Data type: String
The pmie control log file. Default is PCP_LOG_DIR/pmie/LOCALHOSTNAME/pmie.log
Default value: 'PCP_LOG_DIR/pmie/LOCALHOSTNAME/pmie.log'
args
Data type: String
Args passed to pmie. Default is an empty string.
Default value: ''
config_path
Data type: Optional[Stdlib::Absolutepath]
Config path for the pmie. If defined the value is passed as -c value
to the pmie arguments. Default is undef
.
Default value: undef
config_content
Data type: Optional[String]
The pmie config contents. Default is undef
.
Default value: undef
config_source
Data type: Optional[String]
The pmie config source. Default is undef
.
Default value: undef
pcp::pmlogger
Configure a pmlogger
Parameters
The following parameters are available in the pcp::pmlogger
defined type.
ensure
Data type: Enum['present', 'absent']
The pmlogger ensure property.
Valid values are present
and absent
.
Default is present
.
Default value: 'present'
hostname
Data type: String
Hostname associated with the pmlogger.
Default is 'LOCALHOSTNAME'
.
Default value: 'LOCALHOSTNAME'
primary
Data type: Boolean
Boolean that sets if this pmlogger is primary.
Default is false
.
Default value: false
socks
Data type: Boolean
Boolean that sets if this pmlogger uses pmsocks.
Default is false
.
Default value: false
log_dir
Data type: String
Log directory for this pmlogger.
Default is PCP_LOG_DIR/pmlogger/LOCALHOSTNAME
.
Default value: 'PCP_LOG_DIR/pmlogger/LOCALHOSTNAME'
args
Data type: String
Arguments passed to pmlogger. Default is an empty string.
Default value: ''
config_path
Data type: Optional[Stdlib::Absolutepath]
Config path for the pmlogger.
If defined the value is passed as -c value
to the pmlogger arguments.
Default is undef
.
Default value: undef
config_content
Data type: Optional[String]
The pmlogger config contents.
Default is undef
.
Default value: undef
config_source
Data type: Optional[String]
The pmlogger config source.
Default is undef
.
Default value: undef
1.4.1 (2018-12-18)
Fixed bugs:
1.4.0 (2018-12-04)
Implemented enhancements:
Fixed bugs:
Merged pull requests:
1.3.1 (2018-06-29)
Fixed bugs:
1.3.0 (2018-05-24)
Implemented enhancements:
1.2.0 (2018-05-18)
Implemented enhancements:
1.1.1 (2018-05-17)
Merged pull requests:
1.1.0 (2018-05-17)
Implemented enhancements:
1.0.0 (2017-11-12)
Implemented enhancements:
Merged pull requests:
0.0.3 - 2017-11-11
Bugfix release
- Fix mode on pmda config directory
- Updates to regression tests
0.0.2 - 2016-01-05
Summary
This release improves PMDA detection and removal.
0.0.1 - 2016-01-02
Summary
Initial release
Dependencies
- puppetlabs/stdlib (>= 4.13.1 <6.0.0)