#!/bin/bash

CHAOS_MONKEY=$1

case $CHAOS_MONKEY in
    "mama")
        communicator --message-address Agent=R --message-type newMember
        ;;
    "softKill")
        communicator --message-address Agent=R,Worker=Rm --message-type softKill
        ;;
    *)
        echo "Unrecognized chaos-monkey $CHAOS_MONKEY". I know these monkeys:
        echo mama - it will create a new worker on a random VM
        echo softKill - it will kill a random worker on a random VM. workers with client only are not considered.
        exit
        ;;
esac