Skip to content

Instantly share code, notes, and snippets.

@arosales
Created February 3, 2017 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arosales/3e919c6fc6fafab0b3461b862be177da to your computer and use it in GitHub Desktop.
Save arosales/3e919c6fc6fafab0b3461b862be177da to your computer and use it in GitHub Desktop.
#!/bin/bash
# Path to executing script
#SCRIPT=$(realpath $0)
# Directory housing script
#SCRIPTPATH=$(dirname $SCRIPT)
#. $SCRIPTPATH/common.sh
# Run the terasort action on resourcemanager
#printf "{'message': 'Terasort benchmark submitted.', 'returnCode': 0, 'isComplete': false}"
#ID=`juju run-action resourcemanager/0 terasort | awk '{print $5}'`
# Display the action output
#STATUS=`juju show-action-output $ID`
#exposeResult "$STATUS" 0 "false"
# TODO: Use a better Juju Wait for the action to comoplete
#printf "{'message': 'Terasort action running. This may take a few minutes to complete. ', 'returnCode': 0, 'isComplete': false}"
#STATUS=`juju show-action-output $ID | grep status | awk '{print $2}'`
#while [ "$STATUS"=="pending" ]; do
# printf "{'message': '. ', 'returnCode': 0, 'isComplete': False}"
# sleep 10s
#done
#printf "{'message': 'Terasort benchmark complete.', 'returnCode': 0, 'isComplete': True}"
#RESULT=`juju show-action-output $ID`
#exposeResult "$RESULT" 0 "true"
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment