Skip to content

Commit cb9a0ab

Browse files
authored
Merge pull request #33 from AndrewJSchofield/improve-docker-instructions
Improve docker instructions
2 parents 6cc710c + 8f7185f commit cb9a0ab

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

README.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,24 @@ curl -X POST -H "Content-Type: application/json" http://localhost:8083/connector
8585

8686
## Running with Docker
8787

88-
This repository includes a Dockerfile to run Kafka Connect in distributed mode. It also adds in the MQ sink connector as an available connector plugin. It uses the default connect-distributed.properties and connect-log4j.properties files.
88+
This repository includes an example Dockerfile to run Kafka Connect in distributed mode. It also adds in the MQ sink connector as an available connector plugin. It uses the default `connect-distributed.properties` and `connect-log4j.properties` files.
8989

9090
1. `mvn clean package`
91-
1. `docker build -t kafkaconnect-with-mq-sink:0.0.1 .`
92-
1. `docker run -p 8083:8083 kafkaconnect-with-mq-sink:0.0.1`
91+
1. `docker build -t kafkaconnect-with-mq-sink:1.3.0 .`
92+
1. `docker run -p 8083:8083 kafkaconnect-with-mq-sink:1.3.0`
9393

94-
**NOTE:** To provide custom properties files create a folder called `config` containing the `connect-distributed.properties` and `connect-log4j.properties` files and use a Docker volume to make them available when running the container:
95-
`docker run -v $(pwd)/config:/opt/kafka/config -p 8083:8083 kafkaconnect-with-mq-sink:0.0.1`
94+
**NOTE:** To provide custom properties files create a folder called `config` containing the `connect-distributed.properties` and `connect-log4j.properties` files and use a Docker volume to make them available when running the container like this:
95+
96+
``` shell
97+
docker run -v $(pwd)/config:/opt/kafka/config -p 8083:8083 kafkaconnect-with-mq-sink:1.3.0
98+
```
99+
100+
To start the MQ connector, you can use `config/mq-sink.json` in this repository after replacing all placeholders and use a command like this:
101+
102+
``` shell
103+
curl -X POST -H "Content-Type: application/json" http://localhost:8083/connectors \
104+
--data "@./config/mq-sink.json"
105+
```
96106

97107

98108
## Deploying to Kubernetes
@@ -115,7 +125,7 @@ Create ConfigMap for Kafka Connect Log4j configuration:
115125

116126
### Creating Kafka Connect deployment and service in Kubernetes
117127

118-
**NOTE:** Remember to [build the Docker image](#running-with-docker) and push it to your Kubernetes image repository. You might need to update the image name in the `kafka-connect.yaml` file.
128+
**NOTE:** You will need to [build the Docker image](#running-with-docker) and push it to your Kubernetes image repository. Remember that the supplied Dockerfile is just an example and you will have to modify it for your needs. You might need to update the image name in the `kafka-connect.yaml` file.
119129

120130
1. Update the namespace in `kafka-connect.yaml`
121131
1. `kubectl -n <namespace> apply -f kafka-connect.yaml`

0 commit comments

Comments
 (0)