Skip to content

Commit 88fc89b

Browse files
authored
Use docker compose exec to create additional kafka topics
fixes #2903 fixes #2754
1 parent 437bddd commit 88fc89b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

install/create-kafka-topics.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ echo "${_group}Creating additional Kafka topics ..."
22

33
# NOTE: This step relies on `kafka` being available from the previous `snuba-api bootstrap` step
44
# XXX(BYK): We cannot use auto.create.topics as Confluence and Apache hates it now (and makes it very hard to enable)
5-
EXISTING_KAFKA_TOPICS=$($dcr -T kafka kafka-topics --list --bootstrap-server kafka:9092 2>/dev/null)
5+
EXISTING_KAFKA_TOPICS=$($dc exec -T kafka kafka-topics --list --bootstrap-server kafka:9092 2>/dev/null)
66
NEEDED_KAFKA_TOPICS="ingest-attachments ingest-transactions ingest-events ingest-replay-recordings profiles ingest-occurrences ingest-metrics ingest-performance-metrics ingest-monitors"
77
for topic in $NEEDED_KAFKA_TOPICS; do
88
if ! echo "$EXISTING_KAFKA_TOPICS" | grep -qE "(^| )$topic( |$)"; then
9-
$dcr kafka kafka-topics --create --topic $topic --bootstrap-server kafka:9092
9+
$dc exec kafka kafka-topics --create --topic $topic --bootstrap-server kafka:9092
1010
echo ""
1111
fi
1212
done

0 commit comments

Comments
 (0)