A Chaos Engineering toolkit.
Go to file
Yue Yang bc039aa483
fix: install gcc (#261)
2024-03-25 14:35:53 +08:00
.github/workflows fix: install gcc (#261) 2024-03-25 14:35:53 +08:00
cmd Revert "fix hostname params and add full-disable params (#226) (#227)" (#235) 2023-02-08 16:10:04 +08:00
docs chaosd: init process attack 2020-10-27 20:25:07 +08:00
hack Fix: gitVersion is invalid when executing `chaosd version` (#205) 2022-08-16 12:50:51 +08:00
images import chaos-mesh as pkg to implement network attack (#3) 2020-12-04 18:25:13 +08:00
pkg fix: device name always eth0 in iptable network attack partition (#252) 2024-03-13 10:07:09 +08:00
test Revert "fix hostname params and add full-disable params (#226) (#227)" (#235) 2023-02-08 16:10:04 +08:00
tools support file attack (#123) 2022-04-20 10:28:03 +08:00
.gitignore chore: divide http and https server (#113) 2021-12-16 13:32:35 +08:00
.gitpod.Dockerfile Gitpodifyed the repository (#64) 2021-05-21 09:54:11 +08:00
.gitpod.yml Gitpodifyed the repository (#64) 2021-05-21 09:54:11 +08:00
Dockerfile import chaos-mesh as pkg to implement network attack (#3) 2020-12-04 18:25:13 +08:00
LICENSE Initial commit 2020-10-10 15:09:04 +08:00
Makefile Download tproxy to tools directory (#225) 2023-01-06 12:15:37 +08:00
README.md Makefile: support build and download releated tools (#135) 2022-03-07 10:59:48 +08:00
ROADMAP.md update roadmap (#134) 2022-02-21 14:00:05 +08:00
go.mod Fix issue about disk attack cannot work well in chaos-mesh:physical machine chaos (#236) 2023-02-08 17:01:30 +08:00
go.sum Fix issue about disk attack cannot work well in chaos-mesh:physical machine chaos (#236) 2023-02-08 17:01:30 +08:00
revive.toml combine chaosd and chaos binary 2020-11-02 11:54:15 +08:00

README.md

chaosd

Gitpod ready-to-code

chaosd is an easy-to-use Chaos Engineering tool used to inject failures to a physical node.

Document

For details about the introduction and usage of chaosd, refer to the documentation.

Types of fault

You can use Chaosd to simulate the following fault types:

  • Process: Injects faults into the processes. Operations such as killing the process or stopping the process are supported.
  • Network: Injects faults into the network of physical machines. Operations such as increasing network latency, losing packets, and corrupting packets are supported.
  • Stress: Injects stress on the CPU or memory of the physical machines.
  • Disk: Injects faults into disks of the physical machines. Operations such as increasing disk load of reads and writes, and filling disks are supported.
  • Host: Injects faults into the physical machine. Operations such as shutdown the physical machine are supported.

For details about the introduction and usage of each fault type, refer to the related documentation.

Work modes

You can use Chaosd in the following modes:

  • Command-line mode: Run Chaosd directly as a command-line tool to inject and recover faults.

  • Service mode: Run Chaosd as a service in the background, to inject and recover faults by sending HTTP requests.

Prerequisites

Before deploying chaosd, make sure the following items have been installed:

  • tc
  • ipset
  • iptables
  • stress-ng (required when install chaosd by building from source code)
  • byteman(required when install chaosd by building from source code)

Install

You can either build directly from the source or download the binary to finish the installation.

  • Build from source code

    Build chaosd:

    make chaosd
    

    Build or download tools related to Chaosd:

    make chaos-tools
    

    Put Chaosd into PATH:

    mv ./bin /usr/local/chaosd
    export PATH=$PATH:/usr/local/chaosd
    
  • Download binary

    Download the latest unstable version by executing the command below:

    curl -fsSL -o chaosd-latest-linux-amd64.tar.gz https://mirrors.chaos-mesh.org/chaosd-latest-linux-amd64.tar.gz
    

    If you want to download the release version, you can replace the latest in the above command with the version number. For example, download v1.1.1 by executing the command below:

    curl -fsSL -o chaosd-v1.1.1-linux-amd64.tar.gz https://mirrors.chaos-mesh.org/chaosd-v1.1.1-linux-amd64.tar.gz
    

    Then uncompress the archived file

    tar zxvf chaosd-latest-linux-amd64.tar.gz
    

    Put Chaosd into PATH:

    mv ./chaosd-latest-linux-amd64 /usr/local/chaosd
    export PATH=$PATH:/usr/local/chaosd