Teardown¶
Module 1: On-prem¶
Stop the consumer group
app
to stop consuming from topicwikipedia.parsed
. Note that the command below stops the consumers gracefully withkill -15
, so the consumers follow the shutdown sequence../scripts/app/stop_consumer_app_group_graceful.sh
Stop the Docker environment, destroy all components and clear all Docker volumes.
./scripts/stop.sh
Module 2: Confluent Cloud¶
If you ran the Module 2: Hybrid Deployment to Confluent Cloud Tutorial portion of this tutorial, which included creating resources in Confluent Cloud, follow the clean up procedure below to avoid unexpected Confluent Cloud charges.
Any Confluent Cloud example uses real Confluent Cloud resources. After you are done running a Confluent Cloud example, manually verify that all Confluent Cloud resources are destroyed to avoid unexpected charges.
If the on-prem cluster is still running, remove the Replicator connector that was replicating data to Confluent Cloud.
docker-compose exec connect curl -X DELETE \ --cert /etc/kafka/secrets/connect.certificate.pem \ --key /etc/kafka/secrets/connect.key \ --tlsv1.2 \ --cacert /etc/kafka/secrets/snakeoil-ca-1.crt \ -u connectorSubmitter:connectorSubmitter \ https://connect:8083/connectors/replicate-topic-to-ccloud
If the on-prem cluster is still running, disable Telemetry Reporter in both Kafka brokers.
docker-compose exec kafka1 kafka-configs \ --bootstrap-server kafka1:12091 \ --alter \ --entity-type brokers \ --entity-default \ --delete-config confluent.telemetry.enabled,confluent.telemetry.api.key,confluent.telemetry.api.secret
Delete the
Cloud
API key.ccloud api-key delete ${METRICS_API_KEY}
Destroy your Confluent Cloud environment. Even if you stop
cp-demo
, the resources in Confluent Cloud continue to incur charges until you destroy all the resources.source ./ccloud_library.sh source delta_configs/env.delta ccloud::destroy_ccloud_stack $SERVICE_ACCOUNT_ID
Log into Confluent Cloud UI and verify all your resources have been destroyed. Note that the
Hosted monitoring
cluster will be shown in the Confluent Cloud UI until it ages out.