appagile-kafka

AppAgile-Kafka

Dockerfile for Apache Kafka

The image is available directly from:

  • PROD: vmapgmucrep01.appacp.tsi-af.de:5000/public/appagile-kafka
  • DEV: vmapgmucrep01.appacd.tsi-af.de:5000/public/appagile-kafka

Usage

Create the template oc create -f ose-artefacts/template-appagile-kafka.yaml

Start a cluster:

You have to provide a Zookeeper endpoint in order to start a Kafka container. The cluster endpoint can be used here: e.g. “..svc.cluster.local

Add more brokers:

The image is scalable via the replication controler. The Zookeeper config should be updated automatically.

Broker IDs

The broker id will automatically be generated. Usually, it starts with 1001.

Advertised hostname

The advertised hostname is generated and includes the name of the pod.

Logging

The Kafka-logs are stored under /kafka. The path is persistent and configured to a PV.

Kafka commands

$ oc rsh <kafka-pod>

Create topic

““
2 Replicas:
$ /opt/kafka_2.11-0.9.0.1/bin/kafka-topics.sh –zookeeper $KAFKA_ZOOKEEPER_CONNECT –create –topic bee.msgs –partitions 3 –replication-factor 2

1 Replica:
/opt/kafka_2.11-0.9.0.1/bin/kafka-topics.sh –zookeeper $KAFKA_ZOOKEEPER_CONNECT –create –topic test.msgs –partitions 3 –replication-factor 1
““

List topic

$ /opt/kafka_2.11-0.9.0.1/bin/kafka-topics.sh --list --zookeeper $KAFKA_ZOOKEEPER_CONNECT

Describe topic

$ /opt/kafka_2.11-0.9.0.1/bin/kafka-topics.sh --describe --zookeeper $KAFKA_ZOOKEEPER_CONNECT --topic bee.msgs