Skip to content

Development Environment

Gonzalo Bulnes Guilpain edited this page Dec 2, 2015 · 5 revisions

How to: Development setup with Docker Compose

Work in progress: Please don't hesitate to open issues against this fork if you find errors in this page.

Beyond running Bottled Water, the Docker Compose example setup can be used for development purpose.

  1. Build Bottled Water from source
  2. Remove the botteldwater client from the cluster definition and expose the Kafka, Postgres and Schema Registry ports (gist, diff)
  3. Run the Zookeeper, Kafka, Schema Registry, Postgres cluster, enable the Postgres extension and create the test database without starting the Bottled Water client yet
  4. Add the following entry to /etc/hosts: 0.0.0.0 7aa41c220a20, where 7aa41c220a20 is the container ID of the kafka container (find yours with docker ps -f name=kafka)
  5. Run Bottled Water (./kafka/bottledwater --postgres=postgres://postgres@localhost)

  1. You can see the data that has been extracted from Postgres by consuming from Kafka by starting a simple Kafka client: docker-compose run --rm consumer --from-beginning --topic test
  2. And you can insert more data into the database using a Postgres shell: docker-compose run --rm postgres psql (insert into test (value) values('hello world!');)
Clone this wiki locally