mirror of
https://github.com/krkn-chaos/krkn.git
synced 2026-02-14 18:10:00 +00:00
Arcaflow upgrade to engine v0.17.1 (#639)
* krkn plugin refactoring to match new engine context path management Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> * cpu-hog new syntax Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> * memory-hog new syntax Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> removed s from duration Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> * io-hog new syntax Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> cpu-hog input Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> * path management refactoring agreed with arca team Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> refactoring Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> --------- Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com>
This commit is contained in:
committed by
GitHub
parent
86a7427606
commit
f364e9f283
@@ -36,9 +36,10 @@ def run_workflow(engine_args: arcaflow.EngineArgs, kubeconfig_path: str) -> int:
|
||||
|
||||
def build_args(input_file: str) -> arcaflow.EngineArgs:
|
||||
"""sets the kubeconfig parsed by setArcaKubeConfig as an input to the arcaflow workflow"""
|
||||
context = Path(input_file).parent
|
||||
workflow = "{}/workflow.yaml".format(context)
|
||||
config = "{}/config.yaml".format(context)
|
||||
current_path = Path().resolve()
|
||||
context = f"{current_path}/{Path(input_file).parent}"
|
||||
workflow = f"{context}/workflow.yaml"
|
||||
config = f"{context}/config.yaml"
|
||||
if not os.path.exists(context):
|
||||
raise Exception(
|
||||
"context folder for arcaflow workflow not found: {}".format(
|
||||
@@ -61,7 +62,8 @@ def build_args(input_file: str) -> arcaflow.EngineArgs:
|
||||
engine_args = arcaflow.EngineArgs()
|
||||
engine_args.context = context
|
||||
engine_args.config = config
|
||||
engine_args.input = input_file
|
||||
engine_args.workflow = workflow
|
||||
engine_args.input = f"{current_path}/{input_file}"
|
||||
return engine_args
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
aliyun-python-sdk-core==2.13.36
|
||||
aliyun-python-sdk-ecs==4.24.25
|
||||
arcaflow==0.9.0
|
||||
arcaflow==0.17.1
|
||||
arcaflow-plugin-sdk==0.10.0
|
||||
boto3==1.28.61
|
||||
azure-identity==1.15.0
|
||||
|
||||
@@ -2,7 +2,7 @@ input_list:
|
||||
- cpu_count: 1
|
||||
cpu_load_percentage: 80
|
||||
cpu_method: all
|
||||
duration: 1s
|
||||
duration: 30
|
||||
kubeconfig: ''
|
||||
namespace: default
|
||||
# set the node selector as a key-value pair eg.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
version: v0.2.0
|
||||
input:
|
||||
root: RootObject
|
||||
root: SubRootObject
|
||||
objects:
|
||||
RootObject:
|
||||
id: input_item
|
||||
SubRootObject:
|
||||
id: SubRootObject
|
||||
properties:
|
||||
kubeconfig:
|
||||
display:
|
||||
@@ -35,7 +35,7 @@ input:
|
||||
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
|
||||
type_id: integer
|
||||
required: true
|
||||
cpu_count:
|
||||
display:
|
||||
@@ -73,13 +73,13 @@ steps:
|
||||
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
|
||||
|
||||
timeout: !expr $.input.duration
|
||||
stressors:
|
||||
- stressor: cpu
|
||||
workers: !expr $.input.cpu_count
|
||||
cpu-method: "all"
|
||||
cpu-load: !expr $.input.cpu_load_percentage
|
||||
deploy:
|
||||
deployer_name: kubernetes
|
||||
connection: !expr $.steps.kubeconfig.outputs.success.connection
|
||||
|
||||
@@ -9,62 +9,10 @@ input:
|
||||
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
|
||||
id: SubRootObject
|
||||
type_id: ref
|
||||
namespace: $.steps.workload_loop.execute.inputs.items
|
||||
|
||||
steps:
|
||||
workload_loop:
|
||||
kind: foreach
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
input_list:
|
||||
- duration: 30s
|
||||
- duration: 30
|
||||
io_block_size: 1m
|
||||
io_workers: 1
|
||||
io_write_bytes: 10m
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
version: v0.2.0
|
||||
input:
|
||||
root: RootObject
|
||||
root: SubRootObject
|
||||
objects:
|
||||
hostPath:
|
||||
id: HostPathVolumeSource
|
||||
@@ -18,8 +18,8 @@ input:
|
||||
type:
|
||||
id: hostPath
|
||||
type_id: ref
|
||||
RootObject:
|
||||
id: input_item
|
||||
SubRootObject:
|
||||
id: SubRootObject
|
||||
properties:
|
||||
kubeconfig:
|
||||
display:
|
||||
@@ -51,7 +51,7 @@ input:
|
||||
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
|
||||
type_id: integer
|
||||
required: true
|
||||
io_workers:
|
||||
display:
|
||||
@@ -107,14 +107,13 @@ steps:
|
||||
step: workload
|
||||
input:
|
||||
cleanup: "true"
|
||||
StressNGParams:
|
||||
timeout: !expr $.input.duration
|
||||
workdir: !expr $.input.target_pod_folder
|
||||
stressors:
|
||||
- stressor: hdd
|
||||
workers: !expr $.input.io_workers
|
||||
hdd_bytes: !expr $.input.io_write_bytes
|
||||
hdd_write_size: !expr $.input.io_block_size
|
||||
timeout: !expr $.input.duration
|
||||
workdir: !expr $.input.target_pod_folder
|
||||
stressors:
|
||||
- stressor: hdd
|
||||
workers: !expr $.input.io_workers
|
||||
hdd-bytes: !expr $.input.io_write_bytes
|
||||
hdd-write-size: !expr $.input.io_block_size
|
||||
|
||||
deploy:
|
||||
deployer_name: kubernetes
|
||||
|
||||
@@ -2,22 +2,6 @@ version: v0.2.0
|
||||
input:
|
||||
root: RootObject
|
||||
objects:
|
||||
hostPath:
|
||||
id: HostPathVolumeSource
|
||||
properties:
|
||||
path:
|
||||
type:
|
||||
type_id: string
|
||||
Volume:
|
||||
id: Volume
|
||||
properties:
|
||||
name:
|
||||
type:
|
||||
type_id: string
|
||||
hostPath:
|
||||
type:
|
||||
id: hostPath
|
||||
type_id: ref
|
||||
RootObject:
|
||||
id: RootObject
|
||||
properties:
|
||||
@@ -25,80 +9,9 @@ input:
|
||||
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
|
||||
io_workers:
|
||||
display:
|
||||
description: number of workers
|
||||
name: start N workers continually writing, reading and removing temporary files
|
||||
type:
|
||||
type_id: integer
|
||||
required: true
|
||||
io_block_size:
|
||||
display:
|
||||
description: single write size
|
||||
name: specify size of each write in bytes. Size can be from 1 byte to 4MB.
|
||||
type:
|
||||
type_id: string
|
||||
required: true
|
||||
io_write_bytes:
|
||||
display:
|
||||
description: Total number of bytes written
|
||||
name: write N bytes for each hdd process, the default is 1 GB. One can specify the size
|
||||
as % of free space on the file system or in units of Bytes, KBytes, MBytes and
|
||||
GBytes using the suffix b, k, m or g
|
||||
type:
|
||||
type_id: string
|
||||
required: true
|
||||
target_pod_folder:
|
||||
display:
|
||||
description: Target Folder
|
||||
name: Folder in the pod where the test will be executed and the test files will be written
|
||||
type:
|
||||
type_id: string
|
||||
required: true
|
||||
target_pod_volume:
|
||||
display:
|
||||
name: kubernetes volume definition
|
||||
description: the volume that will be attached to the pod. In order to stress
|
||||
the node storage only hosPath mode is currently supported
|
||||
type:
|
||||
type_id: ref
|
||||
id: Volume
|
||||
required: true
|
||||
id: SubRootObject
|
||||
type_id: ref
|
||||
namespace: $.steps.workload_loop.execute.inputs.items
|
||||
steps:
|
||||
workload_loop:
|
||||
kind: foreach
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
input_list:
|
||||
- duration: 30s
|
||||
- duration: 30
|
||||
vm_bytes: 10%
|
||||
vm_workers: 2
|
||||
# set the node selector as a key-value pair eg.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
version: v0.2.0
|
||||
input:
|
||||
root: RootObject
|
||||
root: SubRootObject
|
||||
objects:
|
||||
RootObject:
|
||||
id: input_item
|
||||
SubRootObject:
|
||||
id: SubRootObject
|
||||
properties:
|
||||
kubeconfig:
|
||||
display:
|
||||
@@ -34,7 +34,7 @@ input:
|
||||
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
|
||||
type_id: integer
|
||||
required: true
|
||||
vm_workers:
|
||||
display:
|
||||
@@ -65,12 +65,11 @@ steps:
|
||||
step: workload
|
||||
input:
|
||||
cleanup: "true"
|
||||
StressNGParams:
|
||||
timeout: !expr $.input.duration
|
||||
stressors:
|
||||
- stressor: vm
|
||||
workers: !expr $.input.vm_workers
|
||||
vm_bytes: !expr $.input.vm_bytes
|
||||
timeout: !expr $.input.duration
|
||||
stressors:
|
||||
- stressor: vm
|
||||
workers: !expr $.input.vm_workers
|
||||
vm-bytes: !expr $.input.vm_bytes
|
||||
deploy:
|
||||
deployer_name: kubernetes
|
||||
connection: !expr $.steps.kubeconfig.outputs.success.connection
|
||||
|
||||
@@ -9,54 +9,10 @@ input:
|
||||
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
|
||||
vm_workers:
|
||||
display:
|
||||
description: Number of VM stressors to be run (0 means 1 stressor per CPU)
|
||||
name: Number of VM stressors
|
||||
type:
|
||||
type_id: integer
|
||||
required: true
|
||||
vm_bytes:
|
||||
display:
|
||||
description: N bytes per vm process, the default is 256MB. The size can be expressed in units of Bytes, KBytes, MBytes and GBytes using the suffix b, k, m or g.
|
||||
name: Kubeconfig file contents
|
||||
type:
|
||||
type_id: string
|
||||
required: true
|
||||
id: SubRootObject
|
||||
type_id: ref
|
||||
namespace: $.steps.workload_loop.execute.inputs.items
|
||||
|
||||
steps:
|
||||
workload_loop:
|
||||
kind: foreach
|
||||
|
||||
Reference in New Issue
Block a user