diff --git a/ci/long_running_tests/README.rst b/ci/long_running_tests/README.rst index 27bf37987..42526682c 100644 --- a/ci/long_running_tests/README.rst +++ b/ci/long_running_tests/README.rst @@ -24,6 +24,12 @@ relevant machine, attach to the tmux session (usually ``tmux a -t 0``), inspect the logs under ``/tmp/ray/session*/logs/``, and also inspect ``/tmp/ray/session*/debug_state.txt``. +Shut Down the Workloads +----------------------- + +The instances running the workloads can all be killed by running +``./shut_down_workloads.sh``. + Adding a Workload ----------------- diff --git a/ci/long_running_tests/shut_down_workloads.sh b/ci/long_running_tests/shut_down_workloads.sh new file mode 100755 index 000000000..44abe6824 --- /dev/null +++ b/ci/long_running_tests/shut_down_workloads.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -e + +ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) + +pushd "$ROOT_DIR" + +# Kill all of the workloads. +for workload_file in "$ROOT_DIR"/workloads/*; do + file_name=$(basename -- $workload_file) + workload_name="${file_name%.*}" + ray down -y config.yaml --cluster-name="$workload_name" & +done + +# Wait for all of the ray down commands to finish. +for pid in `jobs -p`; do + wait $pid +done + +popd