Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
177 lines (165 sloc) 6.47 KB
---
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper:5.0.1
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
image: confluentinc/cp-enterprise-kafka:5.0.1
depends_on:
- zookeeper
ports:
# Exposes 9092 for external connections to the broker
# Use kafka:29092 for connections internal on the docker network
# See https://rmoff.net/2018/08/02/kafka-listeners-explained/ for details
- 9092:9092
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 100
CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: kafka:29092
CONFLUENT_METRICS_REPORTER_ZOOKEEPER_CONNECT: zookeeper:2181
CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1
CONFLUENT_METRICS_ENABLE: 'true'
CONFLUENT_SUPPORT_CUSTOMER_ID: 'anonymous'
schema-registry:
image: confluentinc/cp-schema-registry:5.0.1
ports:
- 8081:8081
depends_on:
- zookeeper
- kafka
environment:
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: zookeeper:2181
kafka-connect-cp:
image: confluentinc/cp-kafka-connect:5.0.1
depends_on:
- zookeeper
- kafka
- schema-registry
ports:
- 18083:18083
environment:
CONNECT_BOOTSTRAP_SERVERS: "kafka:29092"
CONNECT_REST_PORT: 18083
CONNECT_GROUP_ID: compose-connect-group
CONNECT_CONFIG_STORAGE_TOPIC: docker-connect-configs
CONNECT_OFFSET_STORAGE_TOPIC: docker-connect-offsets
CONNECT_STATUS_STORAGE_TOPIC: docker-connect-status
CONNECT_KEY_CONVERTER: io.confluent.connect.avro.AvroConverter
CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL: 'http://schema-registry:8081'
CONNECT_VALUE_CONVERTER: io.confluent.connect.avro.AvroConverter
CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: 'http://schema-registry:8081'
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-connect-cp"
CONNECT_LOG4J_ROOT_LOGLEVEL: "INFO"
CONNECT_LOG4J_LOGGERS: "org.apache.kafka.connect.runtime.rest=WARN,org.reflections=ERROR"
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: "1"
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: "1"
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: "1"
CONNECT_PLUGIN_PATH: '/usr/share/java'
volumes:
- $PWD/scripts:/scripts
- db-leach:/db-leach/
command:
- bash
- -c
- |
cp /db-leach/jdbc/lib/ojdbc8.jar /usr/share/java/kafka-connect-jdbc
sleep infinity &
/etc/confluent/docker/run
ksql-server:
image: confluentinc/cp-ksql-server:5.0.1
depends_on:
- kafka
- schema-registry
environment:
KSQL_CUB_KAFKA_TIMEOUT: 120
KSQL_BOOTSTRAP_SERVERS: kafka:29092
KSQL_LISTENERS: http://0.0.0.0:8088
KSQL_KSQL_SCHEMA_REGISTRY_URL: http://schema-registry:8081
KSQL_KSQL_SERVICE_ID: confluent_rmoff_01
KSQL_KSQL_STREAMS_PRODUCER_RETRIES: 2147483647
ksql-cli:
image: confluentinc/cp-ksql-cli:5.0.1
depends_on:
- ksql-server
entrypoint: /bin/sh
tty: true
# Other systems
oracle:
# You need to build this image first, following the instructions at
# https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md
image: oracle/database:12.2.0.1-ee
environment:
- ORACLE_PWD=Admin123
ports:
- 1521:1521
volumes:
- $PWD/oradata:/opt/oracle/oradata
- $PWD/oradata/recovery_area:/opt/oracle/oradata/recovery_area
- $PWD/ora-setup-scripts:/opt/oracle/scripts/setup
- $PWD/ora-startup-scripts:/opt/oracle/scripts/startup
- db-leach:/opt/oracle/product/12.2.0.1/dbhome_1/
connect-debezium:
image: debezium/connect:0.9
depends_on:
- kafka
- oracle
- schema-registry
ports:
- 8083:8083
environment:
- BOOTSTRAP_SERVERS=kafka:29092
- GROUP_ID=1
- CONFIG_STORAGE_TOPIC=my_connect_configs
- OFFSET_STORAGE_TOPIC=my_connect_offsets
- STATUS_STORAGE_TOPIC=my_connect_status
- LD_LIBRARY_PATH=/kafka/libs/instant_client
- KEY_CONVERTER=io.confluent.connect.avro.AvroConverter
- VALUE_CONVERTER=io.confluent.connect.avro.AvroConverter
- CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL=http://schema-registry:8081
- CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL=http://schema-registry:8081
volumes:
- $PWD/scripts:/scripts
- db-leach:/db-leach/
command:
- bash
- -c
- |
cp /db-leach/jdbc/lib/ojdbc8.jar /kafka/libs
cp /db-leach/rdbms/jlib/xstreams.jar /kafka/libs
mkdir /kafka/libs/instant_client
cp /db-leach/bin/adrci /kafka/libs/instant_client/
cp /db-leach/bin/genezi /kafka/libs/instant_client/
cp /db-leach/bin/uidrvci /kafka/libs/instant_client/
cp /db-leach/inventory/Scripts/ext/lib/libociei.so /kafka/libs/instant_client/
cp /db-leach/jdbc/lib/ojdbc8.jar /kafka/libs/instant_client/
cp /db-leach/lib/libclntsh.so.12.1 /kafka/libs/instant_client/
cp /db-leach/lib/libclntshcore.so.12.1 /kafka/libs/instant_client/
cp /db-leach/lib/libipc1.so /kafka/libs/instant_client/
cp /db-leach/lib/libmql1.so /kafka/libs/instant_client/
cp /db-leach/lib/libnnz12.so /kafka/libs/instant_client/
cp /db-leach/lib/libocci.so.12.1 /kafka/libs/instant_client/
cp /db-leach/lib/libocijdbc12.so /kafka/libs/instant_client/
cp /db-leach/lib/libons.so /kafka/libs/instant_client/
cp /db-leach/lib/liboramysql12.so /kafka/libs/instant_client/
cp /db-leach/rdbms/jlib/xstreams.jar /kafka/libs/instant_client/
cp /db-leach/lib/stubs/libaio.so /kafka/libs/instant_client/
cp /db-leach/lib/stubs/libaio.so.1 /kafka/libs/instant_client/
sleep infinity &
/docker-entrypoint.sh start
# swingbench:
# image: domgiles/swingbench:latest
volumes:
db-leach: {}