This repository provides instructions to set up Apache Airflow and Kafka using Docker.
- Python installed on your machine.
- Docker installed on your machine.
-
Install Apache Airflow using pip:
pip install apache-airflow
-
Initialize Airflow metadata database:
airflow db init
-
(Optional) Review and configure Airflow settings:
airflow config list
-
Create an admin user for Airflow web UI:
airflow users create --role Admin --username admin --email admin --firstname admin --lastname admin --password admin
-
Start the Airflow webserver on port 8080:
airflow webserver --port 8080
-
Copy your
dag.py
file to thedags
folder in your Airflow installation directory.
-
Install Docker if not already installed.
-
Navigate to your project directory containing the
docker-compose.yml
file. -
Start Kafka and related services using Docker Compose:
docker-compose up -d
This command will start Kafka and other services defined in the
docker-compose.yml
file in detached mode.
If you encounter any issues or have any questions, feel free to reach out!
You can now copy this text directly into your README file.