Rename Grenade's DEST to STACK_ROOT

This is to avoid confusion with DevStack's DEST which is set to
${STACK_ROOT}/$BASE_RELEASE in Grenade.

Change-Id: Ibc9b94bd51e7d5dd82ec45f23557923d2f38db96
This commit is contained in:
Dean Troyer 2013-03-27 14:15:33 -05:00
parent bfe4b90eae
commit 318a7e1807
11 changed files with 25 additions and 38 deletions

View File

@ -60,7 +60,7 @@ Directory Structure
Grenade creates a set of directories for both the base and target
OpenStack installation sources and DevStack.
$DEST
$STACK_ROOT
|- logs # Grenade logs
|- <base>
| |- data # base data
@ -102,13 +102,13 @@ this to ``localrc``::
Grenade includes ``devstack.localrc.base`` and ``devstack.localrc.target``
for DevStack that are used to customize its behaviour for use with Grenade.
If ``$DEST/devstack.$BASE_RELEASE/localrc`` does not exist the following is
If ``$BASE_DEVSTACK_DIR/localrc`` does not exist the following is
performed by ``prep-base``:
* ``devstack.localrc.base`` is copied to to ``$DEST/$BASE_RELEASE/devstack/localrc``
* if ``devstack.localrc`` exists it is appended ``$DEST/$BASE_RELEASE/devstack/localrc``
* ``devstack.localrc.base`` is copied to to ``$BASE_DEVSTACK_DIR/localrc``
* if ``devstack.localrc`` exists it is appended ``$BASE_DEVSTACK_DIR/localrc``
Similar steps are performed by ``prep-target`` for ``$DEST/$BASE_RELEASE/devstack``.
Similar steps are performed by ``prep-target`` for ``$TARGET_DEVSTACK_DIR``.
``devstack.localrc`` will be appended to both DevStack ``localrc`` files if it
exists. ``devstack.localrc`` is not included in Grenade and will not be
@ -145,7 +145,7 @@ This is roughly the equivalent to::
grenade/setup-javelin
(cd /opt/stack/folsom/devstack
./unstack.sh)
# dump databases to $DEST/save
# dump databases to $STACK_ROOT/save
grenade/prep-target
grenade/upgrade-packages
grenade/upgrade-devstack

View File

@ -32,7 +32,7 @@ if [[ -d $BASE_DEVSTACK_DIR ]]; then
source functions; \
source stackrc; \
source lib/cinder; \
DATA_DIR=\${DEST}/data; \
DATA_DIR=\${STACK_ROOT}/data; \
./unstack.sh --all; \
cd -; \
sudo losetup -d \$(sudo losetup -j \$DATA_DIR/\${VOLUME_GROUP}-backing-file | awk -F':' '/backing-file/ { print \$1}'); \
@ -49,7 +49,7 @@ if [[ -d $TARGET_DEVSTACK_DIR ]]; then
source functions; \
source stackrc; \
source lib/cinder; \
DATA_DIR=\${DEST}/data; \
DATA_DIR=\${STACK_ROOT}/data; \
./unstack.sh --all; \
cd -; \
# need to test if volume is present

View File

@ -7,16 +7,16 @@ RC_DIR=$(cd $(dirname "$BASH_SOURCE") && pwd)
# Another option is http://review.openstack.org/p
GIT_BASE=https://github.com
# Destination path for installation ``DEST``
DEST=/opt/stack
DATA_DIR=${DEST}/data
# Destination path for installation ``STACK_ROOT``
STACK_ROOT=/opt/stack
DATA_DIR=${STACK_ROOT}/data
# Release info
BASE_RELEASE=folsom
BASE_RELEASE_DIR=$DEST/$BASE_RELEASE
BASE_RELEASE_DIR=${STACK_ROOT}/$BASE_RELEASE
TARGET_RELEASE=grizzly
TARGET_RELEASE_DIR=$DEST/$TARGET_RELEASE
TARGET_RELEASE_DIR=${STACK_ROOT}/$TARGET_RELEASE
# DevStack sources
BASE_DEVSTACK_REPO=$GIT_BASE/openstack-dev/devstack.git
@ -31,17 +31,17 @@ TARGET_DEVSTACK_DIR=$TARGET_RELEASE_DIR/devstack
RUN_EXERCISES=True
# Saved stuff
SAVE_DIR=$DEST/save
SAVE_DIR=${STACK_ROOT}/save
# Screen session name
SCREEN_NAME=${SCREEN_NAME:-stack}
# Logging
LOGFILE=$DEST/logs/grenade.sh.log
LOGFILE=${STACK_ROOT}/logs/grenade.sh.log
LOGDAYS=1
TIMESTAMP_FORMAT="%F-%H%M%S"
CURRENT_LOG_TIME=${CURRENT_LOG_TIME:-$(date "+$TIMESTAMP_FORMAT")}
SCREEN_LOGDIR=$DEST/logs/screen
SCREEN_LOGDIR=${STACK_ROOT}/logs/screen
# Project directories
GLANCECLIENT_DIR=python-glanceclient

View File

@ -35,8 +35,8 @@ if [[ ! -d $BASE_DEVSTACK_DIR ]]; then
fi
# Load up a copy of the downloaded images if not present
if [[ -d $DEST/images ]]; then
rsync -a $DEST/images/* $BASE_DEVSTACK_DIR/files
if [[ -d ${STACK_ROOT}/images ]]; then
rsync -a ${STACK_ROOT}/images/* $BASE_DEVSTACK_DIR/files
fi
# Set up base localrc

View File

@ -13,11 +13,11 @@ SRC_DIR=$(cd $(dirname "$0") && pwd)
# Set up some defaults if grenaderc is not present
GRENADE_REPO=https://github.com/openstack-dev/grenade.git
GRENADE_DIR=$DEST/grenade
GRENADE_DIR=${STACK_ROOT}/grenade
GRENADE_BRANCH=master
DEST=/opt/stack
GRENADE_DIR=$DEST/grenade
STACK_ROOT=/opt/stack
GRENADE_DIR=${STACK_ROOT}/grenade
# Source params
if [[ -r $SRC_DIR/grenaderc ]]; then
@ -33,9 +33,9 @@ DEST_USER=${USER:-${LOGNAME:-stack}}
set -o xtrace
ssh -t $DEST_USER@$HOST " \
sudo mkdir -p $DEST; \
[[ -w $DEST ]] || sudo chown `whoami` $DEST; \
[[ -d $GRENADE_DIR ]] || (cd $DEST; git clone $GRENADE_REPO $GRENADE_DIR); \
sudo mkdir -p ${STACK_ROOT}; \
[[ -w ${STACK_ROOT} ]] || sudo chown `whoami` ${STACK_ROOT}; \
[[ -d $GRENADE_DIR ]] || (cd ${STACK_ROOT}; git clone $GRENADE_REPO $GRENADE_DIR); \
[[ -d $GRENADE_DIR ]] && (cd $GRENADE_DIR; git checkout $GRENADE_BRANCH); \
"

View File

@ -25,7 +25,7 @@ set -o xtrace
# Duplicate some setup bits from base DevStack
source $BASE_DEVSTACK_DIR/stackrc
DATA_DIR=${DEST}/data
DATA_DIR=${STACK_ROOT}/data
source $BASE_DEVSTACK_DIR/lib/cinder

View File

@ -60,9 +60,6 @@ MYSQL_HOST=${MYSQL_HOST:-localhost}
MYSQL_USER=${MYSQL_USER:-root}
BASE_SQL_CONN=$(source $BASE_DEVSTACK_DIR/stackrc; echo ${BASE_SQL_CONN:-mysql://$MYSQL_USER:$MYSQL_PASSWORD@$MYSQL_HOST})
# set data dir before we switch DEST on us
DATA_DIR=${DEST}/data
# Duplicate some setup bits from target DevStack
cd $TARGET_DEVSTACK_DIR
source $TARGET_DEVSTACK_DIR/stackrc

View File

@ -61,7 +61,6 @@ BASE_SQL_CONN=$(source $BASE_DEVSTACK_DIR/stackrc; echo ${BASE_SQL_CONN:-mysql:/
# Duplicate some setup bits from target DevStack
cd $TARGET_DEVSTACK_DIR
source $TARGET_DEVSTACK_DIR/stackrc
DATA_DIR=${DEST}/data
SERVICE_HOST=${SERVICE_HOST:-localhost}
SERVICE_PROTOCOL=${SERVICE_PROTOCOL:-http}
SERVICE_TENANT_NAME=${SERVICE_TENANT_NAME:-service}

View File

@ -56,9 +56,6 @@ MYSQL_HOST=${MYSQL_HOST:-localhost}
MYSQL_USER=${MYSQL_USER:-root}
BASE_SQL_CONN=$(source $BASE_DEVSTACK_DIR/stackrc; echo ${BASE_SQL_CONN:-mysql://$MYSQL_USER:$MYSQL_PASSWORD@$MYSQL_HOST})
# set data dir before we switch DEST on us
DATA_DIR=${DEST}/data
# Duplicate some setup bits from target DevStack
cd $TARGET_DEVSTACK_DIR
source $TARGET_DEVSTACK_DIR/stackrc

View File

@ -58,9 +58,6 @@ MYSQL_HOST=${MYSQL_HOST:-localhost}
MYSQL_USER=${MYSQL_USER:-root}
BASE_SQL_CONN=$(source $BASE_DEVSTACK_DIR/stackrc; echo ${BASE_SQL_CONN:-mysql://$MYSQL_USER:$MYSQL_PASSWORD@$MYSQL_HOST})
# set data dir before we switch DEST on us
DATA_DIR=${DEST}/data
# Duplicate some setup bits from target DevStack
cd $TARGET_DEVSTACK_DIR
source $TARGET_DEVSTACK_DIR/stackrc

View File

@ -58,9 +58,6 @@ MYSQL_HOST=${MYSQL_HOST:-localhost}
MYSQL_USER=${MYSQL_USER:-root}
BASE_SQL_CONN=$(source $BASE_DEVSTACK_DIR/stackrc; echo ${BASE_SQL_CONN:-mysql://$MYSQL_USER:$MYSQL_PASSWORD@$MYSQL_HOST})
# set data dir before we switch DEST on us
DATA_DIR=${DEST}/data
# Duplicate some setup bits from target DevStack
cd $TARGET_DEVSTACK_DIR
source $TARGET_DEVSTACK_DIR/stackrc