|
2 | 2 | This tool uses a Kafka consumer to consume messages from the source cluster, and re-publishes those messages to the local (target) cluster using an embedded Kafka producer. (https://kafka.apache.org/documentation.html#basic_ops_mirror_maker)
|
3 | 3 |
|
4 | 4 | ## Running Mirror Maker on docker
|
5 |
| -This example shows how to setup standalone Mirror Maker instance application. |
| 5 | +This example shows how to setup standalone Mirror Maker instance application. |
6 | 6 |
|
7 | 7 | #### Consumer Configuration (NCDS cluster)
|
8 |
| -- Replace example `bootstrap.servers` property in the file kafka.properties (https://github.com/Nasdaq/CloudDataService/blob/master/docker/mirrormaker/consumer.properties) with provided values during on-boarding. |
| 8 | +- Replace example `bootstrap.servers` property in the kafka.properties file (https://github.com/Nasdaq/CloudDataService/blob/master/docker/mirrormaker/consumer.properties) with provided values during on-boarding. |
9 | 9 |
|
10 | 10 | #### Producer Configuration (Target Cluster)
|
11 | 11 | - The producer is the part of Mirror Maker that uses the data read by the and replicates it to the destination cluster.
|
12 | 12 | - Update the producer.properties based target cluster. (https://github.com/Nasdaq/CloudDataService/tree/master/docker/mirrormaker/producer.properties)
|
13 | 13 | - Make sure the bootstrap.server IPs, truststore location if using SSL, and password are correct.
|
14 | 14 |
|
| 15 | +#### Group Id Suffix |
| 16 | +- User can customize the group id suffix (property name : `groupidsuffix`) |
| 17 | + - If custom suffix is reused then consumer will start where it left off on restart |
| 18 | + - If you don't pass a custom suffix, the SDK will create a new group id and start from the earliest message available on topic. |
| 19 | + |
15 | 20 | #### Creating docker build
|
16 |
| -- Run docker build in the project home directory. (https://github.com/Nasdaq/CloudDataService) |
| 21 | +- Run `docker build` in the project home directory. (https://github.com/Nasdaq/CloudDataService) |
17 | 22 |
|
18 | 23 | ```
|
19 | 24 | docker build -f docker/Dockerfile . -t sdk-app --no-cache
|
20 | 25 | ```
|
21 | 26 |
|
22 | 27 | #### Running mirror maker
|
23 | 28 | - Run mirror maker for given topics list.
|
24 |
| -- Replace client id(`{client-id-value}`) and client secret(`{client-secret-value}`) provided during on-boarding from Nasdaq team. Also, provide the password (`{truststore-pass}`) for java truststore. |
| 29 | +- Replace client id(`{client-id-value}`) and client secret(`{client-secret-value}`) provided during on-boarding from Nasdaq team. |
25 | 30 |
|
26 | 31 | ```
|
27 |
| -docker run -e "OAUTH_CLIENT_ID={client-id-value}" -e "OAUTH_CLIENT_SECRET={client-secret-value} -e "JAVAX_NET_SSL_TRUSTSTOREPASSWORD={truststore-pass}" sdk-app:latest -opt mirrormaker -topics NLSUTP.stream |
| 32 | +docker run -e "OAUTH_CLIENT_ID={client-id-value}" -e "OAUTH_CLIENT_SECRET={client-secret-value}" sdk-app:latest -opt mirrormaker -topics NLSUTP.stream |
| 33 | +``` |
| 34 | + |
| 35 | +example with custom groupid suffix |
| 36 | + |
| 37 | +``` |
| 38 | +docker run -e "OAUTH_CLIENT_ID={client-id-value}" -e "OAUTH_CLIENT_SECRET={client-secret-value}" sdk-app:latest -opt mirrormaker -topics NLSUTP.stream -groupidsuffix mycustomsuffix |
28 | 39 | ```
|
29 | 40 |
|
30 | 41 | ## Deploying Kafka Mirror Maker on Strimzi kafka cluster
|
31 | 42 | Strimzi is an open source project that provides container images and operators for running Apache Kafka on Kubernetes.(https://github.com/strimzi/strimzi-kafka-operator)
|
32 |
| -The Cluster Operator deploys one or more Kafka Mirror Maker replicas to replicate data between Kafka clusters. |
| 43 | +The Cluster Operator deploys one or more Kafka Mirror Maker replicas to replicate data between Kafka clusters. |
33 | 44 |
|
34 |
| -### Prerequisites |
| 45 | +### Prerequisites |
35 | 46 | - Before deploying Kafka Mirror Maker, the Cluster Operator must be deployed.
|
36 | 47 |
|
37 | 48 | ### Deploying mirror maker
|
38 |
| -- Download kafka bootstrap server certificate from NCDS endpoint and add that to Kubernetes secret. |
39 | 49 | - Create Kubernetes secret for Oauth Client Secret.
|
40 | 50 | - Update Oauth Client Id in kafka-mirror-maker.yaml.
|
41 | 51 | - Create a Kafka Mirror Maker cluster from the command-line:
|
42 |
| - ```kubectl apply -f mirrormaker/template/kafka-mirror-maker.yaml``` |
| 52 | + ```kubectl apply -f mirrormaker/template/kafka-mirror-maker.yaml``` |
43 | 53 |
|
44 |
| -Provided example script `install_mirror_maker.sh` to deploy the mirror maker in your cluster. |
| 54 | +Provided example script `install_mirror_maker.sh` to deploy the mirror maker in your cluster. |
0 commit comments