go-chaos has different parameters to control the chaos experiments executed in the infrastructure.
The same parameters can be passed to scripts as part.
job "script" "python3:script.py" {
region = "us-west-2"
namespace = "default"
project = "project1
config {
tag = "myapp"
chaos = "terminate"
count = 3
}
}
In this example a python3
script called script.py
will be executed by go-chaos, the parameters are available as environment variablers in the session. The executable python3
needs to be available in system $PATH
.
{
"REGION" : region,
"PROJECT" : project,
"NAMESPACE" : namespace,
"TAG" : tag,
"CHAOS" : chaos,
"NUMBER": number
}