-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.yml
150 lines (113 loc) · 5.94 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
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
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
---
kafka_apache_mirror_base_url: https://archive.apache.org/dist
kafka_enable_topic_deletion: true
kafka_user: kafka
kafka_group: kafka
kafka_version: 2.7.0
kafka_scala_version: 2.13
kafka_broker_id: 1 # must be set to a unique integer for each broker
kafka_install_dir: /usr/local/kafka
kafka_conf_dir: /etc/kafka
kafka_data_dir: /var/lib/kafka
kafka_log_dir: /var/log/kafka
kafka_host: "{{ ansible_default_ipv4.address }}"
############################# Basic Kafka Settings
# The number of threads that the server uses for receiving requests from the network and sending responses to the network
kafka_num_network_threads: 3
# The number of threads that the server uses for processing requests, which may include disk I/O
kafka_num_io_threads: 8
# The send buffer (SO_SNDBUF) used by the socket server
kafka_socket_send_buffer_bytes: 102400
# The receive buffer (SO_RCVBUF) used by the socket server
kafka_socket_receive_buffer_bytes: 102400
# The maximum size of a request that the socket server will accept (protection against OOM)
kafka_socket_request_max_bytes: 104857600
### OPTIONAL config settings for kafka
# The address the socket server listens on. It will get the value returned from
# java.net.InetAddress.getCanonicalHostName() if not configured.
# FORMAT:
# listener_name://host_name:port
# EXAMPLE:
# PLAINTEXT://your.host.name:9092
# kafka_listeners: "PLAINTEXT://:9092"
# Hostname and port the broker will advertise to producers and consumers. If not set,
# it uses the value for "listeners" if configured. Otherwise, it will use the value
# returned from java.net.InetAddress.getCanonicalHostName().
# kafka_advertised_listeners: "PLAINTEXT://{{ ansible_default_ipv4.address }}:9092"
# Maps listener names to security protocols, the default is for them to be the same. See the config documentation for more details
#kafka_listener_security_protocol_map: "PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL"
# Additional optional security and sasl related settings
#security.inter.broker.protocol=PLAINTEXT
#sasl.mechanism.inter.broker.protocol=PLAIN
#sasl.enabled.mechanisms=PLAIN
# The default number of log partitions per topic. More partitions allow greater
# parallelism for consumption, but this will also result in more files across
# the brokers.
kafka_num_partitions: 1
# The number of threads per data directory to be used for log recovery at startup and flushing at shutdown.
# This value is recommended to be increased for installations with data dirs located in RAID array.
kafka_num_recovery_threads_per_data_dir: 1
# The limit on number of open files.
kafka_limit_number_of_open_files: 10000
############################# Internal Topic Settings
# The replication factor for the group metadata internal topics "__consumer_offsets" and "__transaction_state"
# For anything other than development testing, a value greater than 1 is recommended to ensure availability such as 3.
kafka_offsets_topic_replication_factor: 1
kafka_transaction_state_log_replication_factor: 1
kafka_transaction_state_log_min_isr: 1
############################# Log Flush Policy
############################# Log Retention Policy
# The minimum age of a log file to be eligible for deletion due to age
kafka_log_retention_hours: 168
# A size-based retention policy for logs. Segments are pruned from the log unless the remaining
# segments drop below log.retention.bytes. Functions independently of log.retention.hours.
kafka_log_retention_bytes: 1073741824
# The maximum size of a log segment file. When this size is reached a new log segment will be created.
kafka_log_segment_bytes: 1073741824
# The largest size of the message that can be received by the broker from a producer.
kafka_message_max_bytes: 10000000
# The interval at which log segments are checked to see if they can be deleted according
# to the retention policies
kafka_log_retention_check_interval_ms: 300000
# After a consumer group loses all its consumers (i.e. becomes empty) its
# offsets will be kept for this retention period before getting discarded. For
# standalone consumers (using manual assignment), offsets will be expired after
# the time of last commit plus this retention period.
#kafka_offset_retention_minutes: 10080
############################# Zookeeper related Kafka settings
kafka_zookeeper_connection_hosts:
- localhost:2181
# Timeout in ms for connecting to zookeeper
kafka_zookeeper_connection_timeout_ms: 18000
# ZooKeeper SASL authentication
kafka_zookeeper_user: bar
kafka_zookeeper_password: baz
############################# Group Coordinator Settings
# The following configuration specifies the time, in milliseconds, that the GroupCoordinator will delay the initial consumer rebalance.
kafka_group_initial_rebalance_delay_ms: 0
############################# Kafka environment variables
# Kafka leverages a lot of environment variables to control JVM settings, logging options, monitoring options, etc..
# In order to set these variables for the kafka service use the optional 'kafka_environment_variables' setting.
# When defined the respective variables will be written to an env file which will be used in the EnvironmentFile setting of the systemd service.
#
# Sample file content for configuring KAFKA_HEAP_OPTS:
# KAFKA_HEAP_OPTS="-Xmx192M"
#
# An overview of the variables used by kafka can be found in the kafka startup script here: https://github.com/apache/kafka/blob/trunk/bin/kafka-run-class.sh
kafka_environment_variables: {}
# Environment file that will be created by the role and used in the Kafka systemd service definition if kafka_environment_variables is defined
kafka_environment_file: /etc/kafka/kafka.env
kafka_server_username: broker
kafka_server_password: broker
kafka_client_users:
- username: guest
password: guest
# JMX related settings
kafka_jmx_enabled: false
kafka_jmx_host: localhost
kafka_jmx_port: 1099
kafka_jmx_rmi_port: 1099
kafka_jmx_role: readonly
# Optional settings for using authentication
# kafka_jmx_username: jmx
# kafka_jmx_password: jmx