Puppet Class: zookeeperd

Defined in:
manifests/init.pp

Summary

Main class of puppet module configuring nodes of an zookeeper ensamble.

Overview

zookeeperd

Puppet module to configure the nodes of an zookeeper ensamble.

Examples:

include zookeeperd
zookeeperd::ensamble: 'Awesamly important, dynamically growing zookeeper cluster'
zookeeperd::enable_autoconfig: true

Parameters:

  • ensure (Enum['present', 'absent']) (defaults to: 'present')

    add or remove this node from ensamble

  • manage_packages (Boolean) (defaults to: true)

    enable puppet to manage package installation

  • package_names (Array[String]) (defaults to: [])

    list of packages to be installed

  • data_dir (Stdlib::Absolutepath) (defaults to: '')

    path to the data directory of zookeeper

  • user (Variant[Integer,String]) (defaults to: 'zookeeper')

    username of zookeeper service

  • group (Variant[Integer,String]) (defaults to: 'zookeeper')

    groupname of zookeeper service

  • cfg_path (Stdlib::Absolutepath) (defaults to: '')

    path to configuration directory

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

    parameter to generate zoo.cfg configration file

  • maintenance_service (Boolean) (defaults to: true)

    establish the systemd units for maintenance cleanup service and its timer

  • maintenance_schedule (Array[String]) (defaults to: [])

    array for timer wallclocks to schedule maintenance clienups, refer to systemd.time(7)#Parsing Timestamps for details on the items of this array

  • maintenance_snapretention (Integer) (defaults to: 3)

    configure the number of snapshots to be retained during cleanup

  • manage_service (Boolean) (defaults to: true)

    enable puppet to manage the zookeeper serivce

  • service_name (String) (defaults to: 'zookeeper')

    name of the service to control

  • service_enabled (Boolean) (defaults to: true)

    enable service at boot time

  • service_running (Boolean) (defaults to: true)

    ensure running of the service

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

    name of the ensamble

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

    list of nodes, if autoconfiguration disable

  • myid (Integer) (defaults to: $facts['zookeeperd']['myid'])

    node id of zookeeper instance

  • nodename (String) (defaults to: $facts['networking']['fqdn'])

    fqdn of this node



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
64
65
66
67
68
69
70
# File 'manifests/init.pp', line 37

class zookeeperd (
  Enum['present', 'absent']   $ensure = 'present',
  Boolean                     $manage_packages = true,
  Array[String]               $package_names = [],
  Stdlib::Absolutepath        $data_dir = '',
  Variant[Integer,String]     $user = 'zookeeper',
  Variant[Integer,String]     $group = 'zookeeper',
  Stdlib::Absolutepath        $cfg_path = '',
  # zoo.cfg
  Hash[String, Scalar]        $config = {},
  # maintenance service
  Boolean                     $maintenance_service = true,
  Array[String]               $maintenance_schedule = [],
  Integer                     $maintenance_snapretention = 3,
  # service management
  Boolean                     $manage_service = true,
  String                      $service_name = 'zookeeper',
  Boolean                     $service_enabled = true,
  Boolean                     $service_running = true,
  # cluster configuration parameters
  Optional[String]            $ensamble = undef,
  Hash                        $nodes = {},
  # Parameter having facts default
  Integer                     $myid = $facts['zookeeperd']['myid'],
  String                      $nodename = $facts['networking']['fqdn'],
) {
  contain zookeeperd::install
  contain zookeeperd::config
  contain zookeeperd::service

  Class['zookeeperd::install']
  -> Class['zookeeperd::config']
  ~> Class['zookeeperd::service']
}