The ATLAS Open Data Analysis Pipeline is a distributed system designed to process and analyze data from the ATLAS experiment at CERN. Built with a microservices architecture, this project leverages RabbitMQ for task distribution and supports deployment using both Docker Compose (for local development) and Kubernetes (for production environments). The pipeline is composed of four main services: Data Loader, Data Processor, Analysis Worker, and Visualization Worker, each responsible for a specific stage of the data analysis workflow.
A key feature of this project is its ability to monitor and compare CPU usage across different deployment environments, providing insights into the performance characteristics of Docker Compose versus Kubernetes deployments.
- Distributed Microservices Architecture: The pipeline is divided into independent, scalable services that communicate asynchronously via RabbitMQ.
- Flexible Deployment Options: Supports deployment using Docker Compose for local development and Kubernetes for scalable, production-grade environments.
- Data Processing Workflow:
- Data Loader: Fetches data from the ATLAS Open Data repository and queues tasks for processing.
- Data Processor: Cleans, transforms, and calculates invariant masses from the raw data.
- Analysis Worker: Aggregates results and prepares data for visualization.
- Visualization Worker: Generates plots and calculates signal significance.
- CPU Usage Monitoring: Includes a
cpu_monitor.pyscript to track and compare CPU usage across services in different deployment environments. - Automated Build and Deployment: Provides scripts for building Docker images and deploying the application to Docker Compose or Kubernetes.
Before running the project, ensure you have the following installed:
- Python 3.10: Install Python
- Docker: Install Docker
- Docker Compose: Install Docker Compose
- Minikube (for Kubernetes deployment): Install Minikube
- kubectl (for Kubernetes deployment): Install kubectl
-
Clone the Repository:
git clone
-
Build Docker Images: Run the
image-build.shscript to build the Docker images for all services:./image-build.sh
-
Set Up Minikube (for Kubernetes Deployment): Start Minikube with the desired resource allocation:
minikube start --cpus=4 --memory=2200
-
Configure Docker to Use Minikube: Point your Docker CLI to Minikube's Docker daemon:
eval $(minikube docker-env)
-
Start the Application: Run the
docker-run.shscript to start the application using Docker Compose:./docker-run.sh
-
Access RabbitMQ Management UI: Open your browser and navigate to:
http://localhost:15672 -
Access Visualization Output: Open your browser and navigate to:
http://localhost:8080 -
If you'd like to see the full setup without using shell scripts, you can manually run the following Docker Compose command:
docker-compose up --build
-
Run the Deployment Script: Use the
deploy-k8s.shscript to automate the deployment process:./deploy-k8s.sh
This script will:
- Apply all Kubernetes manifests.
- Verify that all pods are running.
- Set up port forwarding for RabbitMQ and the Visualization service.
-
Access RabbitMQ Management UI: The script will output the following:
🌐 RabbitMQ Management UI is available at: http://localhost:15672 -
Access Visualization Output: The script will also output:
🌐 Visualization output is available at: http://localhost:8080 -
Stop the Deployment: Press
Ctrl+Cto stop port forwarding and exit the script.
This project monitors CPU usage during a benchmark and saves the results for analysis.
-
Build the Docker image:
docker-compose build
-
Run the benchmark:
docker-compose up
-
Check the results: The results will be saved in the
outputfolder:cpu_data_docker-compose.csvcpu_usage_docker-compose.pngcpu_comparison.pngcpu_comparison_results.txt
-
Build and push the Docker image:
docker build -t your-docker-image:latest . docker tag your-docker-image:latest your-dockerhub-username/your-docker-image:latest docker push your-dockerhub-username/your-docker-image:latest -
Deploy the benchmark job to your Kubernetes cluster:
kubectl apply -f benchmark-job.yaml
-
Monitor the job:
kubectl get jobs kubectl logs <pod-name>
-
Access the results: The results will be saved to the persistent volume defined in
benchmark-job.yaml.
If pods are stuck in the Pending state, check the node's resource usage:
kubectl describe nodesEnsure that the resource requests and limits in your Deployment manifests are within the node's capacity.
If Minikube fails to start due to insufficient resources, reduce the requested memory:
minikube start --cpus=4 --memory=2200If Docker images fail to build, ensure that Docker is running and that you have sufficient disk space.