chaosblade-io / chaosblade
- пятница, 29 марта 2019 г. в 00:18:18
Go
An easy to use and powerful chaos engineering experiment toolkit.(一款简单易用、功能强大的混沌实验注入工具)
Chaosblade is an experimental tool that follows the principles of Chaos Engineering and is used to simulate common fault scenarios, helping to improve the recoverability of faulty systems and the fault tolerance of faults.
Chaosblade is Alibaba's internal MonkeyKing open source project. It is based on Alibaba's nearly ten years of fault testing and practice, combining the best ideas and practices of the Group's businesses.
Chaosblade can be compiled and run directly, and the cli command prompt makes it easier to perform chaos engineering experiments. Currently supported experimental areas include os, java, docker and kubernetes, for example, filling disk, killing process, network delay, Dubbo, MySQL, Servlet and custom class methods of Java application class delay or exception, kill container, kill Pod and so on. You can execute blade create -h command to view
Chaosblade's cli tool is a blade that can be used directly after downloading or compiling. The list of blade commands is as follows:
blade p jvm --process business on the target host. If the attach is successful, return the uid for status query or agent revoke.blade revoke UIDblade create [TARGET] [ACTION] [FLAGS]. For example, if you implement a Dubbo consumer call xxx.xxx.Service interface delay 3s, the command executed is blade create dubbo delay --consumer --time 3000 -- Service xxx.xxx.Service, if the injection is successful, return the experimental uid for status query and destroy the experiment.blade destroy UIDblade status UID or blade status --type createUse the blade help [COMMAND] command to view help
Download the chaosblade demo image and experience the use of the blade toolkit
Download image command:
docker pull registry.cn-hangzhou.aliyuncs.com/chaosblade/chaosblade-demo:latestRun the demo container:
docker run -it registry.cn-hangzhou.aliyuncs.com/chaosblade/chaosblade-demo:latestAfter entering the container, you can read the README.txt file to implement the chaos experiment, Enjoy it.
Install Golang first, then download the project to GOPATH:
go get github.com/chaosblade-io/chaosbladeThis project was downloaded to the GOPATH/src/github.com/chaosblade-io/chaosblade directory. You can execute go env command to view the GOPATH value.
Go to the the project root directory(GOPATH/src/github.com/chaosblade-io/chaosblade) and execute compile:
makeIf you compile the linux package on the mac operating system, you can do:
make build_linuxIf you compile the chaosblade image, you can do:
make build_imageCompilation process:
clean compilation:
make cleanChaosblade is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.