-
Notifications
You must be signed in to change notification settings - Fork 149
Development Environment
Gonzalo Bulnes Guilpain edited this page Dec 2, 2015
·
5 revisions
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.
- Build Bottled Water from source
- Remove the
botteldwater
client from the cluster definition and expose the Kafka, Postgres and Schema Registry ports (gist, diff) - Run the Zookeeper, Kafka, Schema Registry, Postgres cluster, enable the Postgres extension and create the test database without starting the Bottled Water client yet
- Add the following entry to
/etc/hosts
:0.0.0.0 7aa41c220a20
, where7aa41c220a20
is the container ID of thekafka
container (find yours withdocker ps -f name=kafka
) -
Run Bottled Water (
./kafka/bottledwater --postgres=postgres://postgres@localhost
)
- 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
- 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!');
)