Skip to content

Commit 56787cc

Browse files
authored
update and verify chaos mesh simulator docs (#2209)
1 parent b5b830a commit 56787cc

File tree

3 files changed

+46
-332
lines changed

3 files changed

+46
-332
lines changed

book/src/framework/chaos/chaos.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,32 @@ We also offer a set of blockchain-specific experiments, which typically involve
5858

5959
Check [gas](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/framework/examples/myproject/chaos/chaos_blockchain_evm_gas_test.go) and [reorg](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/framework/examples/myproject/chaos/chaos_blockchain_evm_reorg_test.go) examples, the same example work for [K8s](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/framework/examples/myproject/chaos/chaos_k8s_test.go).
6060

61-
## Debugging
61+
## Debugging and Developing Chaos Suites
6262

63-
To debug `Docker` applications you can just use `CTFv2` deployments.
63+
To debug `Docker` applications you can just use `CTFv2` deployments and Docker logs.
6464

6565
To debug `K8s` please use our [simulator](../chaos/debug-k8s.md).
66+
67+
The simplest way to start is to spin up the simulator and run `K8s` tests:
68+
```
69+
cd infra/chaosmesh-playground
70+
devbox run up
71+
k9s
72+
```
73+
Then go to `default` namespace and check which example pods we have, run the tests
74+
```
75+
cd framework/examples/myproject/chaos
76+
CTF_CONFIGS=chaos_k8s.toml go test -v -run TestK8sChaos
77+
```
78+
Reorg and gas tests will fail and that's fine, you should run them on a real `Geth` deployment.
79+
80+
Grafana's annotations required `GRAFANA_URL` environment variable to be set
81+
```
82+
export GRAFANA_URL=...
83+
export GRAFANA_TOKEN=...
84+
```
85+
If you want CRDs to stay use `remove_k8s_chaos` flag in `chaos-k8s.toml`
86+
```
87+
remove_k8s_chaos = false
88+
```
89+
Then search for `:podchaos` and `:networkchaos` in `k9s` to inspect the CRDs
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[chaos]
2-
wait_before_start = "10s"
3-
namespace = "default"
4-
dashboard_uuids = ["WaspDebug"]
5-
experiment_duration = "20s"
6-
experiment_injection_duration = "10s"
7-
remove_k8s_chaos = true
8-
9-
blockchain_http_urls = ["http://localhost:8545", "http://localhost:8550"]
10-
reorg_below_finality_threshold = 5
11-
reorg_above_finality_threshold = 10
12-
block_every = "1s"
2+
wait_before_start = "10s"
3+
namespace = "default"
4+
dashboard_uuids = ["WaspDebug"]
5+
experiment_duration = "20s"
6+
experiment_injection_duration = "10s"
7+
remove_k8s_chaos = false
8+
9+
blockchain_http_urls = ["http://localhost:8545", "http://localhost:8550"]
10+
reorg_below_finality_threshold = 5
11+
reorg_above_finality_threshold = 10
12+
block_every = "1s"

0 commit comments

Comments
 (0)