curl https://bintray.com/sbt/rpm/rpm > /etc/yum.repos.d/bintray-sbt-rpm.repo
yum install -y sbt,git
cd /tmp
git clone https://github.com/yahoo/kafka-manager.git
cd /tmp/kafka-manager
sbt clean dist
unzip /tmp/kafka-manager/target/universal/kafka-manager-1.3.3.6.zip -d /opt
ln -s /opt/kafka-manager-1.3.3.6 /opt/kafka-manager
chown -R kafka:kafka /opt/kafka-manager
chown -R kafka:kafka /opt/kafka-manager-1.3.3.6
cat <<EOF | tee /usr/lib/systemd/system/kafka-manager.service
[Unit]
Description=Kafka-Manager
After=network.target
After=kafka.service
[Service]
Type=simple
Restart=on-failure
ExecStart=/opt/kafka-manager/bin/kafka-manager -Dconfig.file=/opt/kafka-manager/conf/application.conf
User=kafka
Group=kafka
[Install]
WantedBy=multi-user.target
EOF
# sed kafka-manager.zkhosts="zookeeper01:2181,zookeeper02:2181,zookeeper03:2181"
systemctl enable kafka-manager
systemctl start kafka-manager
systemctl status kafka-manager