Skip to content

Commit

Permalink
new plugin api porting of hub scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
tsebastiani authored and chaitanyaenr committed Oct 3, 2024
1 parent 4c8d0ce commit ef6a0b9
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion application-outages/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export NAMESPACE=${NAMESPACE:=<namespace>}
export POD_SELECTOR=${POD_SELECTOR:="{}"}
export BLOCK_TRAFFIC_TYPE=${BLOCK_TRAFFIC_TYPE:=- Ingress}
export SCENARIO_POST_ACTION=${SCENARIO_POST_ACTION:=""}
export SCENARIO_TYPE=${SCENARIO_TYPE:=application_outages}
export SCENARIO_TYPE=${SCENARIO_TYPE:=application_outages_scenarios}
export SCENARIO_FILE=${SCENARIO_FILE:=scenarios/app_outage.yaml}
2 changes: 1 addition & 1 deletion network-chaos/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export INTERFACES=${INTERFACES:="[]"}
export EXECUTION=${EXECUTION:="parallel"}
export EGRESS=${EGRESS:="{bandwidth: 100mbit}"}
export SCENARIO_POST_ACTION=${SCENARIO_POST_ACTION:=""}
export SCENARIO_TYPE=${SCENARIO_TYPE:=network_chaos}
export SCENARIO_TYPE=${SCENARIO_TYPE:=network_chaos_scenarios}
export SCENARIO_FILE=${SCENARIO_FILE:=scenarios/network_chaos.yaml}
export TRAFFIC_TYPE=${TRAFFIC_TYPE:=egress}

Expand Down
2 changes: 1 addition & 1 deletion node-cpu-hog/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY config.yaml.template /home/krkn/kraken/config/config.yaml.template
COPY node-cpu-hog/env.sh /home/krkn/env.sh
COPY env.sh /home/krkn/main_env.sh
COPY node-cpu-hog/run.sh /home/krkn/run.sh
COPY node-cpu-hog/input.yaml.template /home/krkn/kraken/scenarios/arcaflow/cpu-hog/input.yaml.template
COPY node-cpu-hog/input.yaml.template /home/krkn/kraken/scenarios/kube/cpu-hog/input.yaml.template
COPY common_run.sh /home/krkn/common_run.sh

ENTRYPOINT /home/krkn/run.sh
4 changes: 2 additions & 2 deletions node-cpu-hog/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export NODE_CPU_PERCENTAGE=${NODE_CPU_PERCENTAGE:="50"}
export NAMESPACE=${NAMESPACE:="default"}
export NODE_SELECTORS=${NODE_SELECTORS:=""}

export SCENARIO_TYPE=${SCENARIO_TYPE:=arcaflow_scenarios}
export SCENARIO_FILE=${SCENARIO_FILE:=scenarios/arcaflow/cpu-hog/input.yaml}
export SCENARIO_TYPE=${SCENARIO_TYPE:=hog_scenarios}
export SCENARIO_FILE=${SCENARIO_FILE:=scenarios/kube/cpu-hog/input.yaml}

4 changes: 2 additions & 2 deletions node-cpu-hog/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -ex

ROOT_FOLDER="/home/krkn"
KRAKEN_FOLDER="$ROOT_FOLDER/kraken"
SCENARIO_FOLDER="$KRAKEN_FOLDER/scenarios/arcaflow/cpu-hog"
SCENARIO_FOLDER="$KRAKEN_FOLDER/scenarios/kube/cpu-hog"

# Source env.sh to read all the vars
source $ROOT_FOLDER/main_env.sh
Expand All @@ -23,7 +23,7 @@ cd $KRAKEN_FOLDER

cat config/cpu_config.yaml

cat scenarios/arcaflow/cpu-hog/input.yaml
cat scenarios/kube/cpu-hog/input.yaml

python3.9 run_kraken.py --config=config/cpu_config.yaml

Expand Down
2 changes: 1 addition & 1 deletion node-io-hog/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY config.yaml.template /home/krkn/kraken/config/config.yaml.template
COPY node-io-hog/env.sh /home/krkn/env.sh
COPY env.sh /home/krkn/main_env.sh
COPY node-io-hog/run.sh /home/krkn/run.sh
COPY node-io-hog/input.yaml.template /home/krkn/kraken/scenarios/arcaflow/io-hog/input.yaml.template
COPY node-io-hog/input.yaml.template /home/krkn/kraken/scenarios/kube/io-hog/input.yaml.template
COPY common_run.sh /home/krkn/common_run.sh

ENTRYPOINT /home/krkn/run.sh
4 changes: 2 additions & 2 deletions node-io-hog/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export IO_WRITE_BYTES=${IO_WRITE_BYTES:="10m"}
export NAMESPACE=${NAMESPACE:="default"}
export NODE_SELECTORS=${NODE_SELECTORS:=""}

export SCENARIO_TYPE=${SCENARIO_TYPE:=arcaflow_scenarios}
export SCENARIO_FILE=${SCENARIO_FILE:=scenarios/arcaflow/io-hog/input.yaml}
export SCENARIO_TYPE=${SCENARIO_TYPE:=hog_scenarios}
export SCENARIO_FILE=${SCENARIO_FILE:=scenarios/kube/io-hog/input.yaml}
4 changes: 2 additions & 2 deletions node-io-hog/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -ex

ROOT_FOLDER="/home/krkn"
KRAKEN_FOLDER="$ROOT_FOLDER/kraken"
SCENARIO_FOLDER="$KRAKEN_FOLDER/scenarios/arcaflow/io-hog"
SCENARIO_FOLDER="$KRAKEN_FOLDER/scenarios/kube/io-hog"

# Source env.sh to read all the vars
source $ROOT_FOLDER/main_env.sh
Expand All @@ -23,7 +23,7 @@ cd $KRAKEN_FOLDER

cat config/io_config.yaml

cat scenarios/arcaflow/io-hog/input.yaml
cat scenarios/kube/io-hog/input.yaml

python3.9 run_kraken.py --config=config/io_config.yaml

Expand Down
2 changes: 1 addition & 1 deletion node-memory-hog/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COPY config.yaml.template /home/krkn/kraken/config/config.yaml.template
COPY node-memory-hog/env.sh /home/krkn/env.sh
COPY env.sh /home/krkn/main_env.sh
COPY node-memory-hog/run.sh /home/krkn/run.sh
COPY node-memory-hog/input.yaml.template /home/krkn/kraken/scenarios/arcaflow/memory-hog/input.yaml.template
COPY node-memory-hog/input.yaml.template /home/krkn/kraken/scenarios/kube/memory-hog/input.yaml.template
COPY common_run.sh /home/krkn/common_run.sh

ENTRYPOINT /home/krkn/run.sh
4 changes: 2 additions & 2 deletions node-memory-hog/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export MEMORY_CONSUMPTION_PERCENTAGE=${MEMORY_CONSUMPTION_PERCENTAGE:="90%"}
export NUMBER_OF_WORKERS=${NUMBER_OF_WORKERS:=1}
export TOTAL_CHAOS_DURATION=${TOTAL_CHAOS_DURATION:="60"}
export NAMESPACE=${NAMESPACE:="default"}
export SCENARIO_TYPE=${SCENARIO_TYPE:=arcaflow_scenarios}
export SCENARIO_FILE=${SCENARIO_FILE:=scenarios/arcaflow/memory-hog/input.yaml}
export SCENARIO_TYPE=${SCENARIO_TYPE:=hog_scenarios}
export SCENARIO_FILE=${SCENARIO_FILE:=scenarios/kube/memory-hog/input.yaml}
4 changes: 2 additions & 2 deletions node-memory-hog/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -ex

ROOT_FOLDER="/home/krkn"
KRAKEN_FOLDER="$ROOT_FOLDER/kraken"
SCENARIO_FOLDER="$KRAKEN_FOLDER/scenarios/arcaflow/memory-hog"
SCENARIO_FOLDER="$KRAKEN_FOLDER/scenarios/kube/memory-hog"

# Source env.sh to read all the vars
source $ROOT_FOLDER/main_env.sh
Expand All @@ -25,6 +25,6 @@ cd $KRAKEN_FOLDER

cat config/mem_config.yaml

cat scenarios/arcaflow/memory-hog/input.yaml
cat scenarios/kube/memory-hog/input.yaml

python3.9 run_kraken.py --config=config/mem_config.yaml
2 changes: 1 addition & 1 deletion pod-network-chaos/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export LABEL_SELECTOR=${LABEL_SELECTOR:=""}
export POD_NAME=${POD_NAME:=""}
export INSTANCE_COUNT=${INSTANCE_COUNT:=1}
export TEST_DURATION=${TEST_DURATION:=120}
export SCENARIO_TYPE=${SCENARIO_TYPE:=plugin_scenarios}
export SCENARIO_TYPE=${SCENARIO_TYPE:=pod_network_scenarios}
export SCENARIO_FILE=${SCENARIO_FILE:=scenarios/pod_network_scenario.yaml}
export SCENARIO_POST_ACTION=${SCENARIO_POST_ACTION:=""}
2 changes: 1 addition & 1 deletion pod-scenarios/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export NAME_PATTERN=${NAME_PATTERN:=".*"}
export DISRUPTION_COUNT=${DISRUPTION_COUNT:=1}
export KILL_TIMEOUT=${KILL_TIMEOUT:=180}
export EXPECTED_RECOVERY_TIME=${EXPECTED_RECOVERY_TIME:=120}
export SCENARIO_TYPE=${SCENARIO_TYPE:=plugin_scenarios}
export SCENARIO_TYPE=${SCENARIO_TYPE:=pod_disruption_scenarios}
export SCENARIO_FILE=${SCENARIO_FILE:=scenarios/pod_scenario.yaml}
export SCENARIO_POST_ACTION=${SCENARIO_POST_ACTION:=""}
2 changes: 1 addition & 1 deletion service-hijacking/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

# Vars and respective defaults
export SCENARIO_BASE64=${SCENARIO_BASE64:=1}
export SCENARIO_TYPE="service_hijacking"
export SCENARIO_TYPE="service_hijacking_scenarios"
export SCENARIO_FILE="scenarios/service_hijacking.yaml"
export SCENARIO_POST_ACTION=${SCENARIO_POST_ACTION:=""}
2 changes: 1 addition & 1 deletion syn-flood/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ export NODE_SELECTORS=${NODE_SELECTORS:=""}
python3.9 $ROOT_FOLDER/build_config_file.py --outconfig $SCENARIO_CONFIG_FILE
cat $SCENARIO_CONFIG_FILE

export SCENARIO_TYPE=${SCENARIO_TYPE:=syn_flood}
export SCENARIO_TYPE=${SCENARIO_TYPE:=syn_flood_scenarios}
export SCENARIO_FILE=${SCENARIO_FILE:=$SCENARIO_CONFIG_FILE}
2 changes: 1 addition & 1 deletion zone-outages/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ export CLOUD_TYPE=${CLOUD_TYPE:="aws"}
export DURATION=${DURATION:=600}
export VPC_ID=${VPC_ID:=""}
export SUBNET_ID=${SUBNET_ID:=""}
export SCENARIO_TYPE=${SCENARIO_TYPE:=zone_outages}
export SCENARIO_TYPE=${SCENARIO_TYPE:=zone_outages_scenarios}
export SCENARIO_FILE=${SCENARIO_FILE:=scenarios/zone_outage.yaml}
export SCENARIO_POST_ACTION=${SCENARIO_POST_ACTION:=""}

0 comments on commit ef6a0b9

Please sign in to comment.