{"id":37173164,"url":"https://github.com/sotirisalfonsos/chaos-master","last_synced_at":"2026-01-14T20:14:34.791Z","repository":{"id":53073659,"uuid":"268352436","full_name":"SotirisAlfonsos/chaos-master","owner":"SotirisAlfonsos","description":"The chaos master is part of a chaos project and provides an api to send fault injections to the chaos bots","archived":false,"fork":false,"pushed_at":"2021-04-07T22:45:42.000Z","size":7844,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-21T16:48:29.455Z","etag":null,"topics":["chaos","chaos-engineering","chaos-master"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SotirisAlfonsos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-31T19:48:29.000Z","updated_at":"2021-12-24T08:45:37.000Z","dependencies_parsed_at":"2022-09-11T16:50:52.533Z","dependency_job_id":null,"html_url":"https://github.com/SotirisAlfonsos/chaos-master","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/SotirisAlfonsos/chaos-master","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SotirisAlfonsos%2Fchaos-master","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SotirisAlfonsos%2Fchaos-master/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SotirisAlfonsos%2Fchaos-master/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SotirisAlfonsos%2Fchaos-master/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SotirisAlfonsos","download_url":"https://codeload.github.com/SotirisAlfonsos/chaos-master/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SotirisAlfonsos%2Fchaos-master/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chaos","chaos-engineering","chaos-master"],"created_at":"2026-01-14T20:14:34.291Z","updated_at":"2026-01-14T20:14:34.783Z","avatar_url":"https://github.com/SotirisAlfonsos.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chaos Master\n\n[![Build Status](https://travis-ci.org/SotirisAlfonsos/chaos-master.svg)](https://travis-ci.org/SotirisAlfonsos/chaos-master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/SotirisAlfonsos/chaos-master)](https://goreportcard.com/report/github.com/SotirisAlfonsos/chaos-master)\n[![codebeat badge](https://codebeat.co/badges/ab1778ae-60c1-4b7d-aff6-a8f1eabbd2d5)](https://codebeat.co/projects/github-com-sotirisalfonsos-chaos-master-master)\n[![codecov.io](https://codecov.io/github/SotirisAlfonsos/chaos-master/coverage.svg?branch=master)](https://codecov.io/github/SotirisAlfonsos/chaos-master?branch=master)\n\nThe master provides an api to orchestrate fault injections to the [chaos bots](https://github.com/SotirisAlfonsos/chaos-bot). Using the chaos API you have access to a number of possible fault injection and to an automatic failure recovery mechanism\n#### [Chaos in practice](https://principlesofchaos.org/)\n1. Start by defining a ‘steady state’.\n2. Hypothesize that this steady state will continue in both the control group and the experimental group.\n3. \u003cb\u003eInject failures that reflect real world events.\u003c/b\u003e\n4. \u003ci\u003eTry to disprove the hypothesis by looking for a difference in steady state between the control group and the experimental group.\u003c/i\u003e  \n\nAt this point we should add one more stage\n\n5. \u003cb\u003eRecover fast to the ‘steady state’.\u003c/b\u003e\n\nThe master and bots focus on two of the stages of chaos, \u003cb\u003eInjection of failures\u003c/b\u003e and \u003cb\u003erecovery to a steady state\u003c/b\u003e\n\n----\n\n## Starting Up\n\n#### Create your project flder and download the latest chaos master binary\n\n```bash\nwget https://github.com/SotirisAlfonsos/chaos-master/releases/download/v0.0.2/chaos-master-0.0.2.linux-amd64.tar.gz\ntar -xzf chaos-master-0.0.2.linux-amd64.tar.gz\n```\n\n#### Start the chaos master providing a `config.file` that contains the job definitions. \n\n```bash\n./chaos-master --config.file=path/to/config.yml\n```\nSee examples of the file in the `config/example` folder.\n\n```yml\n# Contain the configuration for the port and scheme of the api. \n# The deafault values are port: 8080 and scheme: http\napi_options:\n  port: 8090\n  scheme: http\n\n# Contain the definition of all enabled failures. \n# Each failure injection needs to be defined in a job together with the targets that are in scope\njobs:\n    # The unique name of the job. The character ',' is not allowed\n  - job_name: \"docker failure injection\"\n    # The type of the failure. Can be [Docker, Service, CPU, Server, Network]\n    type: \"Docker\"\n    # The name of the target component. Only applicable to Docker and Service failure types\n    component_name: \"nginx\"\n    # The list of targets for which is this failure can be applied\n    targets: ['host1:8081', 'host2:8081']\n  - job_name: \"network injection\"\n    type: \"Network\"\n    targets: ['host1:8081', 'host3:8081']\n\n# Contains the tls configuration for the communication with the bots. \n# If not specified will default to http\n# If specified the traffic to the bots will be https\n# You can only provide a peer token if the traffic is https\nbots:\n  # CA certificate\n  ca_cert: \"config/test/certs/ca-cert.pem\"\n  # The pub cert for the connection with the bot\n  public_cert: \"config/test/certs/server-cert.pem\"\n  # peer token for authorization with the bot. A public cert needs to also be provided\n  peer_token: 30028dd6-a641-4ac3-91d8-1e214ac5e6f6\n\n# Contains the configuration for the healthcheck towards the bots\nhealth_check:\n  # If set to active the master with send a healthcheck request to the bots every 1 minute\n  active: false\n  # If set to active the status of the healthcheck will be reported in application log (stderr)\n  report: false\n```\n\n## API\nSee the api specification after starting the master at `\u003chost\u003e/chaos/api/v1/swagger/index.html`\n\n## Chaos in practice\n1. Define the scope of your experiments. Failure types are scoped to specific targets and components. \n   - \u003ci\u003eFor the example config above\u003c/i\u003e   \n      the `docker` failure is scoped to the `nginx` containers in the targets `'host1:8081', 'host2:8081'`  \n      the `network` failure is scoped to targets `'host1:8081', 'host3:8081'`\n2. Start a [chaos bots](https://github.com/SotirisAlfonsos/chaos-bot) in each target specified in your jobs \n   - \u003ci\u003eFor the example config above\u003c/i\u003e  \n      we would have to start 3 bots. one on `host1`, one on `host2` and one on `host3`, all on port `8081` \n3. [Optional] Ensure that you have monitoring and alerting in place. Add the recover endpoint as a webhook in case of an alert, to quickly revert all running failures\n4. Make the first API call to inject a failure\n   - \u003ci\u003eFor the example config above\u003c/i\u003e  \n      ```bash\n      curl -ss -X POST \"http://127.0.0.1:8090/chaos/api/v1/docker?action=kill\" \\\n      -H \"Content-Type: application/json\" \\\n      -d '{\"job\": \"docker failure injection\", \"containerName\": \"nginx\", \"target\": \"host1:8081\"}'\n      ```\n\n## Comparisons\n|                              | Chaos master  | Chaos mesh    | Chaos toolkit | Gremlin  |\n|:------------------------     | :-----------: |:-------------:| :------------:|:--------:|\n|Run experiments as API calls  | x             |               |               | x        |\n|Run experiments as json       |               | x             |  x            |          |\n|Automatic recovery            | x             |               |  x            |          |\n|Steady state definition       |               |               |  x            |          |\n|Status checks                 |               |               |  x            | x        |\n|Plugable failures             |               |               |  x            |          |\n|Kubernetes failures           |               | x             |               | x        |\n|Container failures            | x             | x             |               | x        |\n|Service failures              | x             |               |               |          |\n|Server failures               | x             |               |               | x        |\n|netem chaos                   | x             | x             |               | x        |\n|CPU burn                      | x             | x             |               | x        |\n|IO chaos                      |               | x             |               | x        |\n|Memory burn                   |               | x             |               | x        |\n|Kernel chaos                  |               | x             |               |          |\n|dns chaos                     |               | x             |               | x        |\n|Experiment results            |               |               |  x            |          |\n|Open source                   | x             | x             |  x            |          |\n|Free                          | x             | x             |  x            |          |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsotirisalfonsos%2Fchaos-master","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsotirisalfonsos%2Fchaos-master","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsotirisalfonsos%2Fchaos-master/lists"}