This scenario deploys an instance of the following application:
The application consists of the following microservices:
- HazardDetector Service:
- Watches the street and detects if there is a hazard on the road (e.g., an animal or a broken down car).
- Runs on a node that has a camera attached.
- If a hazard is detected, the Hazard Detector sends this information and the segment of the video to the AlertValidator.
- AlertValidator Service:
- Runs on a more powerful node than the HazardDetector.
- Validates that there is a hazard using a more complex detection model and, if hazard is real, broadcasts this information immediately to all vehicles in its range via 5G.
- Forwards the hazard info to the AlertManager.
- AlertManager Service:
- Collects alerts from multiple sources.
- Decides which vehicles in the greater vicinity need to be informed and informs them via AMQP.
The scenario uses kind to create a test cluster with 7 fog nodes. The following image shows the configuration of the cluster nodes and the configured cluster topology:
Prerequisites:
- Docker
- kind
- Open a terminal in
scenario-01
and runcd prerequisites
- Run
./start-kind-with-local-registry.sh
- In a second terminal run
kubectl proxy
- Run
./create-extended-resources.sh localhost:8001
cd ..
to get back to the scenario's main folder- Run
kubectl get pods --all-namespaces
to find the pod names of the schedulers. - Open run-all-experiments.sh and set the variables at the top to the corresponding schedulers' pod names to enable retrieval of scheduler logs and configure the number of iterations.
- To execute the tests, run
./run-all-experiments.sh
- Each test will create a
results
folder in the folder of the respective scheduler.
The test script (./run-single-experiment.sh) is executed for once for every scheduler.
It executes the configured number of iterations of the following process:
- Add n instances of the application to the cluster.
- Wait for a configurable amount of time (see
longSleepTime
in the script). - Dump the target namespaces and all nodes to an output JSON file.
- Delete the target namespaces to remove the deployed application.