This repository outlines two approaches for a parallelised workflow of the ATLAS Open data higgs boson discovery analysis.
This branch contains the instructions on how to set up a Kubernetes approach whilst branch `docker-compose' contains a Docker Compose + Swarm approach.
To begin either, Docker must be installed on the machine. For the Kubernetes approach, Kubernetes must also be enabled via Docker Desktop.
First, build the Docker images for the worker and main services:
docker build -t felixgroup/worker:latest ./worker
docker build -t felixgroup/main:latest ./mainApply all deployment manifests in the ./deployments/ directory:
kubectl apply -f ./deployments/Expose the webserver deployment via a NodePort service:
kubectl expose deployment/webserver --port 80 --type NodePortCheck the assigned service ports:
kubectl get svcAlter the replicas flag to specify the worker count.
kubectl scale deployment worker --replicas=3Open the plotting endpoint in your browser using the NodePort assigned to the webserver:
http://localhost:<insert-port-from-svc-check>/plot.png
Replace <insert-port-from-svc-check> with the actual NodePort value shown in the kubectl get svc output.
PLEASE NOTE: A plot will only appear once results begin being sent back so check the main pod log (outlined at the bottom) before refreshing.
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 3m12s
rabbitmq ClusterIP 10.102.191.87 <none> 5672/TCP,15672/TCP 3m2s
webserver NodePort 10.106.242.158 <none> 80:30641/TCP 5s
In this case, 30641 is the port to be added to the URL.
To stream logs from the main analysis node:
kubectl logs -f deployment/main