{ "info": { "author": "chaostoolkit Team", "author_email": "contact@chaostoolkit.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: Freely Distributable", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation", "Programming Language :: Python :: Implementation :: CPython" ], "description": "# Chaos Toolkit Driver for Toxiproxy\n\n[![Build Status](https://travis-ci.org/chaostoolkit-incubator/chaostoolkit-toxiproxy.svg?branch=master)](https://travis-ci.org/chaostoolkit-incubator/haostoolkit-toxiproxy)\n[![Python versions](https://img.shields.io/pypi/pyversions/chaostoolkit-toxiproxy.svg)](https://www.python.org/)\n\nWelcome to the [Chaos Toolkit][chaostoolkit] driver for [Toxiproxy][toxiproxy]! This extension allows you to setup toxy proxy probes and methods from chaostoolkit by leveraging the toxyproxy [http management api](https://github.com/Shopify/toxiproxy#http-api). \n\n[toxiproxy]: https://github.com/Shopify/toxiproxy\n[chaostoolkit]: http://chaostoolkit.org\n\n## Install\n\nThis package requires Python 3.5+\n\nTo be used from your experiment, this package must be installed in the Python\nenvironment where [chaostoolkit][] already lives.\n\n```\n$ pip install -U chaostoolkit-toxiproxy\n```\n\n## Usage\n\n### Configuration\n\nTo start using the actions and probes all you need to do is add the toxiproxy host with \"toxiproxy_host\" as the key, and optionally the port with \"toxiproxy_port\" as the key, to the configuration section in your experiment json. If not provided the port defaults to 8474.\n\nExample in experiment.json\n\n```json\n\"configuration\": {\n \"toxiproxy_host\" : \"10.124.23.183\",\n \"some_environment_variable\": {\n \"type\": \"environment\",\n \"key\": \"ENVIRONMENT_VARIABLE\"\n }\n },\n```\n\nThis extension follows the toxiproxy rules. A proxy is the channel where toxicity can be added. For this reason the extension is broken into proxy management and toxic management. \n\nAll actions and probes in the extension are of python type and are used like any other python extension.\n\n### Proxy actions\n\n#### create_proxy\n\nCreates a proxy to which toxics can be added. In toxiproxy a listen port of value 0 tells the API to assign a random available port. The value where the proxy is listenting will be attached to the **chaostoolkit configuration object** as *\\_PORT*. Should the creation of the proxy fail, an assertion error is raised stopping all subsequent actions.\n\n|Argument|Description|Required|Default|\n|--------|-----------|--------|-------|\n|proxy_name|name for the proxy|Yes|None|\n|upstream_host|ip address of the host to send traffic to|Yes|None|\n|upstream_port|port of the application to send traffic to|Yes|None|\n|listen_host| IP address to bind where toxiproxy listens|No| 0.0.0.0|\n|listen_port|port to listen for requests, 0 means pick random value|No|0|\n|enabled| Whether to start listening or not|No|True|\n\n#### modify_proxy\n\nModify the configuration of a given proxy. Useful to change the upstream configiuration. Only arguments supplied result in modification of the proxy.\n\n|Argument|Description|Required|Default|\n|--------|-----------|--------|-------|\n|proxy_name|name for the proxy|Yes|None|\n|listen_addres|ip:port address to modify|No|None|\n|upstream_addres|ip:port of the upstream|No|None|\n|enabled| Toggle enabled/disabled state|No|None|\n\n#### disable_proxy\n\nDisables the proxy, this is useful to simulate a proxied service being down.\n\n|Argument|Description|Required|Default|\n|--------|-----------|--------|-------|\n|proxy_name|name for the proxy to disable|Yes|None|\n\n\n#### enable_proxy\n\nEnables a disabled proxy.\n\n|Argument|Description|Required|Default|\n|--------|-----------|--------|-------|\n|proxy_name|name for the proxy to enable|Yes|None|\n\n#### delete_proxy\n\nRemoves the proxy from the system.\n\nExample usage\n\n```json\n \"method\": [\n {\n \"type\": \"action\",\n \"name\": \"setup_toxiproxy_proxy\",\n \"provider\": {\n \"type\": \"python\",\n \"module\": \"toxiproxy.proxy.actions\",\n \"func\": \"create_proxy\",\n \"arguments\": {\n \"proxy_name\": \"myproxy\",\n \"listen_port\" : 6666,\n \"upstream_host\" : \"10.28.188.118\",\n \"upstream_port\" : 6040\n }\n },\n \"pauses\": {\n \"after\": 1\n }\n }\n ] \n```\n### Proxy pobes\n\n#### proxy_exist\n\nReturns True of False if a given proxy exists.\n\n|Argument|Description|Required|Default|\n|--------|-----------|--------|-------|\n|proxy_name|name for the proxy|Yes|None|\n\n\n### Toxic actions\nAll actions provided by this extension match the types and attributes of [toxics](https://github.com/Shopify/toxiproxy#toxics). \n\n#### create\\_toxic\n\nAllows you to create any of the supported types of toxics with their attributes. \n\n|Argument|Description|Required|Default|\n|--------|-----------|--------|-------|\n|for_proxy|name for the proxy to attach the toxy|Yes|None|\n|toxic_name|name for this toxy|Yes|None|\n|toxic_type|A valid toxic type|Yes|None|\n|stream| The direction of the toxic \"upstream\" or \"downstream\"|No|downstream|\n|toxicity|Percentage of toxiciy 1.0 is 100%, 0.5 is 50% etc| No| 1.0|\n|attributes|Dictionary of attributes for the type of toxic|No|None|\n\n#### create\\_latency\\_toxic\n\nAdd a delay to all data going through the proxy using a downstream with a toxicity of 100%.\n\n|Argument|Description|Required|Default|\n|--------|-----------|--------|-------|\n|for_proxy|name for the proxy to attach the toxy|Yes|None|\n|toxic_name|name for this toxy|Yes|None|\n|latency| time in milliseconds to add for latency| Yes|None|\n|jitter| time in milliseconds to jitter|No|0\n\n#### create\\_bandwith\\_degradation\\_toxic\n\nLimit the bandwith of a downstream connection with a toxicity of 100%.\n\n|Argument|Description|Required|Default|\n|--------|-----------|--------|-------|\n|for_proxy|name for the proxy to attach the toxy|Yes|None|\n|toxic_name|name for this toxy|Yes|None|\n|rate| desired bandwith rate in KB/s| Yes|None|\n\n#### create\\_slow\\_connection\\_close\\_toxic\n\nGenerate as downstream delayed TCP close with a toxicity of 100%.\n\n|Argument|Description|Required|Default|\n|--------|-----------|--------|-------|\n|for_proxy|name for the proxy to attach the toxy|Yes|None|\n|toxic_name|name for this toxy|Yes|None|\n|delay| desired close delay in milliseconds| Yes|None|\n\n#### create\\_slicer\\_toxic\n\nSlices TCP data up into small bits, optionally adding a delay between each sliced \"packet\" with a toxicity of 100%.\n\n|Argument|Description|Required|Default|\n|--------|-----------|--------|-------|\n|for_proxy|name for the proxy to attach the toxy|Yes|None|\n|toxic_name|name for this toxy|Yes|None|\n|average_size| size in bytes for the average package| Yes|None|\n|size_variation| variation in bytes of an average pkg (should be smaller than average_size)|Yes|None\n|delay| time in microseconds to delay each packet by|Yes|None\n\n#### create\\_limiter\\_toxic\n\nCloses connections when transmitted data after the limit, sets it up as a dowsntream, 100% toxicity.\n\n|Argument|Description|Required|Default|\n|--------|-----------|--------|-------|\n|for_proxy|name for the proxy to attach the toxy|Yes|None|\n|toxic_name|name for this toxy|Yes|None|\n|bytes| number of bytes to transmit before connection is closed| Yes|None|\n\n#### delete\\_toxic\n\nDeletes the a given toxic.\n\n|Argument|Description|Required|Default|\n|--------|-----------|--------|-------|\n|for_proxy|name for the proxy to attach the toxy|Yes|None|\n|toxic_name|name for this toxy|Yes|None|\n\nExample usage:\n\n```json\n \"method\": [ \n {\n \"type\": \"action\",\n \"name\": \"create_latency_toxic\",\n \"provider\": {\n \"type\": \"python\",\n \"module\": \"toxiproxy.toxic.actions\",\n \"func\": \"create_dowsntream_latency_toxic\",\n \"arguments\": {\n \"for_proxy\": \"edsproxy\",\n \"toxic_name\": \"latency_toxic\",\n \"latency\": 5000,\n \"jitter\": 200\n }\n },\n \"pauses\": {\n \"after\": 1\n }\n } \n ]\n```\n\n## Contribute\n\nIf you wish to contribute more functions to this package, you are more than\nwelcome to do so. Please, fork this project, make your changes following the\nusual [PEP 8][pep8] code style, sprinkling with tests and submit a PR for\nreview.\n\n[pep8]: https://pycodestyle.readthedocs.io/en/latest/\n\nThe Chaos Toolkit projects require all contributors must sign a\n[Developer Certificate of Origin][dco] on each commit they would like to merge\ninto the master branch of the repository. Please, make sure you can abide by\nthe rules of the DCO before submitting a PR.\n\n[dco]: https://github.com/probot/dco#how-it-works\n\n### Develop\n\nIf you wish to develop on this project, make sure to install the development\ndependencies. But first, [create a virtual environment][venv] and then install\nthose dependencies.\n\n[venv]: http://chaostoolkit.org/reference/usage/install/#create-a-virtual-environment\n\n```console\n$ pip install -r requirements-dev.txt -r requirements.txt\n```\n\nThen, point your environment to this directory:\n\n```console\n$ python setup.py develop\n```\n\nNow, you can edit the files and they will be automatically be seen by your\nenvironment, even when running from the `chaos` command locally.\n\n### Test\n\nTo run the unit tests for the project execute the following:\n\n```\n$ pytest\n```\n\nTo run the integration tests for the project execute the following:\n\n```\n$ tox\n```\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://chaostoolkit.org", "keywords": "", "license": "Apache License Version 2.0", "maintainer": "", "maintainer_email": "", "name": "chaostoolkit-toxiproxy", "package_url": "https://pypi.org/project/chaostoolkit-toxiproxy/", "platform": "", "project_url": "https://pypi.org/project/chaostoolkit-toxiproxy/", "project_urls": { "Homepage": "http://chaostoolkit.org" }, "release_url": "https://pypi.org/project/chaostoolkit-toxiproxy/0.1.3/", "requires_dist": [ "chaostoolkit-lib (>=0.8.2)", "requests", "logzero", "wheel" ], "requires_python": ">=3.5.*", "summary": "Chaos Toolkit Extension for managing toxiproxy from an experiment", "version": "0.1.3" }, "last_serial": 4289259, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "789b06891885170bcb350d74cd0207d7", "sha256": "b5ca17bc1e9d049c3004feafa98578a5a5c517b9a72ce36c8c332d1fb5f819bc" }, "downloads": -1, "filename": "chaostoolkit_toxiproxy-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "789b06891885170bcb350d74cd0207d7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.*", "size": 8685, "upload_time": "2018-08-31T14:58:56", "url": "https://files.pythonhosted.org/packages/57/18/f4ecc780eaf42de74e3eb131b75a4b0c73cbbf0553d95276fbbff55ff86b/chaostoolkit_toxiproxy-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b18d9145da9cb8dbec1b1ed72728c392", "sha256": "75bcc47fb3d87cbe789c52697de02ed22ca1f1ea598d3ddcb21b758d16523d06" }, "downloads": -1, "filename": "chaostoolkit-toxiproxy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b18d9145da9cb8dbec1b1ed72728c392", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.*", "size": 10372, "upload_time": "2018-08-31T14:58:57", "url": "https://files.pythonhosted.org/packages/8a/ab/d4abd3e9aba1d86259768686cad7874121a5a81638195d05778cb36f0619/chaostoolkit-toxiproxy-0.1.0.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b41205b21f7d5ccd3b03dd31c20e89d6", "sha256": "6e3cb583d63cf8653d19a369db489ee8f9bb8d2193f14595314b4ac756cb05b8" }, "downloads": -1, "filename": "chaostoolkit_toxiproxy-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b41205b21f7d5ccd3b03dd31c20e89d6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.*", "size": 8689, "upload_time": "2018-09-19T15:59:38", "url": "https://files.pythonhosted.org/packages/c8/00/f1ed6dd3bdf377788fb2888516a394f0e930f3a29ba6aa00d019a5e72223/chaostoolkit_toxiproxy-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9cbfefb62a20abc117d0c313ae170564", "sha256": "9b1a25cc7e42d1356b7249b9568c855113fcd61bac438ae957d3c541686d9f40" }, "downloads": -1, "filename": "chaostoolkit-toxiproxy-0.1.2.tar.gz", "has_sig": false, "md5_digest": "9cbfefb62a20abc117d0c313ae170564", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.*", "size": 14985, "upload_time": "2018-09-19T15:59:39", "url": "https://files.pythonhosted.org/packages/03/4b/b2ae8aaba3574cbbbb8cbed2aa6189e91f71dd1b4bc804930d2c1b167f76/chaostoolkit-toxiproxy-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "c9779593f93923a1dcf9c7c65a28eaed", "sha256": "086bc0778421a5a592108b88fdd37f70187bc88e950e1ad26923f08651dc8f78" }, "downloads": -1, "filename": "chaostoolkit_toxiproxy-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "c9779593f93923a1dcf9c7c65a28eaed", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.*", "size": 8741, "upload_time": "2018-09-19T16:28:43", "url": "https://files.pythonhosted.org/packages/9e/b6/828b1771a79d12fd7c7af583ef6abe6abcc0aafad6b1169f771c302720d0/chaostoolkit_toxiproxy-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7b183f4d56409a77048cc124632942bc", "sha256": "ee6321c3fab479cc083550494f2d491216d725b88b8a7a4930176f489b4e2a91" }, "downloads": -1, "filename": "chaostoolkit-toxiproxy-0.1.3.tar.gz", "has_sig": false, "md5_digest": "7b183f4d56409a77048cc124632942bc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.*", "size": 15092, "upload_time": "2018-09-19T16:28:44", "url": "https://files.pythonhosted.org/packages/9d/64/75d4be8d291271bc3f67ed81bd2d13252700efa327a1116cf9c906df5f24/chaostoolkit-toxiproxy-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c9779593f93923a1dcf9c7c65a28eaed", "sha256": "086bc0778421a5a592108b88fdd37f70187bc88e950e1ad26923f08651dc8f78" }, "downloads": -1, "filename": "chaostoolkit_toxiproxy-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "c9779593f93923a1dcf9c7c65a28eaed", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.*", "size": 8741, "upload_time": "2018-09-19T16:28:43", "url": "https://files.pythonhosted.org/packages/9e/b6/828b1771a79d12fd7c7af583ef6abe6abcc0aafad6b1169f771c302720d0/chaostoolkit_toxiproxy-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7b183f4d56409a77048cc124632942bc", "sha256": "ee6321c3fab479cc083550494f2d491216d725b88b8a7a4930176f489b4e2a91" }, "downloads": -1, "filename": "chaostoolkit-toxiproxy-0.1.3.tar.gz", "has_sig": false, "md5_digest": "7b183f4d56409a77048cc124632942bc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.*", "size": 15092, "upload_time": "2018-09-19T16:28:44", "url": "https://files.pythonhosted.org/packages/9d/64/75d4be8d291271bc3f67ed81bd2d13252700efa327a1116cf9c906df5f24/chaostoolkit-toxiproxy-0.1.3.tar.gz" } ] }