Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 53 lines (36 sloc) 1.32 KB
#!/usr/bin/env bash
# ``prep-trunk`` handles the preparations for installing and configuring
# the "trunk" configuration of DevStack.
# Keep track of the devstack directory
GRENADE_DIR=$(cd $(dirname "$0") && pwd)
# Import common functions
source $GRENADE_DIR/functions
# Determine what system we are running on. This provides ``os_VENDOR``,
# ``os_RELEASE``, ``os_UPDATE``, ``os_PACKAGE``, ``os_CODENAME``
# and ``DISTRO``
GetDistro
# Source params
source $GRENADE_DIR/grenaderc
# For debugging
set -o xtrace
# System Preparation
# ==================
# perform cleanup to ensure a clean starting environment
rm -rf $TRUNK_DEVSTACK_DIR
# check out devstack
git_clone $TRUNK_DEVSTACK_REPO $TRUNK_DEVSTACK_DIR $TRUNK_DEVSTACK_BRANCH
if [[ -d $DEST/images ]]; then
rsync -a $DEST/images $TRUNK_DEVSTACK_DIR/files
fi
# Set up localrc
cp -p $GRENADE_DIR/devstack.localrc.trunk $TRUNK_DEVSTACK_DIR/localrc
# clean up apache config
# essex devstack uses 000-default
# folsom devstack uses horizon -> ../sites-available/horizon
if [[ -e /etc/apache2/sites-enabled/000-default ]]; then
# Clean up folsom-style
sudo rm /etc/apache2/sites-enabled/000-default
sudo service apache2 reload
fi
# TODO(dtroyer): Needs to get rid of modern glance command too
# all command-line libs? how do we want to handle them?