Tuesday, September 26, 2017

Kafka Cluster Installation Steps


Kafka Cluster installation steps:
During Kafka server installation don’t use the local zookeeper . Use the Cloudera or your Big Data distribution zookeepers.
Kafka version should be same on all the nodes. use the Cloudera manager zookeeper for Kafka cluster.
Make sure the Java version is same on all the nodes.

Installation steps:
Step 1- Start the Kafka broker 0 on node-1 (assuming you have Kafka installed already)
go the directory where you have kafka installed :
ex: cd /usr/share/kafka_2.10-0.8.2.0
verify the server.properties , it should point to the broker .id=0(default).

Step -2 : login to node -2
go the directory where you have kafka installed :
ex: cd /usr/share/kafka_2.10-0.8.2.0
modify the server.properties file and create another kafka broker id 1 as below:
config/server.properties:
broker.id=1
port=9093
log.dir=/tmp/kafka-logs-1

Step -3 : login to node -3
go the directory where you have kafka installed :
ex: cd /usr/share/kafka_2.10-0.8.2.0
modify the server.properties file and create another kafka brokerid 2 as below:
config/server.properties:
broker.id=2
port=9094
log.dir=/tmp/kafka-logs-2

Step -4 .if you have zookeeper cluster than every node of the cluster modify modify the property zookeeper.connect from the file  kafka/config/server.properties:
zookeeper.connect=zNode01:2181,zNode02:2181,zNode03:2181

Run below command in all nodes to start kafka servers
/kafka/bin/kafka-server-start.sh /kafka/config/server.properties
----------------------
To confirm the brokers are running correctly, use this command on each node: ps -ef |grep server.properties

No comments: