github.com/pingcap/chaos@v0.0.0-20190710112158-c86faf4b3719/README.md (about) 1 # Chaos 2 3 Chaos is used to check the distributed system linearizability. 4 5 Chaos is inspired by [jepsen](https://github.com/jepsen-io/jepsen) and uses [porcupine](https://github.com/anishathalye/porcupine) as its linearizability checker. 6 7 ## Architecture 8 9 Chaos runs your registered database on 5 nodes, sends the command through `ssh` to control the service, like starting/stoping the service, or using a nemesis to disturb the whole cluster. 10 11 ``` 12 +-------------+ 13 +------- | controller | -------+ 14 | +-------------+ | 15 | | | | | 16 | +----+ | | | 17 v v | | v 18 +----+----+----+ | | +----+----+ 19 | n1 | n2 | n3 | <+ +> | n4 | n5 | 20 +----+----+----+ +----+----+ 21 ``` 22 23 ## Usage 24 25 In one shell, we start the 5 nodes and the controller. 26 27 ``` 28 cd docker 29 ./up.sh 30 ``` 31 32 In another shell, use `docker exec -it chaos-control bash` to enter the controller, then: 33 34 ``` 35 # build the node and your own chaos test 36 make 37 38 # run you own chaos like 39 ./bin/chaos-tidb 40 ``` 41 42 ## Scaffold 43 44 It is very easy to write your own chaos test. TODO...