Skip to content

Commit

Permalink
Added more instruction around starting with docker.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcustenborder committed Oct 22, 2016
1 parent b80418b commit d546e02
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
33 changes: 30 additions & 3 deletions src/main/resources/archetype-resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,35 @@ Welcome to your new Kafka Connect connector!

# Running in development

## Configuring Docker

The [docker-compose.yml](docker-compose.yml) that is included in this repository is based on the Confluent Platform Docker
images. Take a look at the [quickstart](http://docs.confluent.io/3.0.1/cp-docker-images/docs/quickstart.html#getting-started-with-docker-client)
for the Docker images.

The hostname `confluent` must be resolvable by your host. You will need to determine the ip address of your docker-machine using `docker-machine ip confluent`
and add this to your `/etc/hosts` file. For example if `docker-machine ip confluent` returns `192.168.99.100` add this:

```
192.168.99.100 confluent
```

## Start Docker

```
mvn clean package
export CLASSPATH="$(find target/ -type f -name '*.jar'| grep '\-package' | tr '\n' ':')"
$CONFLUENT_HOME/bin/connect-standalone $CONFLUENT_HOME/etc/schema-registry/connect-avro-standalone.properties config/MySourceConnector.properties
docker-compose up -d
```

## Starting your connector

Start the connector with debugging enabled.

```
./bin/debug.sh
```

Start the connector with debugging enabled. This will wait for a debugger to attach.

```
./bin/suspend.sh
```
1 change: 1 addition & 0 deletions src/main/resources/archetype-resources/bin/debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

mvn clean package

export KAFKA_JMX_OPTS='-Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005'
export CLASSPATH="$(find `pwd`/target/kafka-*-package/share/java/ -type f -name '*.jar' | tr '\n' ':')"

$CONFLUENT_HOME/bin/connect-standalone connect/connect-avro-docker.properties config/MySinkConnector.properties config/MySourceConnector.properties

0 comments on commit d546e02

Please sign in to comment.