Puppet Class: st2::scheduler

Inherits:
st2
Defined in:
manifests/scheduler.pp

Summary

Manages the st2scheduler service.

Overview

Normally this class is instantiated by st2::profile::fullinstall. However, advanced users can instantiate this class directly to configure and manage just the st2scheduler service on a single node. Parameters for this class mirror the parameters in the st2 config.

Examples:

Basic usage

include st2::scheduler

Customizing parameters

class { 'st2::scheduler':
  sleep_interval => 60,
  gc_interval    => 120,
}

Parameters:

  • sleep_interval (Any) (defaults to: $st2::scheduler_sleep_interval)

    How long (in seconds) to sleep between each action scheduler main loop run interval.

  • gc_interval (Any) (defaults to: $st2::scheduler_gc_interval)

    How often (in seconds) to look for zombie execution requests before rescheduling them.

  • pool_size (Any) (defaults to: $st2::scheduler_pool_size)

    The size of the pool used by the scheduler for scheduling executions.

  • scheduler_num (Any) (defaults to: $st2::scheduler_num)

    The number of schedulers to have in an active active state

  • scheduler_services (Any) (defaults to: $st2::params::scheduler_services)

    Name of all the scheduler services.

See Also:



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'manifests/scheduler.pp', line 30

class st2::scheduler (
  $sleep_interval     = $st2::scheduler_sleep_interval,
  $gc_interval        = $st2::scheduler_gc_interval,
  $pool_size          = $st2::scheduler_pool_size,
  $scheduler_num      = $st2::scheduler_num,
  $scheduler_services = $st2::params::scheduler_services
) inherits st2 {

  # st2scheduler was introduced in 2.10.0
  if st2::version_ge('2.10.0') {

    $_logger_config = $st2::syslog ? {
      true    => 'syslog',
      default => 'logging',
    }

    ########################################
    ## Config
    ini_setting { 'scheduler_logging':
      ensure  => present,
      path    => '/etc/st2/st2.conf',
      section => 'scheduler',
      setting => 'logging',
      value   => "/etc/st2/${_logger_config}.scheduler.conf",
      tag     => 'st2::config',
    }

    st2::service { 'st2scheduler':
      service_name      => 'st2scheduler',
      service_num       => $scheduler_num,
      existing_services => $scheduler_services,
    }
  }
}