labs: add script to shut down controller node

Add a single-purpose script to shut down the controller node from
another node.

Change-Id: Ic70e211a8fd3e8ad4c448045b65000be209b00de
This commit is contained in:
Roger Luethi 2014-10-06 10:43:02 +02:00
parent 64bc8f8094
commit ece1f75c4d

View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -o errexit -o nounset
TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
source "$TOP_DIR/config/paths"
source "$LIB_DIR/functions.guest"
indicate_current_auto
exec_logfile
echo "Shutting down the controller node."
ssh \
-o "UserKnownHostsFile /dev/null" \
-o "StrictHostKeyChecking no" \
-i "$HOME/.ssh/vagrant" \
controller-mgmt \
sudo /sbin/shutdown -P now