{"id":13701857,"url":"https://github.com/tmobile/chaostoolkit-turbulence","last_synced_at":"2025-05-15T06:32:00.159Z","repository":{"id":81513256,"uuid":"147433923","full_name":"tmobile/chaostoolkit-turbulence","owner":"tmobile","description":"Tools and resources to support Chaos Engineering","archived":false,"fork":false,"pushed_at":"2018-09-06T15:30:36.000Z","size":10,"stargazers_count":11,"open_issues_count":0,"forks_count":5,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-03T05:13:32.490Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tmobile.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-09-04T23:52:40.000Z","updated_at":"2023-07-25T03:37:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"f706c83c-4521-4f9f-ae9d-5c98f170947f","html_url":"https://github.com/tmobile/chaostoolkit-turbulence","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmobile%2Fchaostoolkit-turbulence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmobile%2Fchaostoolkit-turbulence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmobile%2Fchaostoolkit-turbulence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmobile%2Fchaostoolkit-turbulence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmobile","download_url":"https://codeload.github.com/tmobile/chaostoolkit-turbulence/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254288352,"owners_count":22045884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-02T21:00:25.280Z","updated_at":"2025-05-15T06:31:58.458Z","avatar_url":"https://github.com/tmobile.png","language":"Python","readme":"# chaostoolkit-turbulence\r\n\r\nThis is an extension for [Chaos Toolkit](https://chaostoolkit.org/) which adds support for\r\n[Turbulence](https://github.com/cppforlife/turbulence-release) attacks.\r\n\r\n## Setup\r\n\r\n### Install\r\nTo be used from your experiment, this package must first be installed in the Python environment where\r\n[chaostoolkit](https://chaostoolkit.org/) already exists. This package requires at least\r\n[Python](https://www.python.org/) version 3.5, so translate `python` as `python3` or `pyhton3.5` as appropriate for your\r\noperating system.\r\n\r\nFrom within the source, run:  \r\n\r\n```bash\r\nsudo python setup.py install\r\n```\r\n\r\nOr to install for just your user:  \r\n\r\n```bash\r\npython setup.py install --user\r\n```\r\n\r\nNow you should be able to import the package.\r\n\r\n```python\r\nimport chaosturbulence\r\nprint(chaosturbulence.__version__)\r\n```\r\n\r\n### Turbulence Deployment\r\nBefore this plugin can be used, you need to have [Turbulence](https://github.com/cppforlife/turbulence-release) deployed\r\nin a [BOSH](https://github.com/cloudfoundry/bosh) environment and have the api accessible form your system. Once this is\r\nready, specify the needed information in the configuration section of the attack. See the\r\n[docs](https://github.com/cppforlife/turbulence-release/blob/master/docs/config.md) for more information on\r\nhow to deploy Turbulence.\r\n\r\n## Usage\r\nIf you have not installed the `chaosturbulence` package, then make sure you run Chaos Toolkit from this directory (the\r\nroot of this repository) using `pyhton -m chaostoolkit run exp.json` or else the `chaosturbulence` module will not be\r\nfound. Otherwise just use `chaos run exp.json` from any directory.\r\n\r\nTo use, you will need to specify in the configuration:\r\n\r\n- `turb_api_url`: The URL of the Turbulence API which POST requests will be sent to. This should be in the form `https://user:password@address:port`.\r\n- `turb_verify_ssl`: Whether the SSL certificate should be verified. It will default to `true`.\r\n \r\nThen, to write an attack simply specify the task type and the selector to use. More information about the tasks and\r\nselectors can be found in the\r\n[Turbulence API docs](https://github.com/cppforlife/turbulence-release/blob/master/docs/api.md).\r\n\r\nA sample experiment for Turbulence integration with Chaos Toolkit:\r\n\r\n```json\r\n{\r\n    \"version\": \"1.0.0\",\r\n    \"title\": \"What is the impact of killing one random diego cell?\",\r\n    \"description\": \"If a diego-cell dies, then it should be restarted automatically and any applications on it should be relocated temporarily\",\r\n    \"tags\": [\"tls\"],\r\n    \"steady-state-hypothesis\": {\r\n        \"title\": \"Application responds\",\r\n        \"probes\": []\r\n    },\r\n\t\"configuration\": {\r\n\t\t\"turb_api_url\": \"https://turbulence:admin@10.244.0.35:8080\",\r\n\t\t\"turb_verify_ssl\": false\r\n\t},\r\n    \"method\": [\r\n        {\r\n\t\t\t\"type\": \"action\",\r\n\t\t\t\"name\": \"terminate-diego-cells\",\r\n\t\t\t\"provider\": {\r\n\t\t\t\t\"type\": \"python\",\r\n\t\t\t\t\"module\": \"chaosturbulence.actions\",\r\n\t\t\t\t\"func\": \"attack\",\r\n\t\t\t\t\"arguments\": {\r\n\t\t\t\t\t\"task\": { \"Type\": \"Kill\" },\r\n\t\t\t\t\t\"selector\": {\r\n\t\t\t\t\t\t\"Deployment\": {\"Name\": \"cf\"},\r\n\t\t\t\t\t\t\"Group\": {\"Name\": \"diego-cell\"},\r\n\t\t\t\t\t\t\"ID\": {\"Limit\": 1}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n    ],\r\n    \"rollbacks\": []\r\n}\r\n```\r\n\r\nBecause Turbulence has its own rollbacks setup based on the `timeout`, you may want to set\r\n`\"pauses\": {\"after\": timeout}` where timeout is a number of seconds and pauses is a field in an action object. You can\r\nread more in the [experiment documentation](https://docs.chaostoolkit.org/reference/api/experiment/#action).","funding_links":[],"categories":["3. Fault Injection"],"sub_categories":["Generic Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmobile%2Fchaostoolkit-turbulence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmobile%2Fchaostoolkit-turbulence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmobile%2Fchaostoolkit-turbulence/lists"}