[
https://issues.apache.org/jira/browse/KAFKA-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14217099#comment-14217099
]
Ewen Cheslack-Postava commented on KAFKA-1173:
----------------------------------------------
[~joestein] I fixed the issue where it was using the static IP addresses
intended for local VMs by only assigning them under Virtualbox. Unfortunately,
that doesn't help with your problem. The vagrant-aws plugin searches for
addresses to use in a fixed order
(https://github.com/mitchellh/vagrant-aws/blob/master/lib/vagrant-aws/action/read_ssh_info.rb#L36)
and the SSH config is all it exposes. For that it obviously makes sense for
them to prefer the public address. The vagrant-hostmanager plugin only looks in
a couple of places for addresses to use
(https://github.com/smdahlen/vagrant-hostmanager/blob/master/lib/vagrant-hostmanager/hosts_file/updater.rb#L101),
the final fallback being the SSH config.
As it stands, there's no way to get the private IP out of the vagrant-aws
plugin and into the vagrant-hostmanager plugin. At this point I think it will
require a patch to at least vagrant-aws to make it work with your VPC config.
We might be able to make it work for a pure VPC setup where you're running
Vagrant in the VPC since vagrant-aws wouldn't be able to use public addresses
in that case, but I doubt that would be a common use case.
> Using Vagrant to get up and running with Apache Kafka
> -----------------------------------------------------
>
> Key: KAFKA-1173
> URL: https://issues.apache.org/jira/browse/KAFKA-1173
> Project: Kafka
> Issue Type: Improvement
> Reporter: Joe Stein
> Assignee: Ewen Cheslack-Postava
> Fix For: 0.8.3
>
> Attachments: KAFKA-1173.patch, KAFKA-1173_2013-12-07_12:07:55.patch,
> KAFKA-1173_2014-11-11_13:50:55.patch, KAFKA-1173_2014-11-12_11:32:09.patch,
> KAFKA-1173_2014-11-18_16:01:33.patch
>
>
> Vagrant has been getting a lot of pickup in the tech communities. I have
> found it very useful for development and testing and working with a few
> clients now using it to help virtualize their environments in repeatable ways.
> Using Vagrant to get up and running.
> For 0.8.0 I have a patch on github https://github.com/stealthly/kafka
> 1) Install Vagrant [http://www.vagrantup.com/](http://www.vagrantup.com/)
> 2) Install Virtual Box
> [https://www.virtualbox.org/](https://www.virtualbox.org/)
> In the main kafka folder
> 1) ./sbt update
> 2) ./sbt package
> 3) ./sbt assembly-package-dependency
> 4) vagrant up
> once this is done
> * Zookeeper will be running 192.168.50.5
> * Broker 1 on 192.168.50.10
> * Broker 2 on 192.168.50.20
> * Broker 3 on 192.168.50.30
> When you are all up and running you will be back at a command brompt.
> If you want you can login to the machines using vagrant shh <machineName> but
> you don't need to.
> You can access the brokers and zookeeper by their IP
> e.g.
> bin/kafka-console-producer.sh --broker-list
> 192.168.50.10:9092,192.168.50.20:9092,192.168.50.30:9092 --topic sandbox
> bin/kafka-console-consumer.sh --zookeeper 192.168.50.5:2181 --topic sandbox
> --from-beginning
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)