Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

kafka role #1336

Merged
merged 4 commits into from
May 2, 2016
Merged

kafka role #1336

merged 4 commits into from
May 2, 2016

Conversation

ryane
Copy link
Contributor

@ryane ryane commented Apr 8, 2016

  • Installs cleanly on a fresh build of most recent master branch
  • Upgrades cleanly from the most recent release
  • Updates documentation relevant to the changes

Installation documentation available in the role readme. Note that you will need at least 3 workers each with 1 CPU and 4 GB of memory available to Mesos in order to run with the default configuration.

This depends on mantl/nginx-mantlui#18 being merged and the 0.6.8 tag of ciscocloud/nginx-mantlui being pushed to docker hub.

After successful Kafka installation (it can take a few minutes), verify the following:

  • that the mantl/kafka scheduler is running and healthy in Marathon
  • that there are 3 Kafka brokers running in Mesos (broker-1, broker-2, broker-3)

Once the brokers are up, you should be able to produce and consume data. Here is one example of a manual test:

# create a topic
curl -sku admin:password -d "topic=journal" https://control-node-01/kafka/api/topic/add

# on one node, pipe journald logs into the journal kafka topic
sudo journalctl -f | sudo docker run --rm -i ryane/kafkacat -b broker-1.service.consul:9092,broker-2.service.consul:9092,broker-3.service.consul:9092 -t journal -z snappy

# on another node, consume the events from the  journal topic
sudo docker run --rm -it ryane/kafkacat -b broker-1.service.consul:9092,broker-2.service.consul:9092,broker-3.service.consul:9092 -t journal


default: 3

.. data:: kafka_broker_cpu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too many CPUs for only 4GB ram,
lets follow the 1/4 proportion (1cpu/4gb, 2cpu/8gb, ...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I updated the config as suggested

@langston-barrett
Copy link
Contributor

We can see if the tag has been pushed on the nginx-mantlui docker hub page.

@ryane
Copy link
Contributor Author

ryane commented Apr 12, 2016

0.6.8 tag of the nginx-mantlui image has been published


The Kafka options to pass to the brokers.

default: "log.flush.interval.ms=10000,num.recovery.threads.per.data.dir=1,delete.topic.enable=true,log.index.size.max.bytes=10485760,num.partitions=8,num.network.threads=3,socket.request.max.bytes=104857600,log.segment.bytes=536870912,log.cleaner.enable=true,zookeeper.connection.timeout.ms=1000000,log.flush.scheduler.interval.ms=2000,log.retention.hours=72,log.flush.interval.messages=20000,log.dirs=/mantl/a/dfs-data/kafka-logs\\,/mantl/b/dfs-data/kafka-logs\\,/mantl/c/dfs-data/kafka-logs\\,/mantl/d/dfs-data/kafka-logs\\,/mantl/e/dfs-data/kafka-logs\\,/mantl/f/dfs-data/kafka-logs,log.index.interval.bytes=4096,socket.receive.buffer.bytes=1048576,min.insync.replicas=2,replica.lag.max.messages=10000000,replica.lag.time.max.ms=1000000,log.retention.check.interval.ms=3600000,message.max.bytes=20480,default.replication.factor=2,zookeeper.session.timeout.ms=500000,num.io.threads=8,auto.create.topics.enable=false,socket.send.buffer.bytes=1048576"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this could be broken up into a dict to be joined by templating, i.e.

kafka_broker_options:
  log.flush.interval.ms: "10000"
  num.recovery.threads.per.data.dir: "1"
  ...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this, it is hard to parse this command

@stevendborrelli
Copy link
Contributor

We probably don't want to use zookeeper.service.consul, as the zk client does not refresh DNS entries, so we lose benefits of RR dns. The zk hosts should be enumerated.

@tpolekhin
Copy link
Contributor

tpolekhin commented Apr 18, 2016

@stevendborrelli

the zk client does not refresh DNS entries

THAT explains a lot... :)

@ryane
Copy link
Contributor Author

ryane commented Apr 19, 2016

kafka will start using the list of zk hosts once #1308 is merged

@ryane ryane modified the milestone: 1.1 Apr 22, 2016
@stevendborrelli stevendborrelli merged commit dbdf718 into master May 2, 2016
@stevendborrelli stevendborrelli deleted the feature/kafka branch May 2, 2016 20:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants