Puppet Class: choria

Defined in:
manifests/init.pp

Overview

Installs, configures and manages the Choria Orchestrator

Parameters:

  • manage_package (Boolean)

    Manage the choria package

  • manage_service (Boolean)

    Manage the choria-server service

  • purge_machines (Boolean) (defaults to: true)

    Deletes Choria Autonomous Agents that are not managed by Puppet

  • scout_checks (Choria::ScoutChecks) (defaults to: {})

    Hash of Scout Checks for a node, ideal for use using Hiera

  • scout_metrics (Choria::ScoutMetrics) (defaults to: {})

    Hash of Scout Metrics for a node, ideal for use using Hiera

  • scout_overrides (Hash) (defaults to: {})

    Override data for Scout checks

  • scout_gossfile (Choria::GossFiles) (defaults to: {})

    Are validation rules for the Goss system

  • scout_annotations (Hash[String, String]) (defaults to: {})

    Annotations that will be applied to all Scout Checks

  • ensure (Enum["present", "absent"])

    Add or remove the software

  • version (String)

    The version of Choria to install

  • broker_config_file (Stdlib::Absolutepath)

    The configuration file for the broker

  • server_config_file (Stdlib::Absolutepath)

    The configuration file for the server

  • server_provisioning_token_file (Stdlib::Absolutepath)

    The configuration token to configure server provisioning

  • server_provisioning_token (Optional[String])

    The contents of the provisioning token

  • manage_server_config (Boolean)

    To manage the server config file or not, disable in provisioning mode

  • logfile (Stdlib::Absolutepath)

    The default file to log to

  • broker_logfile (Stdlib::Absolutepath) (defaults to: $logfile)

    The file to log the broker to

  • server_logfile (Stdlib::Absolutepath) (defaults to: $logfile)

    The file to log the server to

  • statusfile (Optional[Stdlib::Absolutepath])

    The file to write server status to

  • status_write_interval (Integer)

    How often the status file should be written in seconds

  • log_level (Enum[debug, info, warn, error, fatal])

    The default logging level to use

  • broker_log_level (Enum[debug, info, warn, error, fatal]) (defaults to: $log_level)

    The logging level to use for the broker

  • server_log_level (Enum[debug, info, warn, error, fatal]) (defaults to: $log_level)

    The logging level to use for the server

  • rubypath (Stdlib::Absolutepath)

    Path to the Ruby installation used for the MCollective compatibility shims

  • srvdomain (Optional[String])

    The domain name to use when doing SRV lookups

  • package_name (String)

    The package to install

  • broker_service_name (String)

    The service name of the Choria Broker

  • server_service_name (String)

    The service name of the Choria Server

  • server_service_enable (Boolean)

    Enable Choria Server at boot

  • identity (String)

    The identity this server will use to determine SSL cert names etc

  • server (Boolean)

    To enable or disable the choria server

  • server_config (Hash)

    Configuration for the Choria Server

  • manage_package_repo (Boolean)

    Installs the package repositories

  • nightly_repo (Boolean)

    Install the nightly package repo as well as the release one

  • kv_buckets (Choria::KVBuckets) (defaults to: {})

    Hash of choria_kv_bucket resources for a node, ideal for use using Hiera

  • governors (Choria::Governors) (defaults to: {})

    Hash of choria_governor resources for a node, ideal for use using Hiera

  • package_source (Optional[String]) (defaults to: undef)

    The package source location

  • config_user (Optional[String])
  • config_group (Optional[String])
  • manage_mcollective (Boolean) (defaults to: true)


40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'manifests/init.pp', line 40

class choria (
  Boolean $manage_package,
  Boolean $manage_service,
  Boolean $manage_package_repo ,
  Boolean $nightly_repo,
  Enum["present", "absent"] $ensure,
  String $version,
  Enum[debug, info, warn, error, fatal] $log_level,
  Optional[String] $srvdomain,
  Stdlib::Absolutepath $broker_config_file,
  Stdlib::Absolutepath $server_config_file,
  Stdlib::Absolutepath $server_provisioning_token_file,
  Optional[String] $server_provisioning_token,
  Boolean $manage_server_config,
  Stdlib::Absolutepath $logfile,
  Optional[Stdlib::Absolutepath] $statusfile,
  Integer $status_write_interval,
  Stdlib::Absolutepath $rubypath,
  String $package_name,
  String $broker_service_name,
  String $server_service_name,
  Boolean $server_service_enable,
  String $identity,
  Boolean $server,
  Hash $server_config,
  Optional[String] $config_user,
  Optional[String] $config_group,
  Boolean $purge_machines = true,
  Hash $scout_overrides = {},
  Hash[String, String] $scout_annotations = {},
  Choria::ScoutChecks $scout_checks = {},
  Choria::ScoutMetrics $scout_metrics = {},
  Choria::GossFiles $scout_gossfile = {},
  Enum[debug, info, warn, error, fatal] $broker_log_level = $log_level,
  Enum[debug, info, warn, error, fatal] $server_log_level = $log_level,
  Stdlib::Absolutepath $broker_logfile = $logfile,
  Stdlib::Absolutepath $server_logfile = $logfile,
  Boolean $manage_mcollective = true,
  Choria::KVBuckets $kv_buckets = {},
  Choria::Governors $governors = {},
  Optional[String] $package_source = undef,
) {
  if $manage_package_repo {
    class{"choria::repo":
      nightly => $nightly_repo,
      ensure  => $ensure,
      before  => Class["choria::install"]
    }
  }

  class{"choria::install": }
  -> class{"choria::config": }
  -> class{"choria::scout_checks": }

  # We use a different class to disable choria service than enable it
  # to help the discovery system find machines where the service is actually
  # running vs those with it off - it searches on all machines with class
  # choria::service so this facilitates client oly installs by setting server false
  if $server {
    class{"choria::service":
      require => Class["choria::scout_checks"]
    }
    contain choria::service
  } else {
    class{"choria::service_disable":
      require => Class["choria::scout_checks"]
    }
    contain choria::service_disable
  }

  if $manage_mcollective {
    include mcollective
  }

  contain choria::install
  contain choria::scout_checks
  contain choria::scout_metrics
  contain choria::kv_buckets
  contain choria::governors
}