Skip to content

Data Engineering | Kafka | ElasticSearch | ELK | Esper | Nifi #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
raunak-r opened this issue Apr 6, 2021 · 5 comments
Open

Data Engineering | Kafka | ElasticSearch | ELK | Esper | Nifi #19

raunak-r opened this issue Apr 6, 2021 · 5 comments

Comments

@raunak-r
Copy link
Owner

raunak-r commented Apr 6, 2021

Nifi

Integrating Nifi + Kafka

minifi, and scenarios of using multiple consumers vs partitions. - https://bryanbende.com/development/2016/09/15/apache-nifi-and-apache-kafka

@raunak-r
Copy link
Owner Author

raunak-r commented Apr 6, 2021

Esper

esper is the software to handle complex event processing, and EPL is the language (similar to SQL), to achieve this.

@raunak-r
Copy link
Owner Author

raunak-r commented Aug 2, 2021

Redis and Celery with Django

Using Docker-Compose - https://testdriven.io/blog/django-and-celery/
Naked setup in Ubuntu - https://stackabuse.com/asynchronous-tasks-in-django-with-redis-and-celery

Running inside a simple docker container.

Protected Mode is required when connecting from a different server to a different server. Since the container is a different server from localhost, that's why required.

FROM        ubuntu:20.04
RUN         apt-get update && apt-get install -y redis-server
EXPOSE      6379
ENTRYPOINT  ["/usr/bin/redis-server", "--protected-mode no"]

Running Redis

  • sudo docker run -p 6379:6379 --log-opt max-size=10m redis _# Run container
  • sudo docker exec -it CID /bin/bash # access container bash

Deploying Celery | Dockerfile

Dockerfile - https://stackoverflow.com/questions/59651428/runtimewarningyoure-running-the-worker-with-superuser-privilegesthis-is-absol

# --uid and --gid options are required
# else this warning will show up RuntimeWarning:You're running the worker with superuser privileges:this is absolutely not recommended
- celery --app=app worker --loglevel=info --uid=nobody --gid=nogroup &

Testing

  • redis-cli -h 127.0.0.1 -p 6379
  • ping # will output PONG

Steps

  1. Run Redis on a terminal as a docker container
  2. Run Celery Worker on a different terminal
  3. Call API from Postman.

@raunak-r raunak-r mentioned this issue Aug 2, 2021
@raunak-r raunak-r changed the title Data Engineering | Brokers | Queues | Kafka | Nifi Data Engineering | Kafka | ElasticSearch | ELK | Esper | Nifi Sep 21, 2021
@raunak-r
Copy link
Owner Author

ELK elastic - logstash - kibana

@raunak-r
Copy link
Owner Author

ElasticSearch

ES Setup

> echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
> sudo apt update
> sudo apt install elasticsearch

Optional - Port Configuration

> sudo nano /etc/elasticsearch/elasticsearch.yml

Run ES

> sudo systemctl start elasticsearch

Create Indexes

> curl -X PUT "localhost:9200/INDEX_NAME?pretty"

Verify Elastic Search

> List of all indexes
    curl -X GET "localhost:9200/_cat/indices?pretty"
> Cluster Health
    curl -X GET "localhost:9200/_cluster/health?pretty"

@raunak-r
Copy link
Owner Author

raunak-r commented May 7, 2022

Data at Scale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant