github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/deployments/ticdc/docker-compose/docker-compose-kafka-integration.yml (about)

     1  version: '3.5'
     2  
     3  services:
     4    zookeeper:
     5      image: wurstmeister/zookeeper
     6      ports:
     7        - "2181:2181"
     8  
     9    kafka:
    10      image: wurstmeister/kafka:2.12-2.4.1
    11      ports:
    12        - "9092:9092"
    13      environment:
    14        # Set the max.message.bytes of the kafka broker to 11MiB.
    15        KAFKA_MESSAGE_MAX_BYTES: 11534336
    16        KAFKA_REPLICA_FETCH_MAX_BYTES: 11534336
    17        KAFKA_CREATE_TOPICS: "big-message-test:1:1"
    18        KAFKA_BROKER_ID: 1
    19        RACK_COMMAND: "curl -sfL http://shorturl.at/fPUW6 -o /tmp/kafka.server.keystore.jks && curl -sfL http://shorturl.at/giQS0 -o /tmp/kafka.server.truststore.jks"
    20        KAFKA_LISTENERS: "SSL://127.0.0.1:9093,PLAINTEXT://127.0.0.1:9092"
    21        KAFKA_ADVERTISED_LISTENERS: "SSL://127.0.0.1:9093,PLAINTEXT://127.0.0.1:9092"
    22        KAFKA_SSL_KEYSTORE_LOCATION: "/tmp/kafka.server.keystore.jks"
    23        KAFKA_SSL_KEYSTORE_PASSWORD: "test1234"
    24        KAFKA_SSL_KEY_PASSWORD: "test1234"
    25        KAFKA_SSL_TRUSTSTORE_LOCATION: "/tmp/kafka.server.truststore.jks"
    26        KAFKA_SSL_TRUSTSTORE_PASSWORD: "test1234"
    27        ZK: "zk"
    28        KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
    29      depends_on:
    30        - "zookeeper"
    31  
    32    canal-adapter:
    33      # Build from https://github.com/pingcap/tiflow/tree/master/scripts/canal/docker.
    34      image: rustinliu/ticdc-canal-json-adapter:latest
    35      environment:
    36        # Since we are all under the kafka service's network, we use 127.0.0.1 directly.
    37        KAFKA_SERVER: 127.0.0.1:9092
    38        ZOOKEEPER_SERVER: zookeeper:2181
    39        # This is actually the name of the topic.
    40        DB_NAME: test
    41        DOWNSTREAM_DB_HOST: 127.0.0.1
    42        DOWNSTREAM_DB_PORT: 3306
    43        USE_FLAT_MESSAGE: true
    44      network_mode: "service:kafka"
    45      volumes:
    46        - ./logs/tidb_cdc_test:/root/logs
    47      depends_on:
    48        - "zookeeper"
    49        - "kafka"
    50  
    51    kafka_integration_test:
    52      build:
    53        context: ../../../
    54        dockerfile: ./deployments/ticdc/docker/integration-test.Dockerfile
    55        args:
    56          BRANCH: ${BRANCH}
    57          COMMUNITY: ${COMMUNITY}
    58          VERSION: ${VERSION} 
    59          OS: ${SYS}
    60          ARCH: ${ARCH}
    61      depends_on:
    62        - "zookeeper"
    63        - "kafka"
    64        - "canal-adapter"
    65      command:
    66        - bash
    67        - -c
    68        - make integration_test_kafka CASE="${CASE}" START_AT="${START_AT}"  & tail -f /dev/null
    69      network_mode: "service:kafka"
    70      volumes:
    71        - ./logs/tidb_cdc_test:/tmp/tidb_cdc_test
    72        - ../../../tests:/go/src/github.com/pingcap/tiflow/tests