@@ -156,27 +156,43 @@ services:
156156 read_only : true
157157 source : ./postgres/
158158 target : /opt/sentry/
159+ zookeeper :
160+ << : *restart_policy
161+ image : " confluentinc/cp-zookeeper:5.5.7"
162+ environment :
163+ ZOOKEEPER_CLIENT_PORT : " 2181"
164+ CONFLUENT_SUPPORT_METRICS_ENABLE : " false"
165+ ZOOKEEPER_LOG4J_ROOT_LOGLEVEL : " WARN"
166+ ZOOKEEPER_TOOLS_LOG4J_LOGLEVEL : " WARN"
167+ KAFKA_OPTS : " -Dzookeeper.4lw.commands.whitelist=ruok"
168+ ulimits :
169+ nofile :
170+ soft : 4096
171+ hard : 4096
172+ volumes :
173+ - " sentry-zookeeper:/var/lib/zookeeper/data"
174+ - " sentry-zookeeper-log:/var/lib/zookeeper/log"
175+ - " sentry-secrets:/etc/zookeeper/secrets"
176+ healthcheck :
177+ << : *healthcheck_defaults
178+ test :
179+ ["CMD-SHELL", 'echo "ruok" | nc -w 2 localhost 2181 | grep imok']
159180 kafka :
160181 << : *restart_policy
161- image : " confluentinc/cp-kafka:7.5.0"
182+ depends_on :
183+ zookeeper :
184+ << : *depends_on-healthy
185+ image : " confluentinc/cp-kafka:5.5.7"
162186 environment :
163- # https://docs.confluent.io/platform/current/installation/docker/config-reference.html#cp-kakfa-example
164- KAFKA_PROCESS_ROLES : " broker,controller"
165- KAFKA_CONTROLLER_QUORUM_VOTERS :
" [email protected] :29093" 166- KAFKA_CONTROLLER_LISTENER_NAMES : " CONTROLLER"
167- KAFKA_NODE_ID : " 1"
168- CLUSTER_ID : " MkU3OEVBNTcwNTJENDM2Qk"
169- KAFKA_LISTENERS : " PLAINTEXT://0.0.0.0:29092,INTERNAL://0.0.0.0:9093,EXTERNAL://0.0.0.0:9092,CONTROLLER://0.0.0.0:29093"
170- KAFKA_ADVERTISED_LISTENERS : " PLAINTEXT://127.0.0.1:29092,INTERNAL://kafka:9093,EXTERNAL://kafka:9092"
171- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP : " PLAINTEXT:PLAINTEXT,INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT"
172- KAFKA_INTER_BROKER_LISTENER_NAME : " PLAINTEXT"
187+ KAFKA_ZOOKEEPER_CONNECT : " zookeeper:2181"
188+ KAFKA_ADVERTISED_LISTENERS : " PLAINTEXT://kafka:9092"
173189 KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR : " 1"
174190 KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS : " 1"
175191 KAFKA_LOG_RETENTION_HOURS : " 24"
176192 KAFKA_MESSAGE_MAX_BYTES : " 50000000" # 50MB or bust
177193 KAFKA_MAX_REQUEST_SIZE : " 50000000" # 50MB on requests apparently too
178194 CONFLUENT_SUPPORT_METRICS_ENABLE : " false"
179- KAFKA_LOG4J_LOGGERS : " kafka.cluster=WARN,kafka.controller=WARN,kafka.coordinator=WARN,kafka.log=WARN,kafka.server=WARN,state.change.logger=WARN"
195+ KAFKA_LOG4J_LOGGERS : " kafka.cluster=WARN,kafka.controller=WARN,kafka.coordinator=WARN,kafka.log=WARN,kafka.server=WARN,kafka.zookeeper=WARN, state.change.logger=WARN"
180196 KAFKA_LOG4J_ROOT_LOGLEVEL : " WARN"
181197 KAFKA_TOOLS_LOG4J_LOGLEVEL : " WARN"
182198 ulimits :
@@ -461,6 +477,8 @@ volumes:
461477 external : true
462478 sentry-redis :
463479 external : true
480+ sentry-zookeeper :
481+ external : true
464482 sentry-kafka :
465483 external : true
466484 sentry-clickhouse :
@@ -476,6 +494,7 @@ volumes:
476494 sentry-secrets :
477495 sentry-smtp :
478496 sentry-nginx-cache :
497+ sentry-zookeeper-log :
479498 sentry-kafka-log :
480499 sentry-smtp-log :
481500 sentry-clickhouse-log :
0 commit comments