
cliff 1.4.5 doesn't work with stable/grizzly python toolchain, to short circuit this, force installing a compatible cliff before we kick off the whole process, that will at least let us limp along until we can get a better resolution. Change-Id: If3a2602031943a0710882f5e1e37ef9e0bc4392e
70 lines
2.1 KiB
Bash
Executable File
70 lines
2.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# ``prep-base`` handles the preparations for installing and configuring
|
|
# the "base" 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
|
|
##add a config opt to still do this?
|
|
##rm -rf $BASE_DEVSTACK_DIR
|
|
|
|
# Get DevStack if it doesn't exist
|
|
if [[ ! -d $BASE_DEVSTACK_DIR ]]; then
|
|
git_clone $BASE_DEVSTACK_REPO $BASE_DEVSTACK_DIR $BASE_DEVSTACK_BRANCH
|
|
fi
|
|
|
|
# Load up a copy of the downloaded images if not present
|
|
if [[ -d ${STACK_ROOT}/images ]]; then
|
|
rsync -a ${STACK_ROOT}/images/* $BASE_DEVSTACK_DIR/files
|
|
fi
|
|
|
|
# Set up base localrc
|
|
|
|
# if localrc exists and localrc.orig does not exist, save localrc to localrc.orig
|
|
if [[ -r $BASE_DEVSTACK_DIR/localrc && ! -r $BASE_DEVSTACK_DIR/localrc.orig ]]; then
|
|
mv $BASE_DEVSTACK_DIR/localrc $BASE_DEVSTACK_DIR/localrc.orig
|
|
fi
|
|
|
|
# put devstack.localrc.target in place as localrc
|
|
sed -e "
|
|
s|\@BASE_RELEASE_DIR\@|$BASE_RELEASE_DIR|
|
|
s|\@DATA_DIR@|$DATA_DIR|
|
|
" $GRENADE_DIR/devstack.localrc.base >$BASE_DEVSTACK_DIR/localrc
|
|
|
|
# if localrc.orig exists, append it to localrc
|
|
if [[ -r $BASE_DEVSTACK_DIR/localrc.orig ]]; then
|
|
echo "#vvvvvvvvvv devstack-vm-gate.sh localrc vvvvvvvvvv" >>$BASE_DEVSTACK_DIR/localrc
|
|
cat $BASE_DEVSTACK_DIR/localrc.orig >>$BASE_DEVSTACK_DIR/localrc
|
|
fi
|
|
|
|
# if devstack.localrc exists append it to locarc
|
|
if [[ -r $GRENADE_DIR/devstack.localrc ]]; then
|
|
echo "#vvvvvvvvvv devstack.localrc vvvvvvvvvv" >>$BASE_DEVSTACK_DIR/localrc
|
|
cat $GRENADE_DIR/devstack.localrc >>$BASE_DEVSTACK_DIR/localrc
|
|
fi
|
|
|
|
# NOTE(sdague): remove as soon as we can get cliff to work with older python
|
|
# toolchains for setuputils
|
|
pip_install 'cliff>=1.4.3,<1.4.5'
|