Skip to content

Commit

Permalink
updating scenarios to have deployers (krkn-chaos#537)
Browse files Browse the repository at this point in the history
Signed-off-by: Tullio Sebastiani <[email protected]>
  • Loading branch information
paigerube14 authored Jan 10, 2024
1 parent c200f07 commit 462f93a
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 33 deletions.
6 changes: 3 additions & 3 deletions kraken/arcaflow_plugin/arcaflow_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ def set_arca_kubeconfig(engine_args: arcaflow.EngineArgs, kubeconfig_path: str):

with open(engine_args.config, "r") as stream:
config_file = yaml.safe_load(stream)
if config_file["deployer"]["type"] == "kubernetes":
kube_connection = set_kubernetes_deployer_auth(config_file["deployer"]["connection"], context_auth)
config_file["deployer"]["connection"]=kube_connection
if config_file["deployers"]["image"]["deployer_name"] == "kubernetes":
kube_connection = set_kubernetes_deployer_auth(config_file["deployers"]["image"]["connection"], context_auth)
config_file["deployers"]["image"]["connection"]=kube_connection
with open(engine_args.config, "w") as stream:
yaml.safe_dump(config_file, stream,explicit_start=True, width=4096)

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PyYAML>=5.1
aliyun-python-sdk-core==2.13.36
aliyun-python-sdk-ecs==4.24.25
arcaflow >= 0.8.0
arcaflow-plugin-sdk >= 0.10.0
arcaflow==0.9.0
arcaflow-plugin-sdk==0.10.0
azure-identity
azure-keyvault
azure-mgmt-compute
Expand Down
11 changes: 4 additions & 7 deletions scenarios/arcaflow/cpu-hog/config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
deployer:
connection:
cacert: ''
cert: ''
host: https://api.tsebasti-lab.aws.rhperfscale.org:6443
key: ''
type: kubernetes
deployers:
image:
connection: {}
deployer_name: kubernetes
log:
level: debug
logged_outputs:
Expand Down
12 changes: 8 additions & 4 deletions scenarios/arcaflow/cpu-hog/sub-workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: v0.1.0
version: v0.2.0
input:
root: RootObject
objects:
Expand Down Expand Up @@ -61,11 +61,15 @@ input:

steps:
kubeconfig:
plugin: quay.io/arcalot/arcaflow-plugin-kubeconfig:0.2.0
plugin:
src: quay.io/arcalot/arcaflow-plugin-kubeconfig:0.2.0
deployment_type: image
input:
kubeconfig: !expr $.input.kubeconfig
stressng:
plugin: quay.io/arcalot/arcaflow-plugin-stressng:0.5.0
plugin:
src: quay.io/arcalot/arcaflow-plugin-stressng:0.5.0
deployment_type: image
step: workload
input:
cleanup: "true"
Expand All @@ -77,7 +81,7 @@ steps:
cpu_method: !expr $.input.cpu_method
cpu_load: !expr $.input.cpu_load_percentage
deploy:
type: kubernetes
deployer_name: kubernetes
connection: !expr $.steps.kubeconfig.outputs.success.connection
pod:
metadata:
Expand Down
2 changes: 1 addition & 1 deletion scenarios/arcaflow/cpu-hog/workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: v0.1.0
version: v0.2.0
input:
root: RootObject
objects:
Expand Down
7 changes: 4 additions & 3 deletions scenarios/arcaflow/io-hog/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
deployer:
connection: {}
type: kubernetes
deployers:
image:
connection: {}
deployer_name: kubernetes
log:
level: debug
logged_outputs:
Expand Down
12 changes: 8 additions & 4 deletions scenarios/arcaflow/io-hog/sub-workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: v0.1.0
version: v0.2.0
input:
root: RootObject
objects:
Expand Down Expand Up @@ -96,11 +96,15 @@ input:

steps:
kubeconfig:
plugin: quay.io/arcalot/arcaflow-plugin-kubeconfig:0.2.0
plugin:
src: quay.io/arcalot/arcaflow-plugin-kubeconfig:0.2.0
deployment_type: image
input:
kubeconfig: !expr $.input.kubeconfig
stressng:
plugin: quay.io/arcalot/arcaflow-plugin-stressng:0.5.0
plugin:
src: quay.io/arcalot/arcaflow-plugin-stressng:0.5.0
deployment_type: image
step: workload
input:
cleanup: "true"
Expand All @@ -114,7 +118,7 @@ steps:
hdd_write_size: !expr $.input.io_block_size

deploy:
type: kubernetes
deployer_name: kubernetes
connection: !expr $.steps.kubeconfig.outputs.success.connection
pod:
metadata:
Expand Down
2 changes: 1 addition & 1 deletion scenarios/arcaflow/io-hog/workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: v0.1.0
version: v0.2.0
input:
root: RootObject
objects:
Expand Down
7 changes: 4 additions & 3 deletions scenarios/arcaflow/memory-hog/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
deployer:
connection: {}
type: kubernetes
deployers:
image:
connection: {}
deployer_name: kubernetes
log:
level: debug
logged_outputs:
Expand Down
12 changes: 8 additions & 4 deletions scenarios/arcaflow/memory-hog/sub-workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: v0.1.0
version: v0.2.0
input:
root: RootObject
objects:
Expand Down Expand Up @@ -53,11 +53,15 @@ input:

steps:
kubeconfig:
plugin: quay.io/arcalot/arcaflow-plugin-kubeconfig:0.2.0
plugin:
src: quay.io/arcalot/arcaflow-plugin-kubeconfig:0.2.0
deployment_type: image
input:
kubeconfig: !expr $.input.kubeconfig
stressng:
plugin: quay.io/arcalot/arcaflow-plugin-stressng:0.5.0
plugin:
src: quay.io/arcalot/arcaflow-plugin-stressng:0.5.0
deployment_type: image
step: workload
input:
cleanup: "true"
Expand All @@ -68,7 +72,7 @@ steps:
vm: !expr $.input.vm_workers
vm_bytes: !expr $.input.vm_bytes
deploy:
type: kubernetes
deployer_name: kubernetes
connection: !expr $.steps.kubeconfig.outputs.success.connection
pod:
metadata:
Expand Down
2 changes: 1 addition & 1 deletion scenarios/arcaflow/memory-hog/workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: v0.1.0
version: v0.2.0
input:
root: RootObject
objects:
Expand Down

0 comments on commit 462f93a

Please sign in to comment.