Coder Social home page Coder Social logo

dlindelof / kafka-tunnel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simple-machines/kafka-tunnel

0.0 1.0 0.0 13 KB

Access kafka/zookeeper in your AWS cloud via ssh tunnel to consume and produce messages

Python 99.27% Makefile 0.73%

kafka-tunnel's Introduction

kafkatunnel.py

Access kafka/zookeeper via ssh tunnel to consume and produce messages from your local machine

Requirements

You need python3 in order to use kafkatunnel.py

  • python3
  • pip3

Note: for AWS mode: you need to tag your ec2 zookeeper and kafka instances with Name=kafka/zookeeper

see https://aws.amazon.com/premiumsupport/knowledge-center/ec2-resource-tags/

Install

$ git clone https://github.com/simple-machines/kafka-tunnel
$ make

Usage

kafkatool.py supports two ways of passing the remote zookeeper/kafka ip's:

  • automatic retrival by ec2 resource tags (Name=zookeeper/kafka)
$ kafkatunnel aws ec2-user@awsjumphost
  • manual passing your remote zookeeper/kafka ip's
$ kafkatunnel manual 10.11.85.128,10.11.82.30,10.11.83.9 10.11.80.7,10.11.80.123,10.11.81.13

afterwards you have to provide your root password in order to create the interfaces

zookeeper  on 10.11.85.128    port  2181
zookeeper  on 10.11.82.30     port  2181
zookeeper  on 10.11.83.9      port  2181
kafka      on 10.11.80.7      port  9091
kafka      on 10.11.80.123    port  9091
kafka      on 10.11.81.13     port  9091
 * adding interface, user password might be needed
Password:
connecting to jump host
Last login: Thu Oct 27 05:16:58 2016 from 203.44.116.49

   __|  __|_  )
   _|  (     /   Amazon Linux AMI
  ___|\___|___|

[ec2-user@ip-10-11-85-128 ~]$

On a second screen just do whatever you want, e.g. list all topics.

$ kafka-topics --zookeeper 10.11.85.128:2181 --list

kafka-tunnel's People

Contributors

don41382 avatar triggernz avatar

Watchers

James Cloos 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.