ChaosBlade is an Alibaba open source experimental injection tool that follows the principles of chaos engineering and chaos experimental models to help enterprises improve the fault tolerance of distributed systems and ensure business continuity during the process of enterprises going to cloud or moving to cloud native systems.
Chaosblade is an internal open source project of MonkeyKing. It is based on Alibaba's nearly ten years of failure testing and drill practice, and combines the best ideas and practices of the Group's businesses.
ChaosBlade is not only easy to use, but also supports rich experimental scenarios. The scenarios include:
Encapsulating scenes by domain into individual projects can not only standardize the scenes in the domain, but also facilitate the horizontal and vertical expansion of the scenes. By following the chaos experimental model, the chaosblade cli can be called uniformly. The items currently included are:
You can download the latest chaosblade toolkit from Releases and extract it and use it. If you want to inject Kubernetes related fault scenarios, you need to install chaosblade-operator. For detailed Chinese usage documents, please see chaosblade-help-zh-cn .
chaosblade supports CLI and HTTP invocation methods. The supported commands are as follows:
blade p jvm --process businesson the target host. If the attach is successful, return the uid for status query or agent revoke.
blade revoke UID
blade 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 UID
blade status UIDor
blade status --type create
blade server start -p 9526to perform a CPU full load experiment:
blade help [COMMAND] or
blade [COMMAND] -h command to view help
Download the chaosblade demo image and experience the use of the blade toolkit
Download image command：
docker pull chaosbladeio/chaosblade-demo
Run the demo container：
docker run -it --privileged chaosbladeio/chaosblade-demo
After entering the container, you can read the README.txt file to implement the chaos experiment, Enjoy it.
chaosblade-operator The project is a chaos experiment injection tool for cloud-native platforms. It follows the chaos experiment model to standardize the experimental scenario and defines the experiment as Kubernetes CRD Resources, mapping experimental models to Kubernetes resource attributes, and very friendly combination of chaotic experimental models with Kubernetes declarative design. While relying on chaotic experimental models to conveniently develop scenarios, it can also well integrate Kubernetes design concepts, through kubectl or Write code to directly call the Kubernetes API to create, update, and delete chaotic experiments, and the resource status can clearly indicate the execution status of the experiment, and standardize Kubernetes fault injection. In addition to using the above methods to perform experiments, you can also use the chaosblade cli method to execute kubernetes experimental scenarios and query the experimental status very conveniently. For details, please read the chinese document: Chaos Engineering Practice under Cloud Native
This project is written in golang, so you need to install the latest golang version first. The minimum supported version is 1.11. After the Clone project, enter the project directory and execute the following command to compile:
If on a mac system, compile the current system version, execute:
If you want to compile linux system version on mac system, execute:
You can also compile selectively, for example, you only need to compile cli and os scenes, then execute:
make build_with cli os # If it is a mac system, run make build_with cli os_darwin # If you want to compile linux system version selectively, execute: ARGS="cli os" make build_with_linux
For bug report, questions and discussions please submit GitHub Issues.
You can also contact us via:
We welcome every contribution, even if it is just punctuation. See details of CONTRIBUTING
The original intention of our open source project is to lower the threshold for chaos engineering to be implemented in enterprises, so we highly value the use of the project in enterprises. Welcome everyone here ISSUE. After registration, you will be invited to join the corporate mail group to discuss the problems encountered by Chaos Engineering in the landing of the company and share the landing experience.
This project exists thanks to all the people who contribute. [Contribute].
Chaosblade is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.