Code Monkey home page Code Monkey logo

kafka-lab's Introduction

Kafka Course

Welcome

First, welcome to this course on Kafka.

Although Kafka is quite simple to install, we decided to make base it on Docker and Docker-Compose. This gives us a couple of advantages:

  • Easier installation:
    • As long as you can get Docker to run, we know that the Kafka installation will work
    • Install docker, then simply run the docker-compose file
  • Consistency between Windows, Mac and Linux
  • The ability to scale up and down the Kafka cluster

Link to the labs

This link will lead you to all the labs and examples

Outline

DAY 1

  • Introduction (Lecture ~ 20 min)
    • Who are we?
    • What is Kafka?
    • Explain first lab
  • Verify that everything is installed and working (Lab ~ 20 min)
    • Install Kafka through Docker
    • Run a simple example of Kafka
  • Introduction to Kafka (Lecture ~ 30 min)
    • Kafka under the hood
    • What is a topic?
    • What is a partition?
    • What is a producer?
    • What is a consumer?
  • Creating a topic and pass a message (Lab ~30 min)
    • Create a topic
    • Run a simple consumer
    • Run a simple producer
  • Dissecting the first example (Lecture/Discussion ~ 30 min)
    • Walk-through of the first lab
    • Question and answers
  • Design of Kafka topics and partitions (Lecture ~ 30 min)
    • Case study
    • How to select topics?
    • How to select partitions?
  • Exercise: Designing topics and partitions (Group Project ~ 20 min)
    • Design topics and partitions

DAY 2

  • Evaluation of the designs and suggested solutions (Discussion ~20 min)
    • Discussion of the suggested solution(s)
    • Recommended design of case study
  • Implement Topics and Partitions for case study (Lab ~30 min)
    • Define a topic and partition in Kafka
    • Create a consumer and producer
    • Run a test script
  • Scaling Kafka (Lecture ~30 min)
    • Kafka Brokers
    • Kafka Clusters
    • Cluster mirroring
    • Consumer groups
  • Streaming APIs for Kafka (Lecture ~20 min)
    • What is streaming?
    • Why use streams?
    • Programming to streams
    • Example streams using Spark
  • Streaming and IoT Case Study (Lab ~30 min)
    • Consume a stream from Kafka
    • Build a Spark application over the Kafka stream
  • Kafka Administration and Integration (Lecture ~30 Min)
    • Integration with Big Data tools (Storm, Spark, Hadoop)
    • Kafka Connect
    • Certified Kafka connectors
    • Kafka administration
    • Kafka monitoring
    • Security
  • Exactly once delivery

kafka-lab's People

Contributors

matthewadams avatar pgraff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kafka-lab's Issues

docker-compose exec to create kafka topic is failing with run time error

I am trying to execute a command to create a kafka topic on a Container (already Running)

Output from the Docker ps command is as follows
image

Command executed to create Kafka topic:

image

shell script to create kafka topic is present in the container
/opt/kafka_2.11-0.10.1.1/bin/kafka-topics.sh

But my service 'kafka' is trying to locate the script in local git directory
C:/Program Files/Git/opt/kafka_2.11-0.10.1.1/bin/kafka-topics.sh

Do i need to change the settings to point to work directory in the container.
I am running the docker-compose without changing any settings

Help needed. mkdir: cannot create directory '/bitnami/kafka': Permission denied

I followed the steps mentioned, but I am getting the below error.

$ sudo docker compose up
WARN[0000] The "PWD" variable is not set. Defaulting to a blank string. 
WARN[0000] The "PWD" variable is not set. Defaulting to a blank string. 
[+] Running 2/0
 ⠿ Container 01-verify-installation-zookeeper-1  Created            0.0s
 ⠿ Container 01-verify-installation-kafka-1      Created            0.0s
Attaching to 01-verify-installation-kafka-1, 01-verify-installation-zookeeper-1
01-verify-installation-zookeeper-1  | zookeeper 13:15:18.84 
01-verify-installation-zookeeper-1  | zookeeper 13:15:18.84 Welcome to the Bitnami zookeeper container
01-verify-installation-zookeeper-1  | zookeeper 13:15:18.84 Subscribe to project updates by watching https://github.com/bitnami/containers
01-verify-installation-zookeeper-1  | zookeeper 13:15:18.84 Submit issues and feature requests at https://github.com/bitnami/containers/issues
01-verify-installation-zookeeper-1  | zookeeper 13:15:18.85 
01-verify-installation-zookeeper-1  | zookeeper 13:15:18.85 INFO  ==> ** Starting ZooKeeper setup **
01-verify-installation-zookeeper-1  | zookeeper 13:15:18.88 WARN  ==> You have set the environment variable ALLOW_ANONYMOUS_LOGIN=yes. For safety reasons, do not use this flag in a production environment.
01-verify-installation-zookeeper-1  | mkdir: cannot create directory '/bitnami/zookeeper': Permission denied
01-verify-installation-zookeeper-1 exited with code 1
01-verify-installation-kafka-1      | kafka 13:15:19.33 
01-verify-installation-kafka-1      | kafka 13:15:19.33 Welcome to the Bitnami kafka container
01-verify-installation-kafka-1      | kafka 13:15:19.33 Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-kafka
01-verify-installation-kafka-1      | kafka 13:15:19.34 Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-kafka/issues
01-verify-installation-kafka-1      | kafka 13:15:19.34 
01-verify-installation-kafka-1      | kafka 13:15:19.34 INFO  ==> ** Starting Kafka setup **
01-verify-installation-kafka-1      | kafka 13:15:19.40 WARN  ==> You set the environment variable ALLOW_PLAINTEXT_LISTENER=yes. For safety reasons, do not use this flag in a production environment.
01-verify-installation-kafka-1      | mkdir: cannot create directory '/bitnami/kafka': Permission denied
01-verify-installation-kafka-1 exited with code 1

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.