Prerequisite: Run sh cleanup.sh to clean up previous containers
Steps:
- To start Confluent Platform, Couchbase server and SQL Server inside the same network run: docker compose up -d. This will start SQL server with pre populated tables and Couchbase server with all the scopes and collection already created. If you want to connect to SQL server instance use this credentials: SA/Password!
- Create the SQL Server Source and Sink Connectors:
- curl -X POST -H "Content-Type: application/json" -d @SqlServerConnector.json http://localhost:8083/connectors
- curl -X POST -H "Content-Type: application/json" -d @CouchbaseSinkConnector.json http://localhost:8083/connectors
- Access to Control Center on localhost:9021 and verify that the connectors are OK
- Create proper KSQLDB streams to transform the data and load them in Couchbase (see file ksqldb). To do this simply run:
- source deployksql.sh
- deploy_ksql ksqldb.sql
- Verify that all data have been streamed and inserted in target Couchbase collections :)
- Select Cloud Provider, region and CIDR config
- Select a 3 data/query/index nodes 4vCPU,16GB RAM, 50GB Disk
- Choose basic plan with one AZ
- Create cluster
- Create a bucket named "raw" without backup policies
- Create a scope named "store"
- Create 4 collections named "products", "customers", "orders", "order_items"
- Create a user named "application", choose a password, and give read/write access to the "store" scope
- Configure your IP in the allowed IPs
- Copy the root certificate into a capella.pem file
- To start Confluent Platform and SQL Server inside the same network run: docker compose up -d.
- Copy capella.pem file into kafka connect container : docker cp capella.pem connect:/home/appuser
- Edit CouchbaseTLSSinkConnector.json and provide :
- "couchbase.seed.nodes": "paste url from capella cluster connect",
- "couchbase.username": "application"
- "couchbase.password": "paste application user password"
- Create the SQL Server Source and Sink Connectors:
- curl -X POST -H "Content-Type: application/json" -d @SQLServerConnector.json http://localhost:8083/connectors
- curl -X POST -H "Content-Type: application/json" -d @CouchbaseTLSSinkConnector.json http://localhost:8083/connectors
- Access to Control Center on localhost:9021 and verify that the connectors are OK
- Create proper KSQLDB streams to transform the data and load them in Couchbase (see file ksqldb). To do this simply run:
- source deployksql.sh
- deploy_ksql ksqldb.sql
- Verify that all data have been streamed and inserted in target Couchbase collections :)