I'm using this Vagrantfile
to run Kafka on a Windows 8.1 laptop for development purposes.
It runs the ultra-lightweight boot2docker Linux, then uses Vagrant's Docker provisioning support to spin up ZooKeeper and Kafka.
The fun bits to work out were:
- You need to forward the ports on both Vagrant (lines 13 & 14) and Docker (the
-p
flag), so you can access the instance from Windows usinglocalhost:9092
- You have to set the EXPOSED_HOST environment setting for Docker (line 22), otherwise the Kafka broker reports back with its internal (to Docker) IP address