Puppet Class: kafka::mirror

Inherits:
kafka::params
Defined in:
manifests/mirror.pp

Summary

This class handles the Kafka (mirror).

Overview

Examples:

Basic usage

class { 'kafka::mirror':
  consumer_config => {
    'group.id'          => 'kafka-mirror',
    'zookeeper.connect' => 'localhost:2181'
  },
  producer_config => {
    'zookeeper.connect' => 'localhost:2181',
  },
  service_config => {
    'whitelist'         => '.*',
  }
}

Parameters:

  • kafka_version (String[1]) (defaults to: $kafka::params::kafka_version)

    The version of Kafka that should be installed.

  • scala_version (String[1]) (defaults to: $kafka::params::scala_version)

    The scala version what Kafka was built with.

  • install_dir (Stdlib::Absolutepath) (defaults to: $kafka::params::install_dir)

    The directory to install Kafka to.

  • mirror_url (Stdlib::HTTPUrl) (defaults to: $kafka::params::mirror_url)

    The url where the Kafka is downloaded from.

  • manage_java (Boolean) (defaults to: $kafka::params::manage_java)

    Install java if it’s not already installed.

  • package_dir (Stdlib::Absolutepath) (defaults to: $kafka::params::package_dir)

    The directory to install Kafka.

  • package_name (Optional[String[1]]) (defaults to: $kafka::params::package_name)

    Package name, when installing Kafka from a package.

  • package_ensure (String[1]) (defaults to: $kafka::params::package_ensure)

    Package version or ensure state, when installing Kafka from a package.

  • user_name (String[1]) (defaults to: $kafka::params::user_name)

    User to run Kafka as.

  • user_shell (Stdlib::Absolutepath) (defaults to: $kafka::params::user_shell)

    Login shell of the Kafka user.

  • group_name (String[1]) (defaults to: $kafka::params::group_name)

    Group to run Kafka as.

  • user_id (Optional[Integer]) (defaults to: $kafka::params::user_id)

    Create the Kafka user with this ID.

  • group_id (Optional[Integer]) (defaults to: $kafka::params::group_id)

    Create the Kafka group with this ID.

  • manage_user (Boolean) (defaults to: $kafka::params::manage_user)

    Create the Kafka user if it’s not already present.

  • manage_group (Boolean) (defaults to: $kafka::params::manage_group)

    Create the Kafka group if it’s not already present.

  • config_mode (Stdlib::Filemode) (defaults to: $kafka::params::config_mode)

    The permissions for the config files.

  • config_dir (Stdlib::Absolutepath) (defaults to: $kafka::params::config_dir)

    The directory to create the Kafka config files to.

  • log_dir (Stdlib::Absolutepath) (defaults to: $kafka::params::log_dir)

    The directory for Kafka log files.

  • bin_dir (Stdlib::Absolutepath) (defaults to: $kafka::params::bin_dir)

    The directory where the Kafka scripts are.

  • service_name (String[1]) (defaults to: 'kafka-mirror')

    Set the name of the service.

  • manage_service (Boolean) (defaults to: $kafka::params::manage_service)

    Install the init.d or systemd service.

  • service_ensure (Enum['running', 'stopped']) (defaults to: $kafka::params::service_ensure)

    Set the ensure state of the service.

  • service_restart (Boolean) (defaults to: $kafka::params::service_restart)

    Whether the configuration files should trigger a service restart.

  • service_requires (Array[String[1]]) (defaults to: $kafka::params::service_requires)

    Set the list of services required to be running before Kafka.

  • limit_nofile (Optional[String[1]]) (defaults to: $kafka::params::limit_nofile)

    Set the ‘LimitNOFILE’ option of the systemd service.

  • limit_core (Optional[String[1]]) (defaults to: $kafka::params::limit_core)

    Set the ‘LimitCORE’ option of the systemd service.

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

    A hash of the environment variables to set.

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

    A hash of the consumer configuration options.

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

    A hash of the producer configuration options.

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

    A hash of the mirror script options.

  • heap_opts (String[1]) (defaults to: $kafka::params::mirror_heap_opts)

    Set the Java heap size.

  • jmx_opts (String[1]) (defaults to: $kafka::params::mirror_jmx_opts)

    Set the JMX options.

  • log4j_opts (String[1]) (defaults to: $kafka::params::mirror_log4j_opts)

    Set the Log4j options.

  • manage_log4j (Boolean) (defaults to: $kafka::params::manage_log4j)
  • log_file_size (Pattern[/[1-9][0-9]*[KMG]B/]) (defaults to: $kafka::params::log_file_size)
  • log_file_count (Integer[1, 50]) (defaults to: $kafka::params::log_file_count)


117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'manifests/mirror.pp', line 117

class kafka::mirror (
  String[1] $kafka_version                      = $kafka::params::kafka_version,
  String[1] $scala_version                      = $kafka::params::scala_version,
  Stdlib::Absolutepath $install_dir             = $kafka::params::install_dir,
  Stdlib::HTTPUrl $mirror_url                   = $kafka::params::mirror_url,
  Boolean $manage_java                          = $kafka::params::manage_java,
  Stdlib::Absolutepath $package_dir             = $kafka::params::package_dir,
  Optional[String[1]] $package_name             = $kafka::params::package_name,
  String[1] $package_ensure                     = $kafka::params::package_ensure,
  String[1] $user_name                          = $kafka::params::user_name,
  Stdlib::Absolutepath $user_shell              = $kafka::params::user_shell,
  String[1] $group_name                         = $kafka::params::group_name,
  Optional[Integer] $user_id                    = $kafka::params::user_id,
  Optional[Integer] $group_id                   = $kafka::params::group_id,
  Boolean $manage_user                          = $kafka::params::manage_user,
  Boolean $manage_group                         = $kafka::params::manage_group,
  Stdlib::Filemode $config_mode                 = $kafka::params::config_mode,
  Stdlib::Absolutepath $config_dir              = $kafka::params::config_dir,
  Stdlib::Absolutepath $log_dir                 = $kafka::params::log_dir,
  Stdlib::Absolutepath $bin_dir                 = $kafka::params::bin_dir,
  String[1] $service_name                       = 'kafka-mirror',
  Boolean $manage_service                       = $kafka::params::manage_service,
  Enum['running', 'stopped'] $service_ensure    = $kafka::params::service_ensure,
  Boolean $service_restart                      = $kafka::params::service_restart,
  Array[String[1]] $service_requires            = $kafka::params::service_requires,
  Optional[String[1]] $limit_nofile             = $kafka::params::limit_nofile,
  Optional[String[1]] $limit_core               = $kafka::params::limit_core,
  Hash $env                                     = {},
  Hash[String[1],String[1]] $consumer_config    = {},
  Hash[String[1],String[1]] $producer_config    = {},
  Hash[String[1],String[1]] $service_config     = {},
  String[1] $heap_opts                          = $kafka::params::mirror_heap_opts,
  String[1] $jmx_opts                           = $kafka::params::mirror_jmx_opts,
  String[1] $log4j_opts                         = $kafka::params::mirror_log4j_opts,
  Boolean $manage_log4j                         = $kafka::params::manage_log4j,
  Pattern[/[1-9][0-9]*[KMG]B/] $log_file_size   = $kafka::params::log_file_size,
  Integer[1, 50] $log_file_count                = $kafka::params::log_file_count
) inherits kafka::params {
  class { 'kafka::mirror::install': }
  -> class { 'kafka::mirror::config': }
  -> class { 'kafka::mirror::service': }
  -> Class['kafka::mirror']
}