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-up
Alternatively you can run
docker-compose -f docker-compose.failure.yaml up --build
# or
docker-compose -f docker-compose.resilient.yaml up --build
To cleanup containers:
make failing-down
# or
make resilient-down
or
docker-compose -f docker-compose.failure.yaml down
# or
docker-compose -f docker-compose.resilient.yaml down
You 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-api
Restart jokes provider (jokes-api) docker container
docker start jokes-api
The 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-run
or in chaos
directory:
chaos run --rollback-strategy=always experiment.json