clickhouse-sink-connector/doc/setup.md

47 lines
1.3 KiB
Markdown
Raw Normal View History

2022-04-04 08:06:17 +00:00
This doc describes how to set up CDC pipeline
# Pipeline
![pipeline](img/pipeline.png)
2022-04-04 08:06:17 +00:00
# Setup local pipeline
2022-04-04 09:18:18 +00:00
## docker-compose
Full pipeline can be launched via docker-compose with the help of [docker-compose.yaml][docker-compose.yaml]
It will start:
1. MySQL
2. Zookeeper
3. Debezium MySQL connector
4. RedPanda
5. clickhouse-kafka-sink-connector
6. Clickhouse
2022-04-04 09:18:18 +00:00
In order to launch `clickhouse-kafka-sink-connector` appropariate docker image is required,
which can be built as described in [Image](#Image)
```bash
cd deploy/docker
docker-compose up
```
# Image
Docker image can be created with provided [Dockerfile][Dockerfile] and build script
2022-04-04 09:18:18 +00:00
ToDO: Create Kafka connector image with Mysql
Create JAR file by running the following command and copy to the /libs directory of Kafka.
` mvn install`
Copy MYSQL libs from container/libs to the kafka libs directory.
Start the Kafka connect process and pass the properties file
for both MYSQL and Clickhouse properties.
`./connect-standalone.sh ../config/connect-standalone.properties
../../kafka-connect-clickhouse/kcch-connector/src/main/config/mysql-debezium.properties
2022-04-04 09:18:18 +00:00
../../kafka-connect-clickhouse/kcch-connector/src/main/config/clickhouse-sink.properties`
[docker-compose.yaml]: ../deploy/docker/docker-compose.yaml
[Dockerfile]: ../docker/Dockerfile