- Cloud provider - is hardcoded to work with digital ocean and hobbykube
- Node detection - Expects exactly 3 nodes - 1 master and 2 slaves
--auto-populate
usesdoctl
and a regexp to find the droplets
handle_arguments
- Argument parsing and vaildationrun_scenario
- Setup the scenariorun_test_loop
- Run Test loop
Before doing anything perturb.sh
checks that it can only find bash scripts with well-known names.
Scenario scripts are found by looking for files with a .sh
extension under the $SCENARIO_DIR
worker-any.sh
- runs on a randomly chosen slaveworker-1.sh
- runs on slave 1worker-2.sh
- runs on slave 2workers-every.sh
- runs on slaves 1 & 2nodes-every.sh
- runs on master and slaves 1 and 2master.sh
- runs on mastertest.sh
- Ignored for setup
Any other .sh
scripts will cause an error
- Loop over subdirectories in
$SCENARIO_DIR
. Subdirectories must be named after the command to be run bykubectl
. This is currently always onlyapply
- Concatenate all the
*.ya?ml
files together into a string - Run the concatenated string through ssh/kubectl on the master
Runs each shell script on the appropriate host (see above)
cleanup
noop
no-cleanup.do
If this is presentscenario/cover-tracks.sh
will not runreboot-all.do
If this is presentscenario/reboot.sh
will run on all nodesreboot-workers.do
If this is presentscenario/reboot.sh
will run on master nodereboot-master.do
If this is presentscenario/reboot.sh
will run on worker nodes- temporary script to copy base64 encoded
$SCENARIO_DIR/flag.txt
to/root/flag.txt
if that file exists in$SCENARIO_DIR
- temporary script to copy
$SCENARIO_DIR/challenge.txt
to/opt/challenge.txt