From 92df28675f530188267f45cb2ee2f8e5b31cd779 Mon Sep 17 00:00:00 2001 From: Roman Zabaluev Date: Thu, 2 May 2024 01:46:21 +0400 Subject: [PATCH] BE: Update development compose file (#181) --- .../ui-arm64.yaml => .dev/dev_arm64.yaml | 37 ++++++++++++++++--- .gitattributes | 1 + documentation/compose/DOCKER_COMPOSE.md | 2 +- 3 files changed, 34 insertions(+), 6 deletions(-) rename documentation/compose/ui-arm64.yaml => .dev/dev_arm64.yaml (79%) create mode 100644 .gitattributes diff --git a/documentation/compose/ui-arm64.yaml b/.dev/dev_arm64.yaml similarity index 79% rename from documentation/compose/ui-arm64.yaml rename to .dev/dev_arm64.yaml index be7281344..b43e73bce 100644 --- a/documentation/compose/ui-arm64.yaml +++ b/.dev/dev_arm64.yaml @@ -1,8 +1,14 @@ +# This is a compose file designed for arm64/Apple Silicon systems +# To adapt this to x86 please find and replace ".arm64" with empty + # ARM64 supported images for kafka can be found here # https://hub.docker.com/r/confluentinc/cp-kafka/tags?page=1&name=arm64 --- -version: '2' +version: '3.8' +name: "kafbat-ui-dev" + services: + kafbat-ui: container_name: kafbat-ui image: ghcr.io/kafbat/kafka-ui:latest @@ -12,6 +18,7 @@ services: - kafka0 - schema-registry0 - kafka-connect0 + - ksqldb0 environment: KAFKA_CLUSTERS_0_NAME: local KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka0:29092 @@ -19,7 +26,8 @@ services: KAFKA_CLUSTERS_0_SCHEMAREGISTRY: http://schema-registry0:8085 KAFKA_CLUSTERS_0_KAFKACONNECT_0_NAME: first KAFKA_CLUSTERS_0_KAFKACONNECT_0_ADDRESS: http://kafka-connect0:8083 - DYNAMIC_CONFIG_ENABLED: 'true' # not necessary, added for tests + KAFKA_CLUSTERS_0_KSQLDBSERVER: http://ksqldb0:8088 + DYNAMIC_CONFIG_ENABLED: 'true' KAFKA_CLUSTERS_0_AUDIT_TOPICAUDITENABLED: 'true' KAFKA_CLUSTERS_0_AUDIT_CONSOLEAUDITENABLED: 'true' @@ -46,9 +54,10 @@ services: KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER' KAFKA_LOG_DIRS: '/tmp/kraft-combined-logs' KAFKA_JMX_PORT: 9997 +# KAFKA_JMX_HOSTNAME: localhost # uncomment this line and comment the next one if running with kafka-ui as a jar KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka0 -Dcom.sun.management.jmxremote.rmi.port=9997 volumes: - - ./scripts/update_run.sh:/tmp/update_run.sh + - ../documentation/compose/scripts/update_run.sh:/tmp/update_run.sh command: "bash -c 'if [ ! -f /tmp/update_run.sh ]; then echo \"ERROR: Did you forget the update_run.sh file that came with this docker-compose.yml file?\" && exit 1 ; else /tmp/update_run.sh && /etc/confluent/docker/run ; fi'" schema-registry0: @@ -90,12 +99,30 @@ services: CONNECT_INTERNAL_KEY_CONVERTER: org.apache.kafka.connect.json.JsonConverter CONNECT_INTERNAL_VALUE_CONVERTER: org.apache.kafka.connect.json.JsonConverter CONNECT_REST_ADVERTISED_HOST_NAME: kafka-connect0 - CONNECT_PLUGIN_PATH: "/usr/share/java,/usr/share/confluent-hub-components" + CONNECT_PLUGIN_PATH: "/usr/share/java,/usr/share/confluent-hub-components,/usr/local/share/kafka/plugins,/usr/share/filestream-connectors" + + ksqldb0: + image: confluentinc/ksqldb-server:0.18.0 + depends_on: + - kafka0 + - kafka-connect0 + - schema-registry0 + environment: + KSQL_CUB_KAFKA_TIMEOUT: 120 + KSQL_LISTENERS: http://0.0.0.0:8088 + KSQL_BOOTSTRAP_SERVERS: PLAINTEXT://kafka0:29092 + KSQL_KSQL_LOGGING_PROCESSING_STREAM_AUTO_CREATE: "true" + KSQL_KSQL_LOGGING_PROCESSING_TOPIC_AUTO_CREATE: "true" + KSQL_KSQL_CONNECT_URL: http://kafka-connect0:8083 + KSQL_KSQL_SCHEMA_REGISTRY_URL: http://schema-registry0:8085 + KSQL_KSQL_SERVICE_ID: my_ksql_1 + KSQL_KSQL_HIDDEN_TOPICS: '^_.*' + KSQL_CACHE_MAX_BYTES_BUFFERING: 0 kafka-init-topics: image: confluentinc/cp-kafka:7.2.1.arm64 volumes: - - ./data/message.json:/data/message.json + - ../documentation/compose/data/message.json:/data/message.json depends_on: - kafka0 command: "bash -c 'echo Waiting for Kafka to be ready... && \ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..6313b56c5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/documentation/compose/DOCKER_COMPOSE.md b/documentation/compose/DOCKER_COMPOSE.md index e48e8f6f5..fdb16db67 100644 --- a/documentation/compose/DOCKER_COMPOSE.md +++ b/documentation/compose/DOCKER_COMPOSE.md @@ -1,7 +1,7 @@ # 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-arm64.yaml](./ui-arm64.yaml) - Default configuration for ARM64(Mac M1) architecture with 1 kafka cluster without zookeeper with one node of Schema Registry, one kafka-connect and a few dummy topics. +2. [kafka-ui-arm64.yaml](../../.dev/dev_arm64.yaml) - Default configuration for ARM64(Mac M1) architecture with 1 kafka cluster without zookeeper with one node of Schema Registry, one kafka-connect and a few dummy topics. 3. [kafka-clusters-only.yaml](./kafka-clusters-only.yaml) - A configuration for development purposes, everything besides `kafka-ui` itself (to be run locally). 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.