- Docker Desktop (v20.10+) with at least 8GB RAM allocated
- Docker Compose (v2.0+)
- Windows PowerShell or Command Prompt
- Google Cloud Platform account with BigQuery enabled
- API Keys:
- RapidAPI key for Arabic News API
- GROQ API key for Llama 3.1-8B
The .env file contains all necessary configuration. Verify these values:
# API Keys (Already configured)
X_RAPID_API_KEY=82e0065f27mshb18dd7d4b586ee0p1bde38jsnaee89a9af5bd
GROQ_API_KEY=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
# GCP Configuration (Already configured)
GCP_PROJECT_ID=news-project-sa
GCP_KEY_FILE_Path=./kafka/config/keyfile.json
# Airflow Credentials (Default - Change for production)
_AIRFLOW_WWW_USER_USERNAME=airflow_admin
_AIRFLOW_WWW_USER_PASSWORD=airflow_admin✅ Already Configured:
- Service account key:
kafka/config/keyfile.json - Project ID:
news-project-sa - BigQuery connector configured in
compose.yaml
Required Manual Step:
- Go to Google Cloud Console
- Navigate to BigQuery
- Create dataset:
bq_kafka_dataset(if not exists) - Ensure service account has BigQuery Data Editor permissions
✅ All Critical Files Present:
compose.yaml- Docker services configuration.env- Environment variablesMakefile- Build commandsairflow/Dockerfile- Airflow custom imageairflow/dags/news_fetching_dag.py- Main DAGetl/config/config.yml- ETL configurationetl/spark-jobs/process.py- Spark processing jobkafka/config/keyfile.json- GCP credentialskafka/config/bigquery-sink.json- BigQuery connector configkafka/schemas/*.avsc- Avro schemas for 3 topics
cd C:\Users\MSI\Desktop\Arabic_News_Data_Engineering_project
# Start all services
docker-compose --profile all up --build -ddocker ps --format "table {{.Names}}\t{{.Status}}"Expected Services (28 total):
- ✅ Airflow: webserver, scheduler, worker_1, worker_2, triggerer, redis, postgres
- ✅ Kafka: kafka1, kafka2, zoo1, zoo2, schema-registry, connect, rest-proxy
- ✅ Spark: master, worker_1, worker_2
- ✅ Monitoring: prometheus, grafana, flower
| Service | URL | Credentials |
|---|---|---|
| Airflow UI | http://localhost:8086 | airflow_admin / airflow_admin |
| Spark Master | http://localhost:8084 | No auth |
| Spark Worker 1 | http://localhost:8085 | No auth |
| Spark Worker 2 | http://localhost:8087 | No auth |
| Prometheus | http://localhost:9090 | No auth |
| Grafana | http://localhost:3001 | Default: admin / admin |
| Flower (Celery) | http://localhost:5555 | No auth |
Problem: 500 Internal Server Error for API route
Solution Option 1 (Recommended - Faster):
- Right-click Docker Desktop tray icon → Pause
- Wait 5 seconds
- Right-click Docker Desktop tray icon → Resume
- Wait until tray icon shows "Docker Desktop is running"
- Retry the docker-compose command
Solution Option 2 (Full Restart):
- Right-click Docker Desktop tray icon → Quit Docker Desktop
- Wait 10 seconds
- Start Docker Desktop from Start menu
- Wait until tray icon shows "Docker Desktop is running"
- Retry the docker-compose command
💡 Tip: Pausing Docker Engine is faster and preserves container state, making it ideal for quick fixes without losing running containers.
Solution:
# Remove old containers
docker rm -f kafka1 kafka2 kafka-connect kafka-rest-proxy
# Restart Kafka services
docker-compose --profile all up -d kafka1 kafka2 kafka-connect kafka-rest-proxy- Open Airflow UI: http://localhost:8086
- Login with
airflow_admin/airflow_admin - Find DAG:
news_fetching_and_processing - Click the play button to trigger manually
- Go to BigQuery Console
- Navigate to
news-project-sa→bq_kafka_dataset - Check table
ar_news_ana_topic - Run query:
SELECT * FROM `news-project-sa.bq_kafka_dataset.ar_news_ana_topic` LIMIT 10
# Stop all services
docker-compose --profile all down
# Stop and remove volumes (clean slate)
docker-compose --profile all down -vWhen you're not actively using the project but want to keep containers intact:
Pause Docker Engine:
- Right-click Docker Desktop tray icon → Pause
- This frees up CPU and memory while preserving all container state
Resume Docker Engine:
- Right-click Docker Desktop tray icon → Resume
- All containers resume from their paused state
💡 Benefits:
- Instant pause/resume (no rebuild needed)
- Preserves all container data and state
- Frees up system resources immediately
- Much faster than stopping and restarting services
| Action | Use When | Time | Data Preserved |
|---|---|---|---|
| Pause | Taking a break, freeing resources temporarily | Instant | ✅ Yes |
| Stop Services | Done for the day, want to free all resources | ~30s | ✅ Yes (unless -v flag) |
| Full Restart | Troubleshooting Docker issues | ~2-3min | ✅ Yes |