diff options
Diffstat (limited to 'src/manage.sh')
-rwxr-xr-x | src/manage.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/manage.sh b/src/manage.sh index 3ac0303..92596af 100755 --- a/src/manage.sh +++ b/src/manage.sh @@ -54,6 +54,17 @@ deploy_all() { done } +clean_all() { + for machine in "$OUTPUT_DIR"/*; do + if [ -d "$machine" ]; then + machine=`basename $machine` + echo "removing files from $machine ... " + generate_instance_list $machine + ssh -i "$SSH_KEY" -F "$SSH_CONFIG" $SSH_USER@"$machine" remove < "$OUTPUT_DIR/$machine.list" + fi + done +} + generate_instance_list() { machine=$1 @@ -117,6 +128,17 @@ case "$1" in echo "Deploying configuration to all machines ..." deploy_all ;; + clean) + echo "cleaning/removing configuration from all machines ..." + clean_all + ;; + wipe) + if [ -z "$2" ]; then + echo "Usage: $0 wipe <planet name>" + fi + echo "wipeing configuration for from all machines inside ssh-config ..." + wipe_all + ;; start) echo "Start manager and worker on all machines ..." start_all |