Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9124570
init.pp
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
init.pp
View Options
# == Class kafka
# Installs Kafka package and sets up defaults configs for clients (producer & consumer).
#
# == Parameters:
# $hosts - Hash of zookeeper hosts config keyed by
# fqdn of each kafka broker host. This Hash
# should be of the form:
# { 'hostA' => { 'id' => 1, 'port' => 12345 }, 'hostB' => { 'id' => 2 }, ... }
# 'port' is optional, and will default to 9092.
# This Hash is used to configure both kafka
# clients and broker servers.
#
# $zookeeper_hosts - Array of zookeeper hostname/IP(:port)s.
# Default: ['localhost:2181]
#
# $zookeeper_connection_timeout_ms - Timeout in ms for connecting to zookeeper.
# Default: 1000000
#
# $zookeeper_chroot - Path in zookeeper in which to keep Kafka data.
# Default: undef (the root znode). Note that if you set
# this paramater, the znode will not be created for you.
# You must do so manually yourself. See the README
# for instructions on how to do so.
#
# $kafka_log_file - File in which to store Kafka logs
# (not event data). Default: /var/log/kafka/kafka.log
#
# $producer_type - Specifies whether the messages are
# (by default) sent asynchronously (async)
# or synchronously (sync). Default: async
#
# $producer_batch_num_messages - The number of messages batched at the
# producer. Default: 200.
#
# $consumer_group_id - The consumer group.id set in consumer.properties.
# Default: test-consumer-group
#
# $version - Kafka package version number. Set this
# if you need to override the default
# package version. If you override this,
# the version must be >= 0.8. Default: installed.
class
kafka
(
$hosts
=
$kafka::defaults::hosts,
$zookeeper_hosts
=
$kafka::defaults::zookeeper_hosts,
$zookeeper_connection_timeout_ms
=
$kafka::defaults::zookeeper_connection_timeout_ms,
$zookeeper_chroot
=
$kafka::defaults::zookeeper_chroot,
$kafka_log_file
=
$kafka::defaults::kafka_log_file,
$producer_type
=
$kafka::defaults::producer_type,
$producer_batch_num_messages
=
$kafka::defaults::producer_batch_num_messages,
$consumer_group_id
=
$kafka::defaults::consumer_group_id,
$version
=
$kafka::defaults::version,
$producer_properties_template
=
$kafka::defaults::producer_properties_template,
$consumer_properties_template
=
$kafka::defaults::consumer_properties_template,
$log4j_properties_template
=
$kafka::defaults::log4j_properties_template
)
inherits
kafka
::
defaults
{
package
{
'kafka'
:
ensure
=>
$version,
}
file
{
'/etc/kafka/producer.properties'
:
content
=>
template
(
$producer_properties_template),
require
=>
Package
[
'kafka'
],
}
file
{
'/etc/kafka/consumer.properties'
:
content
=>
template
(
$consumer_properties_template),
require
=>
Package
[
'kafka'
],
}
file
{
'/etc/kafka/log4j.properties'
:
content
=>
template
(
$log4j_properties_template),
require
=>
Package
[
'kafka'
],
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jun 21, 7:16 PM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3401687
Attached To
rSPKFK Puppet Kafka module
Event Timeline
Log In to Comment