Fix localrc generation

This commit is contained in:
Dean Troyer 2012-10-05 16:46:14 -05:00
parent 285c058e77
commit cd3fa2a595
3 changed files with 26 additions and 23 deletions

View File

@ -34,22 +34,29 @@ system that will run the upgrade testing.
./setup-grenade testbox
Grenade includes ``devstack.localrc.work`` for DevStack that is used to
customize its behaviour for use with Grenade. By default ``setup-grenade``
will set HOST_IP and DEST when copying it to the Grenade DevStack direcotry.
Grenade includes ``devstack.localrc.work`` and ``devstack.localrc.trunk``
for DevStack that is used to customize its behaviour for use with Grenade.
If ``$DEST/devstack.essex/localrc`` does not exist the following is
performed by ``prep-work``:
Grenade also uses ``devstack.localrc`` if it exists; it is appended to
``localrc`` in each of the DevStack environments as the final overriding
configuration. Grenade does not supply this file and will not overwrite
* ``devstack.localrc.work`` is copied to to ``$DEST/devstack.essex/localrc``
* if ``devstack.localrc`` exists it is appended ``$DEST/devstack.essex/localrc``
Similar steps are performed by ``prep-trunk`` for ``devstack.folsom``.
``devstack.localrc`` is not included in Grenade and will not be overwritten
it if it exists.
# Prepare For An Upgrade
# Prepare For An Upgrade Test
./grenade.sh
``grenade.sh`` installs DevStack for the **Work** release (Essex) and
runs its ``stack.sh``. This is roughly the equivalent to:
runs its ``stack.sh``. Then it creates a 'javelin' project containing
some non-default configuration.
This is roughly the equivalent to:
grenade/prep-work
cd /opt/stack/devstack.essex

View File

@ -34,19 +34,17 @@ if [[ ! -d $TRUNK_DEVSTACK_DIR ]]; then
git_clone $TRUNK_DEVSTACK_REPO $TRUNK_DEVSTACK_DIR $TRUNK_DEVSTACK_BRANCH
fi
# Set up localrc
if [[ ! -r $TRUNK_DEVSTACK_DIR/localrc ]]; then
cp -p $GRENADE_DIR/devstack.localrc.trunk $TRUNK_DEVSTACK_DIR/localrc
fi
# Load up a copy of the downloaded images if not present
if [[ -d $DEST/images ]]; then
rsync -a $DEST/images/* $TRUNK_DEVSTACK_DIR/files
fi
# Set up localrc
if [[ ! -r $WORK_DEVSTACK_DIR/localrc ]]; then
cat $GRENADE_DIR/devstack.localrc.trunk $GRENADE_DIR/devstack.localrc >>$TRUNK_DEVSTACK_DIR/localrc
# Set up trunk localrc
if [[ ! -r $TRUNK_DEVSTACK_DIR/localrc ]]; then
cat $GRENADE_DIR/devstack.localrc.trunk >$TRUNK_DEVSTACK_DIR/localrc
if [[ -r $GRENADE_DIR/devstack.localrc ]]; then
$GRENADE_DIR/devstack.localrc >>$TRUNK_DEVSTACK_DIR/localrc
fi
fi
# clean up apache config

View File

@ -34,19 +34,17 @@ if [[ ! -d $WORK_DEVSTACK_DIR ]]; then
git_clone $WORK_DEVSTACK_REPO $WORK_DEVSTACK_DIR $WORK_DEVSTACK_BRANCH
fi
# Set up localrc
if [[ ! -r $WORK_DEVSTACK_DIR/localrc ]]; then
cp -p $GRENADE_DIR/devstack.localrc.work $WORK_DEVSTACK_DIR/localrc
fi
# Load up a copy of the downloaded images if not present
if [[ -d $DEST/images ]]; then
rsync -a $DEST/images/* $WORK_DEVSTACK_DIR/files
fi
# Set up localrc
# Set up work localrc
if [[ ! -r $WORK_DEVSTACK_DIR/localrc ]]; then
cat $GRENADE_DIR/devstack.localrc.work $GRENADE_DIR/devstack.localrc >>$WORK_DEVSTACK_DIR/localrc
cat $GRENADE_DIR/devstack.localrc.work >$WORK_DEVSTACK_DIR/localrc
if [[ -r $GRENADE_DIR/devstack.localrc ]]; then
$GRENADE_DIR/devstack.localrc >>$WORK_DEVSTACK_DIR/localrc
fi
fi
# clean up apache config