GithubHelp home page GithubHelp logo

ptzagk / fast-data-connect-cluster Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lensesio/fast-data-connect-cluster

0.0 0.0 0.0 14 KB

Create Kafka-Connect clusters with docker . You put the Kafka, we put the Connect.

Shell 100.00%

fast-data-connect-cluster's Introduction

kafka-connect-cluster

Join the chat at https://gitter.im/Landoop/fast-data-dev

A docker image for setting up Kafka Connect clusters.


This part of fast-data-dev is targeted to more advanced users and is a special case since it doesn't set-up a Kafka cluster, instead it expects to find a Kafka Cluster with Schema Registry up and running.

The developer can then use this docker image to setup a connect-distributed cluster by just spawning a couple containers.

docker run -d --net=host \
       -e ID=01 \
       -e BS=broker1:9092,broker2:9092 \
       -e ZK=zk1:2181,zk2:2181 \
       -e SR=http://schema-registry:8081 \
       -e HOST=<IP OR FQDN>
       landoop/fast-data-dev-connect-cluster

For an example take a look in the docker-compose.yml. It will spawn a fast-data-dev to act as the Kafka stack, 3 fast-data-dev-connect-cluster containers to form a Connect cluster and a Connect UI (at port 8000) for the cluster. Remember that Connect needs some time to populate the connectors, so you may have to wait a few minutes before they show up in the UI (when you press new). Also you can use fast-data-dev's 3030 port to inspect your schemas and topics.

For now this image is tied to landoop/fast-data-dev:latest, which is on CP3.1.2. In the future we may offer more versions.

Things to look out for in configuration options:

  1. It is important to give a full URL (including schema โ€”http://) for schema registry.
  2. ID should be unique to the Connect cluster you setup, for current and old instances. This is because Connect stores data in Brokers and Schema Registry. Thus even if you destroyed a Connect cluster, its data remain in your Kafka setup.
  3. HOST should be set to an IP address or domain name that other connect instances and clients can use to reach the current instance. We chose not to try to autodetect this IP because such a feat would fail more often than not. Good choices are your local network ip (e.g 10.240.0.2) if you work inside a local network, your public ip (if you have one and want to use it) or a domain name that is resolvable by all the hosts you will use to talk to Connect.

If you don't want to run with --net=host you have to expose Connect's port which at default settings is 8083. There a PORT option, that allows you to set Connect's port explicitly if you can't use the default 8083. Please remember that it is important to expose Connect's port on the same port at the host. This is a choice we had to make for simplicity's sake.

docker run -d \
       -e ID=01 \
       -e BS=broker1:9092,broker2:9092 \
       -e ZK=zk1:2181,zk2:2181 \
       -e SR=http://schema-registry:8081 \
       -e HOST=<IP OR FQDN>
       -e PORT=8085
       -p 8085:8085
       landoop/fast-data-dev-connect-cluster

Advanced issues

The container does not exit with CTRL+C. This is because we chose to pass control directly to Connect, so you check your logs via docker logs. You can stop it or kill it from another terminal.

Whilst the PORT variable sets the rest.port, the HOST variable sets the advertised host. This is the hostname that Connect will send to other Connect instances. By default Connect listens to all interfaces, so you don't have to worry as long as other instances can reach each instance via the advertised host.

fast-data-connect-cluster's People

Contributors

andmarios avatar antwnis 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.