diff --git a/install.sh b/install.sh index f418a29fc1..ac5a2f0f4b 100755 --- a/install.sh +++ b/install.sh @@ -34,7 +34,6 @@ source install/update-docker-images.sh source install/build-docker-images.sh source install/install-wal2json.sh source install/bootstrap-snuba.sh -source install/create-kafka-topics.sh source install/upgrade-postgres.sh source install/set-up-and-migrate-database.sh source install/geoip.sh diff --git a/install/create-kafka-topics.sh b/install/create-kafka-topics.sh deleted file mode 100644 index ff2ba8e660..0000000000 --- a/install/create-kafka-topics.sh +++ /dev/null @@ -1,32 +0,0 @@ -echo "${_group}Creating additional Kafka topics ..." - -$dc up -d --no-build --no-recreate kafka - -while [ true ]; do - kafka_healthy=$($dc ps kafka | grep 'healthy') - if [ ! -z "$kafka_healthy" ]; then - break - fi - - echo "Kafka container is not healthy, waiting for 30 seconds. If this took too long, abort the installation process, and check your Kafka configuration" - sleep 30s -done - -# XXX(BYK): We cannot use auto.create.topics as Confluence and Apache hates it now (and makes it very hard to enable) -EXISTING_KAFKA_TOPICS=$($dc exec -T kafka kafka-topics --list --bootstrap-server kafka:9092 2>/dev/null) -NEEDED_KAFKA_TOPICS="ingest-attachments ingest-transactions ingest-events ingest-replay-recordings profiles ingest-occurrences ingest-metrics ingest-performance-metrics ingest-monitors monitors-clock-tasks" -for topic in $NEEDED_KAFKA_TOPICS; do - if ! echo "$EXISTING_KAFKA_TOPICS" | grep -qE "(^| )$topic( |$)"; then - $dc exec kafka kafka-topics --create --topic $topic --bootstrap-server kafka:9092 - echo "" - fi -done - -# This topic must have only a single partition for the consumer to work correctly -# https://github.com/getsentry/ops/blob/7dbc26f39c584ec924c8fef2ad5c532d6a158be3/k8s/clusters/us/_topicctl.yaml#L288-L295 - -if ! echo "$EXISTING_KAFKA_TOPICS" | grep -qE "(^| )monitors-clock-tick( |$)"; then - $dc exec kafka kafka-topics --create --topic monitors-clock-tick --bootstrap-server kafka:9092 --partitions 1 -fi - -echo "${_endgroup}" diff --git a/install/set-up-and-migrate-database.sh b/install/set-up-and-migrate-database.sh index 6880622ae6..09c87dc845 100644 --- a/install/set-up-and-migrate-database.sh +++ b/install/set-up-and-migrate-database.sh @@ -19,7 +19,7 @@ with connection.cursor() as cursor: " if [[ -n "${CI:-}" || "${SKIP_USER_CREATION:-0}" == 1 ]]; then - $dcr web upgrade --noinput + $dcr web upgrade --noinput --create-kafka-topics echo "" echo "Did not prompt for user creation. Run the following command to create one" echo "yourself (recommended):" @@ -27,7 +27,7 @@ if [[ -n "${CI:-}" || "${SKIP_USER_CREATION:-0}" == 1 ]]; then echo " $dc_base run --rm web createuser" echo "" else - $dcr web upgrade + $dcr web upgrade --create-kafka-topics fi echo "${_endgroup}"