Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to put different kind of stress on a zeebe node (broker or gateway). Stress types are CPU, IO and memory. The broker can be identified via nodeId or partitionId and role. For the gateway we choose the first one in the list as on all other commands. Should replace https://github.com/zeebe-io/zeebe-chaos/blob/main/chaos-workers/chaos-experiments/scripts/stress-cpu.sh close #238 ------- Example: **Stress Broker:** ```sh $ ./zbchaos stress broker --cpu --memory --verbose Connecting to zell-chaos Running experiment in self-managed environment. Successfully created port forwarding tunnel Found Broker zell-chaos-zeebe-0 as LEADER for partition 1. Put stress on zell-chaos-zeebe-0 Execute ["apt" "-qq" "update"] on pod zell-chaos-zeebe-0 7 packages can be upgraded. Run 'apt list --upgradable' to see them. Execute ["apt" "-qq" "install" "-y" "stress" "procps"] on pod zell-chaos-zeebe-0 procps is already the newest version (2:3.3.16-1ubuntu2.3). The following NEW packages will be installed: stress 0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded. Need to get 18.4 kB of archives. After this operation, 55.3 kB of additional disk space will be used. debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package stress. (Reading database ... 7621 files and directories currently installed.) Preparing to unpack .../stress_1.0.4-6_amd64.deb ... Unpacking stress (1.0.4-6) ... Setting up stress (1.0.4-6) ... Execute ["stress" "--timeout" "30" "--cpu" "256" "--vm" "4"] on pod zell-chaos-zeebe-0 stress: info: [405] dispatching hogs: 256 cpu, 0 io, 4 vm, 0 hdd stress: info: [405] successful run completed in 30s ``` **Stress Gateway:** ```sh $ ./zbchaos stress gateway --cpu --verbose Connecting to zell-chaos Running experiment in self-managed environment. Successfully created port forwarding tunnel Put stress on zell-chaos-zeebe-gateway-58dc88cb5b-jz4lg Execute ["apt" "-qq" "update"] on pod zell-chaos-zeebe-gateway-58dc88cb5b-jz4lg 7 packages can be upgraded. Run 'apt list --upgradable' to see them. Execute ["apt" "-qq" "install" "-y" "stress" "procps"] on pod zell-chaos-zeebe-gateway-58dc88cb5b-jz4lg procps is already the newest version (2:3.3.16-1ubuntu2.3). The following NEW packages will be installed: stress 0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded. Need to get 18.4 kB of archives. After this operation, 55.3 kB of additional disk space will be used. debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package stress. (Reading database ... 7621 files and directories currently installed.) Preparing to unpack .../stress_1.0.4-6_amd64.deb ... Unpacking stress (1.0.4-6) ... Setting up stress (1.0.4-6) ... Execute ["stress" "--timeout" "30" "--cpu" "256"] on pod zell-chaos-zeebe-gateway-58dc88cb5b-jz4lg stress: info: [307] dispatching hogs: 256 cpu, 0 io, 0 vm, 0 hdd stress: info: [307] successful run completed in 30s ``` **Without verbose flag:** ``` $ ./zbchaos stress gateway --cpu Put stress on zell-chaos-zeebe-gateway-58dc88cb5b-jz4lg ```
- Loading branch information