Pranav Salunke 9aae759289 Refactors the architecture of osbash
Changes to the repository layout to incorporate the following:

  1. Migrate to dedicated repository
  2. Rebranding osbash to openstack-labs
  3. Adding Python specific bits
  4. Allowing a wrapper and switch to osbash meanwhile the
     python scripts (stacktrain) is underprogress

The current repository structure will allow us to carry out the above
mentioned changes while the stable code base is usable and will also
allow us to update the version of OpenStack being deployed on osbash.

This is the rough sketch of the repository ignoring the boilerplate:

    .
    |-- doc
    |-- openstack-labs
    |   |-- img
    |   |-- osbash
    |   |   |-- config
    |   |   |-- lib
    |   |   |-- tools
    |   |   |-- scripts
    |   |   |-- osbash.sh
    |   |   `-- wbatch
    |   |-- stacktrain
    |   |   `-- lib
    |   `-- stacktrain.py
    `-- oslabs.py

Note: Also adds/edits existing boilerplate (README's, Tools etc.)

Co-Authored-By: Roger Luethi <rl@patchworkscience.org>
Co-Authored-By: Sayali Lunkad <sayali.92720@gmail.com>
2015-09-29 11:23:32 +02:00

33 lines
1.1 KiB
Bash
Executable File

#!/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
# At this point in the cluster build, we just rebooted the compute VM to take
# a snapshot, and we are about to reboot the controller node for the same
# purpose.
#
# About a minute after we reboot the controller, the status of nova-compute
# (according to nova-manage service list) becomes "XXX".
#
# If we sleep for 2 seconds now, before rebooting the controller, the
# nova-compute service on the compute node will keep running and the status
# will automatically return to ":-)" after some time (may take several
# minutes). If we don't sleep here, the nova-compute service on compute will
# die within a few minutes (needs manual service restart or a compute node
# reboot).
sleep 2
echo "Shutting down the controller node."
ssh \
-o "UserKnownHostsFile /dev/null" \
-o "StrictHostKeyChecking no" \
-i "$HOME/.ssh/osbash_key" \
controller-mgmt \
sudo /sbin/shutdown -P now