grenade/upgrade-packages
Mauro S. M. Rodrigues ac53d2c3f9 Modify upgrade-* scripts to allow skip configuration if not needed
This allow grenade to move and test from a brand new release to master without
any change.

This way it allows to enable d-g grenade testing new-release->master where for
a just released Openstack means that we don't need any new configuration yet.

Change-Id: I3e685deb61b95116420eae9cacb6b38dc405ffe9
2013-12-10 11:46:02 +00:00

53 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env bash
# ``upgrade_packages``
# Keep track of the grenade 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
# NOTE(maurosr): Ideally in a new upgrade test right after a release no new
# configuration is need, so we can go on without the from-<release> directory.
# This is also useful due to cross dependencie between d-g and grenade when
# enabling grenade to run a an upgrade between a new pair of releases.
# Get packages to be updated
upgrade_dir=$(get_release_name_from_branch $BASE_DEVSTACK_BRANCH)
upgrade_file=$GRENADE_DIR/"from-"$upgrade_dir/${0##*/}
if [ -e $upgrade_file ]; then
source $upgrade_file
else
echo "Warning: No new configurations were found for new necessary" \
"packages. If your patch fails during the upgrade this may be the cause."
fi
# SQLAlchemy is 0.7.8 ((cinder, nova)
PIPS="$GLANCE_PIPS $HORIZON_PIPS $NOVA_PIPS $QUANTUM_PIPS"
#pip_install $PIPS
# Install package requirements
if [[ "$os_PACKAGE" = "deb" ]]; then
install_package $(get_packages $TARGET_DEVSTACK_DIR/files/apts)
else
install_package $(get_packages $TARGET_DEVSTACK_DIR/files/rpms)
fi
# Restart Services
sudo service rabbitmq-server stop
sudo killall epmd
sudo service rabbitmq-server start