This repository contains the source code of the scenarios/chaos testing run to assess the effectiveness of yRCA in explaining manually injected/randomly generated failures.
All the available material refers to Online Boutique application that have been modified to be log-enabled. To simplify the deployment process a docker-compose.yml file has been developed to run Online Boutique with Docker Swarm and a logstash.conf file to correctly parse and transform the incoming logs from Docker. Use the personalized scripts inside the /scripts folder to run and stop the application, furthermore execute yRCA tests accordingly the proposed scanarios.
NOTE: yRCA uses templates to correctly explain failure events, use the provided template.yml file to run the tests
The results obtain by the master thesis project are structured as the following structure:
- Scenario X
- all.json Log file generated by Online Boutique
- /src Contains all the source code files that have been modified to run tests
- yrca_output.png yRCA output screenshot
- readme.txt Brief scenario explaination with command to execute
Every scenario can be tested by simply replacing the files inside the "src" folder into the corresponding Online Boutique's microservice folder.
Follow the readme.txt file in each "Scenario" folder to run the desired test.
To perform random tests I developed a simple script to perform random container deletion. The chaos_test.py file can be used to remove cyclically Docker containers of the specified Docker Swarm Stack.
To execute the script make sure to install Python 3 and execute it according to the following parameters:
┌─────────────────────── HOW TO USE ───────────────────────────┐
│ │
│ python3 chaos_test.py STACK_NAME NUM_SERVICES CYCLES SECONDS │
│ │
├───────────────────────── PARAMETERS ─────────────────────────┤
│ │
│ STACK_NAME: onlineBoutique - Docker Swarm deploy name │
│ NUM_SERVICES: 10 - Number of containers to stop │
│ CYCLES: 3 - Repeat the chaos test for CYCLES times │
│ SECONDS: 8 - Wait time between each cycle │
└──────────────────────────────────────────────────────────────┘
For any doubts or support, feel free to contact me via email at [email protected]