A tool for simulating destructive behavior of production infrastructure
WIP mode. Yet works for a few months in our company (doesn't mean it's stable).
Using cargo:
cargo run config.yml
Using distributive:
paws config.yml
Plugins are stored in ~/.kittypaws/plugins/
each in a folder named after plugin.
Inside the folder there should be main.py
with the run
function:
def run(config: Dict[str, str]) -> None:
pass
Inside the folder there should be run.sh
:
config_field1=${config_field1:-default_value}
echo config_field1
Kittypaws will load it if plugin name is in the config and run with specified frequency.
Drops connection to a certain IP address
https://github.com/subatiq/kittypaws-dropper
Simply restarts target container
https://github.com/subatiq/kittypaws-deathloop
Breaks time sync on the host
https://github.com/subatiq/kittypaws-timeburglar
plugins:
- plugin01:
config01: yes
config02: 42
...
- plugin01:
config03: yes
config02: 44
...
Plugins can start executing their tasks immediately, or after some time. You can configure them to wait for their interval first or wait for a specific delay and then continue to work normally.
Config example:
- <plugin_name>:
...
startup: hot
Intervals configuration is described below.
Config example:
- <plugin_name>:
...
startup: cold # works by default
frequency: random
max_interval: PT1M
min_interval: PT30S
Here first plugin run will be executed after random interval.
Config example:
- <plugin_name>:
...
startup: PT5S
frequency: random
max_interval: PT1M
min_interval: PT30S
With this config plugin will start after waiting 5 seconds, then it will only wait for random intervals between runs.
Time durations in config comply with ISO 8601. Plugins can run in different intervals or once. To let kitty know how often you want them to run add this to plugin config:
Config example:
- <plugin_name>:
...
frequency: random
max_interval: PT1M
min_interval: PT30S
Config example:
- <plugin_name>:
...
frequency: fixed
interval: PT1M
Used as default
Config example:
- <plugin_name>:
...
frequency: once # or do not put it in config at all, it's default
Go get these bugs, Tiger!