-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b3f78e9
commit 4b82a31
Showing
3 changed files
with
137 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Originated from https://github.com/bitnami/bitnami-docker-kafka/blob/0b1b18843b8a5c754a4c6e52a49ac5cf992fa5ed/docker-compose.yml | ||
version: '3' | ||
|
||
x-connect-image: &connect-image cricketeerone/apache-kafka-connect:3.2.0 | ||
|
||
x-connect: &connect-vars | ||
CONNECT_BOOTSTRAP_SERVERS: kafka:29092 | ||
|
||
CONNECT_GROUP_ID: cg_connect | ||
CONNECT_CONFIG_STORAGE_TOPIC: connect-jib_config | ||
CONNECT_OFFSET_STORAGE_TOPIC: connect-jib_offsets | ||
CONNECT_STATUS_STORAGE_TOPIC: connect-jib_status | ||
# Cannot be higher than the number of brokers in the Kafka cluster | ||
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 1 | ||
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: 1 | ||
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: 1 | ||
|
||
CONNECT_KEY_CONVERTER: org.apache.kafka.connect.converters.ByteArrayConverter | ||
CONNECT_VALUE_CONVERTER: org.apache.kafka.connect.converters.ByteArrayConverter | ||
|
||
CONNECT_PLUGIN_PATH: /app/libs | ||
|
||
# Connect client overrides | ||
CONNECT_TASK_SHUTDOWN_GRACEFUL_TIMEOUT_MS: 30000 | ||
CONNECT_OFFSET_FLUSH_INTERVAL_MS: 900000 | ||
# CONNECT_CONSUMER_MAX_POLL_RECORDS: 500 default==500 | ||
|
||
services: | ||
zookeeper: | ||
image: bitnami/zookeeper:3.8-debian-11 | ||
ports: | ||
- '2181:2181' | ||
environment: | ||
- ALLOW_ANONYMOUS_LOGIN=yes | ||
volumes: | ||
- 'zookeeper_data:/bitnami/zookeeper' | ||
kafka: | ||
image: bitnami/kafka:3.2.0 | ||
depends_on: | ||
- zookeeper | ||
restart: unless-stopped | ||
ports: | ||
- '9092:9092' | ||
- '29092:29092' | ||
volumes: | ||
- 'kafka_data:/bitnami/kafka' | ||
- $PWD/lipsum.txt:/data/lipsum.txt:ro # Some data to produce | ||
environment: | ||
- ALLOW_PLAINTEXT_LISTENER=yes | ||
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181 | ||
- KAFKA_CFG_DELETE_TOPIC_ENABLE=true | ||
- KAFKA_CFG_LOG_RETENTION_HOURS=48 # 2 days of retention for demo purposes | ||
# https://rmoff.net/2018/08/02/kafka-listeners-explained/ | ||
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT | ||
- KAFKA_CFG_LISTENERS=PLAINTEXT://:29092,PLAINTEXT_HOST://0.0.0.0:9092 | ||
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092 | ||
|
||
# Jib app | ||
connect-jib-1: | ||
image: *connect-image | ||
hostname: connect-jib-1 | ||
depends_on: | ||
- kafka | ||
ports: | ||
- '8083:8083' # full cluster info accessible from one instance | ||
environment: | ||
<<: *connect-vars | ||
CONNECT_REST_ADVERTISED_HOST_NAME: connect-jib-1 | ||
|
||
connect-jib-2: | ||
image: *connect-image | ||
hostname: connect-jib-2 | ||
depends_on: | ||
- kafka | ||
environment: | ||
<<: *connect-vars | ||
CONNECT_REST_ADVERTISED_HOST_NAME: connect-jib-2 | ||
|
||
volumes: | ||
zookeeper_data: | ||
driver: local | ||
kafka_data: | ||
driver: local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters