puppet_run_scheduler
Version information
This version is compatible with:
- Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.7.0 < 6.0.0
- CentOS,OracleLinux,RedHat,Scientific,Debian,Ubuntu,windows,Fedora,SLES,Solaris
Start using this module
Add this module to your Puppetfile:
mod 'reidmv-puppet_run_scheduler', '0.2.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet_run_scheduler
Configure and distribute Puppet run frequency using Cron (Posix) and Scheduled Tasks (Windows).
Table of Contents
- Description
- Setup - The basics of getting started with puppet_run_scheduler
- Usage - Configuration options and additional functionality
Description
By default, Puppet runs once every 30 minutes on client systems, with a service and timer controlling the frequency of runs. For massive installations of Puppet the imprecise timing results in "waves" of load being seen on the Puppet servers, as tens of thousands of systems rarely distribute themselves perfectly throughout the run interval.
The puppet_run_scheduler module replaces the running service method of scheduling and replaces it with precise distribution of load using system schedulers, Cron (Posix) and Scheduled Tasks (Windows). This eliminates "waves" of load in massive installations, perfectly distributing activity through the run interval period.
Setup
What puppet_run_scheduler affects
The puppet service will be disabled when puppet_run_scheduler is implemented on all platforms.
On Windows, puppet_run_scheduler will install a Scheduled Task called "puppet-run-scheduler".
On Linux/Unix, puppet_run_scheduler will install a puppet-run-scheduler cron job under the root user.
Usage
Using a default 30m run interval, you can simply include the class.
include puppet_run_scheduler
Parameters exist that can be used to fine-tune exactly how the runs are scheduled.
class { 'puppet_run_scheduler':
run_interval => '4h',
splay_limit => '1h',
start_time => '16:00',
}
Parameters
ensure
Default: present
Supports "present" or "absent". Note that "present" is the default, and "absent" only exists to provide clean-up or rollback options in case the class is applied somewhere it shouldn't have been.
run_interval
Default: "30m"
What frequency Puppet should run at. This value cannot be any period; there is an enumerated list of acceptable values.
Valid values: 15m, 30m, 1h, 2h, 3h, 4h, 6h, 8h, 12h, 24h
splaylimit
Default: $run_interval
Same format as run_interval. How long a period of time to spread runs out over. By default runs will be fully spread out over the entire run_interval, but it is possible to have a shorter splaylimit.
start_time
Default: "00:00"
A specific time in the form of HH:MM that a Puppet run should start (subject to the splaylimit parameter). This is useful for organizations with long run intervals and specific maintenance windows. For example, given a run_interval of 4h and a splaylimit of 30m, administrators can use start_time to ensure that Puppet runs occur at the beginning of a known maintenance window.
Data Parameters
Additional parameters exist in private classes which can be set using Hiera to further adjust behavior.
puppet_run_scheduler::windows::scheduled_task_user
Default: "system"
The user to run the Puppet run scheduled task as.
puppet_run_scheduler::windows::scheduled_task_password
Default: undef
The password for the user to run the Puppet run scheduled task as. Only used if specifying a user other than "system".