Skip to content

Commit

Permalink
docs(analytics): add kafka & ckh local setup
Browse files Browse the repository at this point in the history
  • Loading branch information
lsampras committed Nov 28, 2023
1 parent 5f18a74 commit ac8f6ab
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,66 @@ services:
- "8001:8001"
volumes:
- redisinsight_store:/db

kafka0:
image: confluentinc/cp-kafka:7.0.5
hostname: kafka0
networks:
- router_net
ports:
- 9092:9092
- 9093
- 9997
- 29092
environment:
KAFKA_BROKER_ID: 1
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka0:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_PROCESS_ROLES: 'broker,controller'
KAFKA_NODE_ID: 1
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@kafka0:29093'
KAFKA_LISTENERS: 'PLAINTEXT://kafka0:29092,CONTROLLER://kafka0:29093,PLAINTEXT_HOST://0.0.0.0:9092'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_LOG_DIRS: '/tmp/kraft-combined-logs'
JMX_PORT: 9997
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
profiles:
- analytics
volumes:
- ./monitoring/kafka-script.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'"

# Kafka UI for debugging kafka queues
kafka-ui:
image: provectuslabs/kafka-ui:latest
ports:
- 8090:8080
networks:
- router_net
depends_on:
- kafka0
profiles:
- analytics
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka0:29092
KAFKA_CLUSTERS_0_JMXPORT: 9997

clickhouse-server:
image: clickhouse/clickhouse-server:23.5
networks:
- router_net
ports:
- "9000"
- "8123:8123"
profiles:
- analytics
ulimits:
nofile:
soft: 262144
hard: 262144

0 comments on commit ac8f6ab

Please sign in to comment.