GithubHelp home page GithubHelp logo

isabella232 / dockerfile-kafka-with-consul-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stakater/dockerfile-kafka-with-consul-template

0.0 0.0 0.0 6 KB

Dockerfile of Kafka with consul template

Shell 100.00%

dockerfile-kafka-with-consul-template's Introduction

Kafka with consul-template

How to run:

docker run -d --name kafka -p 9200:9200 -v /home/core/shared/templates/kafka-templates:/templates --label SERVICE_NAME=kafka --dns=172.17.9.101 --dns-search=service.consul stakater/kafka-with-consul-template

Note:

  • The --dns option must specify the address of the consul agent, which will be the private IP of the host instance/machine. (usually it can be founded by the hostname -i command)
  • Provide the volume mapping (-v) if you want to use a custom template for kafka. If the one provided in this repo is enough for your use, you can skip this mapping.

Sample Template

We have provided a sample template (in the templates directory).

To be able to use that template, you must make sure the following preconditions are met:

Preconditions

Consul services:

  • You must have atleast 1 zookeeper service running registered in consul by the name zookeeper-2181

You can run zookeper as follows:

docker run -d --name zookeeper --label SERVICE_NAME=zookeeper -p 2181:2181 zookeeper

Consul Key-Value entries:

  1. The host required to tell clients where to find the broker as well as to communicate with the broker itself.

    key: kafka/advertisedHost

    Example: 172.17.9.101

    Usually this would be the private IP of the instance/machine that is running kafka

  2. The port for the advertised host.

    key: kafka/advertisedPort

    Example: 9200

    This port must be same as the one exposed during running the docker container

dockerfile-kafka-with-consul-template's People

Contributors

hazim1093 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.