Skip to content

Commit 48c30b0

Browse files
Revert "feat: upgrade to zookeeper-less kafka (#2445)" (#2500)
This reverts commit a177142.
1 parent 2bf9af3 commit 48c30b0

File tree

4 files changed

+34
-17
lines changed

4 files changed

+34
-17
lines changed

_unit-test/create-docker-volumes-test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ sentry-data
1414
sentry-kafka
1515
sentry-postgres
1616
sentry-redis
17-
sentry-symbolicator"
17+
sentry-symbolicator
18+
sentry-zookeeper"
1819

1920
before=$(get_volumes)
2021

docker-compose.yml

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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:

install/create-docker-volumes.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ echo "Created $(docker volume create --name=sentry-kafka)."
66
echo "Created $(docker volume create --name=sentry-postgres)."
77
echo "Created $(docker volume create --name=sentry-redis)."
88
echo "Created $(docker volume create --name=sentry-symbolicator)."
9+
echo "Created $(docker volume create --name=sentry-zookeeper)."
910

1011
echo "${_endgroup}"

install/turn-things-off.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ if [[ -n "$MINIMIZE_DOWNTIME" ]]; then
66
else
77
# Clean up old stuff and ensure nothing is working while we install/update
88
$dc down -t $STOP_TIMEOUT --rmi local --remove-orphans
9-
# TODO(getsentry/self-hosted#2489)
10-
if docker volume ls | grep -qw sentry-zookeeper; then
11-
docker volume rm sentry-zookeeper
12-
fi
139
fi
1410

1511
echo "${_endgroup}"

0 commit comments

Comments
 (0)