forked from krkn-chaos/krkn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tullio Sebastiani <[email protected]>
- Loading branch information
1 parent
ac47e21
commit 8d01f97
Showing
7 changed files
with
221 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
deployers: | ||
image: | ||
connection: {} | ||
deployer_name: kubernetes | ||
log: | ||
level: debug | ||
logged_outputs: | ||
error: | ||
level: error | ||
success: | ||
level: debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
input_list: | ||
- cpu_count: 1 | ||
cpu_load_percentage: 80 | ||
cpu_method: all | ||
duration: 1s | ||
kubeconfig: '' | ||
namespace: default | ||
node_selector: | ||
kubernetes.io/hostname: kind-worker2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
version: v0.2.0 | ||
input: | ||
root: RootObject | ||
objects: | ||
RootObject: | ||
id: input_item | ||
properties: | ||
kubeconfig: | ||
display: | ||
description: The complete kubeconfig file as a string | ||
name: Kubeconfig file contents | ||
type: | ||
type_id: string | ||
required: true | ||
namespace: | ||
display: | ||
description: The namespace where the container will be deployed | ||
name: Namespace | ||
type: | ||
type_id: string | ||
required: true | ||
node_selector: | ||
display: | ||
description: kubernetes node name where the plugin must be deployed | ||
type: | ||
type_id: map | ||
values: | ||
type_id: string | ||
keys: | ||
type_id: string | ||
required: true | ||
duration: | ||
display: | ||
name: duration the scenario expressed in seconds | ||
description: stop stress test after T seconds. One can also specify the units of time in | ||
seconds, minutes, hours, days or years with the suffix s, m, h, d or y | ||
type: | ||
type_id: string | ||
required: true | ||
cpu_count: | ||
display: | ||
description: Number of CPU cores to be used (0 means all) | ||
name: number of CPUs | ||
type: | ||
type_id: integer | ||
required: true | ||
cpu_method: | ||
display: | ||
description: CPU stress method | ||
name: fine grained control of which cpu stressors to use (ackermann, cfloat etc.) | ||
type: | ||
type_id: string | ||
required: true | ||
cpu_load_percentage: | ||
display: | ||
description: load CPU by percentage | ||
name: CPU load | ||
type: | ||
type_id: integer | ||
required: true | ||
|
||
steps: | ||
kubeconfig: | ||
plugin: | ||
src: quay.io/arcalot/arcaflow-plugin-kubeconfig:0.2.0 | ||
deployment_type: image | ||
input: | ||
kubeconfig: !expr $.input.kubeconfig | ||
stressng: | ||
plugin: | ||
src: quay.io/arcalot/arcaflow-plugin-stressng:0.5.0 | ||
deployment_type: image | ||
step: workload | ||
input: | ||
cleanup: "true" | ||
StressNGParams: | ||
timeout: !expr $.input.duration | ||
stressors: | ||
- stressor: cpu | ||
cpu_count: !expr $.input.cpu_count | ||
cpu_method: !expr $.input.cpu_method | ||
cpu_load: !expr $.input.cpu_load_percentage | ||
deploy: | ||
deployer_name: kubernetes | ||
connection: !expr $.steps.kubeconfig.outputs.success.connection | ||
pod: | ||
metadata: | ||
namespace: !expr $.input.namespace | ||
labels: | ||
arcaflow: stressng | ||
spec: | ||
nodeSelector: !expr $.input.node_selector | ||
pluginContainer: | ||
imagePullPolicy: Always | ||
outputs: | ||
success: | ||
stressng: !expr $.steps.stressng.outputs.success | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
version: v0.2.0 | ||
input: | ||
root: RootObject | ||
objects: | ||
RootObject: | ||
id: RootObject | ||
properties: | ||
input_list: | ||
type: | ||
type_id: list | ||
items: | ||
id: input_item | ||
type_id: object | ||
properties: | ||
kubeconfig: | ||
display: | ||
description: The complete kubeconfig file as a string | ||
name: Kubeconfig file contents | ||
type: | ||
type_id: string | ||
required: true | ||
namespace: | ||
display: | ||
description: The namespace where the container will be deployed | ||
name: Namespace | ||
type: | ||
type_id: string | ||
required: true | ||
node_selector: | ||
display: | ||
description: kubernetes node name where the plugin must be deployed | ||
type: | ||
type_id: map | ||
values: | ||
type_id: string | ||
keys: | ||
type_id: string | ||
required: true | ||
duration: | ||
display: | ||
name: duration the scenario expressed in seconds | ||
description: stop stress test after T seconds. One can also specify the units of time in | ||
seconds, minutes, hours, days or years with the suffix s, m, h, d or y | ||
type: | ||
type_id: string | ||
required: true | ||
cpu_count: | ||
display: | ||
description: Number of CPU cores to be used (0 means all) | ||
name: number of CPUs | ||
type: | ||
type_id: integer | ||
required: true | ||
cpu_method: | ||
display: | ||
description: CPU stress method | ||
name: fine grained control of which cpu stressors to use (ackermann, cfloat etc.) | ||
type: | ||
type_id: string | ||
required: true | ||
cpu_load_percentage: | ||
display: | ||
description: load CPU by percentage | ||
name: CPU load | ||
type: | ||
type_id: integer | ||
required: true | ||
steps: | ||
workload_loop: | ||
kind: foreach | ||
items: !expr $.input.input_list | ||
workflow: sub-workflow.yaml | ||
parallelism: 1000 | ||
outputs: | ||
success: | ||
workloads: !expr $.steps.workload_loop.outputs.success.data | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
test_net_chaos | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
set -xeEo pipefail | ||
|
||
source CI/tests/common.sh | ||
|
||
trap error ERR | ||
trap finish EXIT | ||
|
||
|
||
function functional_test_arca_cpu_hog { | ||
export scenario_type="arcaflow_scenarios" | ||
export scenario_file="CI/scenarios/arcaflow/cpu-hog/input.yaml" | ||
export post_config="" | ||
envsubst < CI/config/common_test_config.yaml > CI/config/arca_cpu_hog.yaml | ||
python3 -m coverage run -a run_kraken.py -c CI/config/arca_cpu_hog.yaml | ||
echo "Arcaflow CPU Hog: Success" | ||
} | ||
|
||
functional_test_arca_cpu_hog |