@@ -5,10 +5,12 @@ Using Vagrant to get up and running.
5
5
1 ) Install Virtual Box [ https://www.virtualbox.org/ ] ( https://www.virtualbox.org/ )
6
6
2 ) Install Vagrant >= 1.6.4 [ https://www.vagrantup.com/ ] ( https://www.vagrantup.com/ )
7
7
3 ) Install Vagrant Plugins:
8
+ ```
9
+ $ vagrant plugin install vagrant-hostmanager
8
10
9
- $ vagrant plugin install vagrant-hostmanager
10
- # Optional
11
- $ vagrant plugin install vagrant-cachier # Caches & shares package downloads across VMs
11
+ # Optional, to caches & shares package downloads across VMs
12
+ $ vagrant plugin install vagrant-cachier
13
+ ```
12
14
13
15
In the main Kafka folder, do a normal Kafka build:
14
16
@@ -48,13 +50,11 @@ To log into one of the machines:
48
50
49
51
vagrant ssh <machineName>
50
52
51
- You can access the brokers and zookeeper by their IP or hostname, e.g.
53
+ You can access the brokers by their IP or hostname, e.g.
52
54
53
- # Specify ZooKeeper node 1 by it's IP: 192.168.50.11
54
- bin/kafka-topics.sh --create --zookeeper 192.168.50.11:2181 --replication-factor 3 --partitions 1 --topic sandbox
55
-
56
- # Specify brokers by their hostnames: broker1, broker2, broker3
57
- bin/kafka-console-producer.sh --broker-list broker1:9092,broker2:9092,broker3:9092 --topic sandbox
55
+ # Specify brokers by their hostnames: broker1, broker2, broker3 (or just one of them)
56
+ bin/kafka-topics.sh --create --bootstrap-server broker1:9092 --replication-factor 3 --partitions 1 --topic sandbox
57
+ bin/kafka-console-producer.sh --bootstrap-server broker1:9092,broker2:9092,broker3:9092 --topic sandbox
58
58
59
59
# Specify brokers by their IP: 192.168.50.51, 192.168.50.52, 192.168.50.53
60
60
bin/kafka-console-consumer.sh --bootstrap-server 192.168.50.51:9092,192.168.50.52:9092,192.168.50.53:9092 --topic sandbox --from-beginning
0 commit comments