diff --git a/documentation/compose/DOCKER_COMPOSE.md b/documentation/compose/DOCKER_COMPOSE.md index 186c15c45..3c1a89b57 100644 --- a/documentation/compose/DOCKER_COMPOSE.md +++ b/documentation/compose/DOCKER_COMPOSE.md @@ -1,14 +1,15 @@ # Descriptions of docker-compose configurations (*.yaml) 1. [kafka-ui.yaml](./kafbat-ui.yaml) - Default configuration with 2 kafka clusters with two nodes of Schema Registry, one kafka-connect and a few dummy topics. -2. [kafka-ui.yaml](../../.dev/dev_arm64.yaml) - Default configuration with 1 kafka cluster without zookeeper with one node of Schema Registry, one kafka-connect and a few dummy topics. -3. [kafka-ui-ssl.yml](./kafka-ssl.yml) - Connect to Kafka via TLS/SSL -4. [kafka-cluster-sr-auth.yaml](./cluster-sr-auth.yaml) - Schema registry with authentication. -5. [kafka-ui-auth-context.yaml](./auth-context.yaml) - Basic (username/password) authentication with custom path (URL) (issue 861). -6. [e2e-tests.yaml](./e2e-tests.yaml) - Configuration with different connectors (github-source, s3, sink-activities, source-activities) and Ksql functionality. -7. [kafka-ui-jmx-secured.yml](./ui-jmx-secured.yml) - Kafka’s JMX with SSL and authentication. -8. [kafka-ui-reverse-proxy.yaml](./nginx-proxy.yaml) - An example for using the app behind a proxy (like nginx). -9. [kafka-ui-sasl.yaml](./ui-sasl.yaml) - SASL auth for Kafka. -10. [kafka-ui-traefik-proxy.yaml](./traefik-proxy.yaml) - Traefik specific proxy configuration. -11. [kafka-ui-with-jmx-exporter.yaml](./ui-with-jmx-exporter.yaml) - A configuration with 2 kafka clusters with enabled prometheus jmx exporters instead of jmx. -12. [kafka-with-zookeeper.yaml](./kafka-zookeeper.yaml) - An example for using kafka with zookeeper \ No newline at end of file +2. [kafka-ui-kraft-rest-proxy.yaml](./kafka-ui-kraft-rest-proxy.yaml) - Default configuration with 1 kafka cluster via the confluent-local docker image which autoconfigures Kraft mode and the Kafka REST proxy. +3. [kafka-ui.yaml](../../.dev/dev.yaml) - Default configuration with 1 kafka cluster without zookeeper with one node of Schema Registry, one kafka-connect and a few dummy topics. +4. [kafka-ui-ssl.yml](./kafka-ssl.yml) - Connect to Kafka via TLS/SSL +5. [kafka-cluster-sr-auth.yaml](./cluster-sr-auth.yaml) - Schema registry with authentication. +6. [kafka-ui-auth-context.yaml](./auth-context.yaml) - Basic (username/password) authentication with custom path (URL) (issue 861). +7. [e2e-tests.yaml](./e2e-tests.yaml) - Configuration with different connectors (github-source, s3, sink-activities, source-activities) and Ksql functionality. +8. [kafka-ui-jmx-secured.yml](./ui-jmx-secured.yml) - Kafka’s JMX with SSL and authentication. +9. [kafka-ui-reverse-proxy.yaml](./nginx-proxy.yaml) - An example for using the app behind a proxy (like nginx). +10. [kafka-ui-sasl.yaml](./ui-sasl.yaml) - SASL auth for Kafka. +11. [kafka-ui-traefik-proxy.yaml](./traefik-proxy.yaml) - Traefik specific proxy configuration. +12. [kafka-ui-with-jmx-exporter.yaml](./ui-with-jmx-exporter.yaml) - A configuration with 2 kafka clusters with enabled prometheus jmx exporters instead of jmx. +13. [kafka-with-zookeeper.yaml](./kafka-zookeeper.yaml) - An example for using kafka with zookeeper \ No newline at end of file diff --git a/documentation/compose/kafka-ui-kraft-rest-proxy.yaml b/documentation/compose/kafka-ui-kraft-rest-proxy.yaml new file mode 100644 index 000000000..ea50b71dc --- /dev/null +++ b/documentation/compose/kafka-ui-kraft-rest-proxy.yaml @@ -0,0 +1,43 @@ +--- +version: '3.4' +services: + # Based on https://github.com/confluentinc/kafka-images/blob/master/examples/confluent-local/docker-compose.yml but + # removed the env var defaults that work as-is with Kafka UI. + kafka0: + # Pre-configured image for Kraft mode and REST Proxy + # See: https://docs.confluent.io/platform/current/installation/docker/image-reference.html#ak-images + image: confluentinc/confluent-local:latest + hostname: kafka0 + container_name: kafka0 + ports: + - "9092:9092" + - "8082:8082" + environment: + # Normally you do not have to specify all these environment variables, but we are doing it to make kafka-ui work + # as the defaults are all localhost instead of a docker compose service name + # See: Defaults https://github.com/confluentinc/kafka-images/blob/master/local/include/etc/confluent/docker/configureDefaults + KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka0:29092,PLAINTEXT_HOST://localhost:9092' + KAFKA_CONTROLLER_QUORUM_VOTERS: '1@kafka0:29093' + KAFKA_LISTENERS: 'PLAINTEXT://kafka0:29092,CONTROLLER://kafka0:29093,PLAINTEXT_HOST://0.0.0.0:9092' + KAFKA_REST_BOOTSTRAP_SERVERS: 'kafka0:29092' + kafbat-ui: + container_name: kafbat-ui + image: ghcr.io/kafbat/kafka-ui:latest + depends_on: + - kafka0 + ports: + - "8080:8080" + environment: + KAFKA_CLUSTERS_0_NAME: local + KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka0:29092 + kafka-init-topics: + # Not using confluent-local image because it doesn't have all the shell commands installed (e.g. cub and kafka-topics) + image: confluentinc/cp-kafka:latest + depends_on: + - kafka0 + command: "bash -c 'set -e && echo Waiting for Kafka to be ready... && \ + cub kafka-ready -b kafka0:29092 1 30 && \ + kafka-topics --create --topic second.users --partitions 3 --replication-factor 1 --if-not-exists --bootstrap-server kafka0:29092 && \ + kafka-topics --create --topic second.messages --partitions 2 --replication-factor 1 --if-not-exists --bootstrap-server kafka0:29092 && \ + kafka-topics --create --topic first.messages --partitions 2 --replication-factor 1 --if-not-exists --bootstrap-server kafka0:29092'" +