Chaos experiment demo with ChaosToolkit
If you spot any issue with this repository please do raise an issue in Github
This will run 2 docker containers: api & jokes-api (provider)
make failing-up
# or
make resilient-upAlternatively you can run
docker-compose -f docker-compose.failure.yaml up --build
# or
docker-compose -f docker-compose.resilient.yaml up --buildTo cleanup containers:
make failing-down
# or
make resilient-downor
docker-compose -f docker-compose.failure.yaml down
# or
docker-compose -f docker-compose.resilient.yaml downYou can test it by opening web/index.html in your browser. The page does the call to the api on each refresh.
NOTE: API is exposed on the port 3000
Our api responds with status 200
Simulate jokes provider (jokes-api) downtime by stopping its docker container
docker stop jokes-apiRestart jokes provider (jokes-api) docker container
docker start jokes-apiThe experiment can be executed with ChaosToolkit
To create python venv and install ChaosToolkit just execute setup.sh in chaos directory:
cd chaos
source ./setup.sh
cd ..Having active venv with installed chaos/requirements.txt (setup.sh) you can execute
make chaos-runor in chaos directory:
chaos run --rollback-strategy=always experiment.json