Skip to content

Commit 488e6d4

Browse files
author
Liu, Xiaopeng (133)
committed
update saltstack sample
Signed-off-by: Liu, Xiaopeng (133) <xiaopeng.liu@daimler.com>
1 parent b7fa6b9 commit 488e6d4

6 files changed

+176
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"title": "Sample Experiment Burn CPU",
3+
"description": "This experiment runs CPU intensive processes, simulating a noisy neighbor or a faulty CPU. The instance will effectively have a much slower CPU.",
4+
"configuration": {
5+
"environment": "any"
6+
},
7+
"method": [
8+
{
9+
"type": "action",
10+
"name": "burn_cpu",
11+
"provider": {
12+
"type": "python",
13+
"module": "chaossaltstack.machine.actions",
14+
"func": "burn_cpu",
15+
"arguments": {
16+
"execution_duration": "60",
17+
"instance_ids": [ "scdcr100237" ]
18+
},
19+
"secrets": ["saltstack"]
20+
}
21+
}
22+
],
23+
"secrets": {
24+
"saltstack": {
25+
"SALTMASTER_HOST": "http://<saltmaster_host>:<port>",
26+
"SALTMASTER_USER": "<user>",
27+
"SALTMASTER_PASSWORD": "<pass>"
28+
}
29+
}
30+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"title": "Sample Experiment kills proccess by process or PID",
3+
"description": "This experiment kills processes by process or PID",
4+
"configuration": {
5+
"environment": "any"
6+
},
7+
"method": [
8+
{
9+
"type": "action",
10+
"name": "kill_process",
11+
"provider": {
12+
"type": "python",
13+
"module": "chaossaltstack.machine.actions",
14+
"func": "kill_process",
15+
"arguments": {
16+
"execution_duration": "60",
17+
"process": "1024",
18+
"signal": "-9",
19+
"instance_ids": [ "scdcr100237" ]
20+
},
21+
"secrets": ["saltstack"]
22+
}
23+
}
24+
],
25+
"secrets": {
26+
"saltstack": {
27+
"SALTMASTER_HOST": "http://<saltmaster_host>:<port>",
28+
"SALTMASTER_USER": "<user>",
29+
"SALTMASTER_PASSWORD": "<pass>"
30+
}
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"title": "Sample Experiment kills proccess by name",
3+
"description": "This experiment kills processes by name",
4+
"configuration": {
5+
"environment": "any"
6+
},
7+
"method": [
8+
{
9+
"type": "action",
10+
"name": "killall_processes",
11+
"provider": {
12+
"type": "python",
13+
"module": "chaossaltstack.machine.actions",
14+
"func": "killall_processes",
15+
"arguments": {
16+
"execution_duration": "60",
17+
"process_name": "java",
18+
"signal": "-9",
19+
"instance_ids": [ "scdcr100237" ]
20+
},
21+
"secrets": ["saltstack"]
22+
}
23+
}
24+
],
25+
"secrets": {
26+
"saltstack": {
27+
"SALTMASTER_HOST": "http://<saltmaster_host>:<port>",
28+
"SALTMASTER_USER": "<user>",
29+
"SALTMASTER_PASSWORD": "<pass>"
30+
}
31+
}
32+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"title": "Sample Experiment network corruption",
3+
"description": "This experiment makes your network package corruption",
4+
"configuration": {
5+
"environment": "any"
6+
},
7+
"method": [
8+
{
9+
"type": "action",
10+
"name": "network_corruption",
11+
"provider": {
12+
"type": "python",
13+
"module": "chaossaltstack.machine.actions",
14+
"func": "network_corruption",
15+
"arguments": {
16+
"execution_duration": "60",
17+
"corruption_ratio": "5%",
18+
"device": "ens192",
19+
"instance_ids": [ "scdcr100237" ]
20+
}
21+
}
22+
}
23+
]
24+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"title": "Sample Experiment network latency",
3+
"description": "This experiment add latency to your network",
4+
"configuration": {
5+
"environment": "any"
6+
},
7+
"method": [
8+
{
9+
"type": "action",
10+
"name": "network_latency",
11+
"provider": {
12+
"type": "python",
13+
"module": "chaossaltstack.machine.actions",
14+
"func": "network_latency",
15+
"arguments": {
16+
"execution_duration": "60",
17+
"delay": "500ms",
18+
"variance": "50ms",
19+
"ratio": "5%",
20+
"device": "ens192",
21+
"instance_ids": [ "scdcr100237","scdcr100238" ]
22+
},
23+
"secrets": ["saltstack"]
24+
}
25+
}
26+
],
27+
"secrets": {
28+
"saltstack": {
29+
"SALTMASTER_HOST": "http://<saltmaster_host>:<port>",
30+
"SALTMASTER_USER": "<user>",
31+
"SALTMASTER_PASSWORD": "<pass>"
32+
}
33+
}
34+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"title": "Sample Experiment network loss",
3+
"description": "This experiment makes your network loss",
4+
"configuration": {
5+
"environment": "any"
6+
},
7+
"method": [
8+
{
9+
"type": "action",
10+
"name": "network_loss",
11+
"provider": {
12+
"type": "python",
13+
"module": "chaossaltstack.machine.actions",
14+
"func": "network_loss",
15+
"arguments": {
16+
"execution_duration": "60",
17+
"loss_ratio": "5%",
18+
"device": "ens192",
19+
"instance_ids": [ "scdcr100237" ]
20+
}
21+
}
22+
}
23+
]
24+
}

0 commit comments

Comments
 (0)