GithubHelp home page GithubHelp logo

clslaid / chaosd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chaos-mesh/chaosd

0.0 0.0 0.0 428 KB

A Chaos Engineering toolkit.

License: Apache License 2.0

Makefile 2.18% Go 86.02% Shell 4.98% C 0.59% Dockerfile 1.13% Python 5.09%

chaosd's Introduction

chaosd

Chaosd is an easy-to-use Chaos Engineering tool. This tool is used to inject failures to the physic node, such as kill process, network failure, CPU burn, memory burn and etc.

Prerequisites

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

Install

Build from source code

make chaosd
chmod +x chaosd && mv chaosd /usr/local/bin/chaosd

Download binary

curl -fsSL -o chaosd https://mirrors.chaos-mesh.org/latest/chaosd
chmod +x chaosd && mv chaosd /usr/local/bin/chaosd

Usage

Process attack

  • kill process
$ chaosd attack process kill -p [pid] # set pid or pod name
# remember the generated uid, we need this uid to recover chaos attack
Attack network successfully, uid: 2c865e6f-299f-4adf-ab37-94dc4fb8fea6
  • stop process
$ chaosd attack process stop -p [pid] # set pid or pod name

Network attack

  • delay network packet
$ chaosd attack network delay -d eth0 -i 172.16.4.4 -l 10ms
  • loss network packet
$ chaosd attack network loss -d eth0 -i 172.16.4.4 --percent 50%
  • corrupt network packet
$ chaosd attack network corrupt -d eth0 -i 172.16.4.4 --percent 50%
  • duplicate network packet
$ chaosd attack network duplicate -d eth0 -i 172.16.4.4 --percent 50%

Stress attack

  • CPU stress
$ chaosd attack stress cpu -l 100 -w 2
  • Memory stress
$ chaosd attack stress mem -w 2 # stress 2 CPU and each cpu loads 100%

Recover attack

$ chaosd recover 2c865e6f-299f-4adf-ab37-94dc4fb8fea6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.