Use heat functions from plugin for upgrade

Now that we've the devstack plugin in-tree let's use
the functions from the plugin for upgrade, so that
we can remove the devstack tree heat code.

Change-Id: Ic392bcc24bc374ee8511a94f1d8f6ac23131c7e3
This commit is contained in:
rabi 2016-08-27 11:59:29 +05:30 committed by Rabi Mishra
parent 1c0987e605
commit 567e93a1ff
2 changed files with 15 additions and 8 deletions

View File

@ -11,13 +11,16 @@ source $DEST/heat/devstack/lib/heat
if is_heat_enabled; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then
echo_summary "Installing heat"
install_heat
# Use stack_install_service here to account for vitualenv
stack_install_service heat
echo_summary "Installing heatclient"
install_heatclient
echo_summary "Installing heat other"
install_heat_other
cleanup_heat
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
echo_summary "Cleaning up heat"
cleanup_heat
echo_summary "Configuring heat"
configure_heat

View File

@ -48,13 +48,19 @@ set -o errexit
# Upgrade Heat
# ============
# Locate heat devstack plugin, the directory above the
# grenade plugin.
HEAT_DEVSTACK_DIR=$(dirname $(dirname $0))
# Duplicate some setup bits from target DevStack
source $TARGET_DEVSTACK_DIR/functions
source $TARGET_DEVSTACK_DIR/stackrc
source $TARGET_DEVSTACK_DIR/lib/tls
source $TARGET_DEVSTACK_DIR/lib/stack
source $TARGET_DEVSTACK_DIR/lib/apache
source $TARGET_DEVSTACK_DIR/lib/heat
# Get heat functions from devstack plugin
source $HEAT_DEVSTACK_DIR/lib/heat
# Print the commands being run so that we can see the command that triggers
# an error. It is also useful for following allowing as the install occurs.
@ -63,10 +69,8 @@ set -o xtrace
# Save current config files for posterity
[[ -d $SAVE_DIR/etc.heat ]] || cp -pr $HEAT_CONF_DIR $SAVE_DIR/etc.heat
# install_heat()
stack_install_service heat
install_heatclient
install_heat_other
# Install the target heat
source $HEAT_DEVSTACK_DIR/plugin.sh stack install
# calls upgrade-heat for specific release
upgrade_project heat $RUN_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH
@ -78,7 +82,7 @@ HEAT_BIN_DIR=$(dirname $(which heat-manage))
$HEAT_BIN_DIR/heat-manage --config-file $HEAT_CONF db_sync || die $LINENO "DB sync error"
# Start Heat
start_heat
start_heat_with_plugin
# Don't succeed unless the services come up
ensure_services_started heat-api heat-engine heat-api-cloudwatch heat-api-cfn