Spring Chaos的Chaos工具箱驱动程序。
chaostoolkit-spring的Python项目详细描述
#Spring Chaos的Chaos工具箱驱动程序。
[![Python版本](https://img.shields.io/pypi/pyversions/chaostolkit spring.svg)(https://www.python.org/)[![构建状态](https://travis-ci.org/chaostolkit-incubator/chaostolkit-spring.svg?branch=master)(https://travis ci.org/chaos toolkit孵化器/chaostoolkit spring)
该项目是[actions][]和[probe][]的集合,作为[chaos toolkit]的
扩展集。
[actions]:http://chaostoolkit.org/reference/api/experiment/action
[探测]:http://chaostoolkit.org/reference/api/experiment/探测
[chaostoolkit]:http://chaostoolkit.org
t][]已经存在了。
```
$pip install-u chaostoolkit spring
```
haos monkey spring boot/2.0.0-snapshot/)发布了[chaos monkey for spring boot](https://github.com/codecentric/chaos monkey spring boot)。此快照包括必要的Spring Boot执行器HTTP端点,以便Chaos工具包在运行时与Chaos功能交互。
在[为Spring Boot添加Chaos Monkey之后](https://codecentric.github.io/Chaos Monkey Spring Boot/2.0.0-snapshot/《入门》并且[启用了Spring Boot执行器http端点](https://codecentric.github.io/chaos monkey spring boot/2.0.0-snapshot/endpoints),然后您可以使用此驱动程序中的探测和操作。
若要使用此包中的探测和操作,请将以下内容添加到您的
实验文件中:
``` json
{
"name":"enable庠chaosmonkey",
"provider":{
"arguments":{
"base庠url":"http://localhost:8080/actuator"
},
"func":"enable庠chaosmonkey",
"module":"chaosspring.actions",
"type":"python"
},
"type":"action"
}
```
这将与指定的服务交互并启用混沌猴功能。如果您愿意,也可以通过指定以下操作来关闭混沌猴:
``json
{
"name":"disable\u chaos monkey",
"provider":{
"arguments":{
"base\u url":"http://localhost:8080/actuator"
},
"func":"disa"bl戡chaos monkey",
"module":"chaos spring.actions",
"type":"python"
},
"type":"action"
}
`````
然后,您就可以操纵[混沌猴攻击](https://codecentric.github.io/chaos monkey spring boot/2.0.0-snapshot/\通过指定以下操作提供服务:
``json
{
"name":"configure_assaults",
"provider":{
"arguments":{
"base_url":"http://localhost:8080/actuator",
"assaults_configuration":{
"level":5,
"latencyrangestart":2000,
"latencyrangeend":5000,
"latencyactive":false,
"exceptionactive":false,
"killapplicationactive":true,
"restartapplicationactive":false
}
},
"func":"更改攻击配置",
"module":"chaosspring.action s",
"type":"python"
},
"type":"action"
}
````
就这样!
请浏览代码以使用进一步的探测和操作。
请,分叉这个项目,让您的更改跟随使用
通常的[pep 8][pep8]代码样式,撒上测试并提交pr以供
审阅。
[pep8]:https://pycodestyle.readthedocs.io/en/latest/
chaos工具包项目要求所有参与者在每次提交时都必须签署
[开发者原产地证书][dco]uld希望将
合并到存储库的主分支中。请确保您在提交PR之前可以遵守DCO的规则。
[DCO]:https://github.com/probot/dco它的工作原理
\development
但是首先,[创建一个虚拟环境][venv]然后安装
这些依赖项。
[venv]:http://chaostolkit.org/reference/usage/install/create-a-virtual-environment
``控制台
$pip install-r requirements-dev.txt-r requirements.txt
```
此目录的环境:
``console
$python setup.py develop
```
ect执行以下操作:
````
$pytest
```
[![Python版本](https://img.shields.io/pypi/pyversions/chaostolkit spring.svg)(https://www.python.org/)[![构建状态](https://travis-ci.org/chaostolkit-incubator/chaostolkit-spring.svg?branch=master)(https://travis ci.org/chaos toolkit孵化器/chaostoolkit spring)
该项目是[actions][]和[probe][]的集合,作为[chaos toolkit]的
扩展集。
[actions]:http://chaostoolkit.org/reference/api/experiment/action
[探测]:http://chaostoolkit.org/reference/api/experiment/探测
[chaostoolkit]:http://chaostoolkit.org
t][]已经存在了。
```
$pip install-u chaostoolkit spring
```
haos monkey spring boot/2.0.0-snapshot/)发布了[chaos monkey for spring boot](https://github.com/codecentric/chaos monkey spring boot)。此快照包括必要的Spring Boot执行器HTTP端点,以便Chaos工具包在运行时与Chaos功能交互。
在[为Spring Boot添加Chaos Monkey之后](https://codecentric.github.io/Chaos Monkey Spring Boot/2.0.0-snapshot/《入门》并且[启用了Spring Boot执行器http端点](https://codecentric.github.io/chaos monkey spring boot/2.0.0-snapshot/endpoints),然后您可以使用此驱动程序中的探测和操作。
若要使用此包中的探测和操作,请将以下内容添加到您的
实验文件中:
``` json
{
"name":"enable庠chaosmonkey",
"provider":{
"arguments":{
"base庠url":"http://localhost:8080/actuator"
},
"func":"enable庠chaosmonkey",
"module":"chaosspring.actions",
"type":"python"
},
"type":"action"
}
```
这将与指定的服务交互并启用混沌猴功能。如果您愿意,也可以通过指定以下操作来关闭混沌猴:
``json
{
"name":"disable\u chaos monkey",
"provider":{
"arguments":{
"base\u url":"http://localhost:8080/actuator"
},
"func":"disa"bl戡chaos monkey",
"module":"chaos spring.actions",
"type":"python"
},
"type":"action"
}
`````
然后,您就可以操纵[混沌猴攻击](https://codecentric.github.io/chaos monkey spring boot/2.0.0-snapshot/\通过指定以下操作提供服务:
``json
{
"name":"configure_assaults",
"provider":{
"arguments":{
"base_url":"http://localhost:8080/actuator",
"assaults_configuration":{
"level":5,
"latencyrangestart":2000,
"latencyrangeend":5000,
"latencyactive":false,
"exceptionactive":false,
"killapplicationactive":true,
"restartapplicationactive":false
}
},
"func":"更改攻击配置",
"module":"chaosspring.action s",
"type":"python"
},
"type":"action"
}
````
就这样!
请浏览代码以使用进一步的探测和操作。
请,分叉这个项目,让您的更改跟随使用
通常的[pep 8][pep8]代码样式,撒上测试并提交pr以供
审阅。
[pep8]:https://pycodestyle.readthedocs.io/en/latest/
chaos工具包项目要求所有参与者在每次提交时都必须签署
[开发者原产地证书][dco]uld希望将
合并到存储库的主分支中。请确保您在提交PR之前可以遵守DCO的规则。
[DCO]:https://github.com/probot/dco它的工作原理
\development
但是首先,[创建一个虚拟环境][venv]然后安装
这些依赖项。
[venv]:http://chaostolkit.org/reference/usage/install/create-a-virtual-environment
``控制台
$pip install-r requirements-dev.txt-r requirements.txt
```
此目录的环境:
``console
$python setup.py develop
```
ect执行以下操作:
````
$pytest
```