Set Kafka Broker advertisement hostname

Default settings only allow localhost advertisement by kafka broker.
with this update kafka broker will advertise devstack configured ip address.

Change-Id: Ie3a146598789d6f63bbf55c4847cc569231c9dec
This commit is contained in:
Scott Grasley 2017-10-16 13:42:27 -07:00 committed by Tomasz Trębski
parent 149eeab371
commit 7651d247a1
1 changed files with 4 additions and 0 deletions

View File

@ -333,6 +333,10 @@ function install_kafka {
sudo chmod 644 /etc/kafka/server.properties
# set kafka advertised broker address.
sudo sed -i "s/^#advertised.host.name=<hostname routable by clients>/#advertised.host.name=<hostname routable by clients>\nadvertised.host.name=${SERVICE_HOST}/"\
/etc/kafka/server.properties
sudo systemctl enable kafka
sudo systemctl start kafka || sudo systemctl restart kafka