Upgrade testing of OpenStack projects built on top of DevStack.
Go to file
armando-migliaccio ad79234af5 Drop Kilo upgrade hack for Neutron
This patch removes the need for a special upgrade procedure
as outlined in [1]. The Neutron codebases have been tweaked
[2,3,4,5] to allow for a backward compatible upgrade.

[1] https://wiki.openstack.org/wiki/ReleaseNotes/Kilo#Upgrade_Notes_6
[2] https://review.openstack.org/#/c/142484/
[3] https://review.openstack.org/#/c/142482/
[4] https://review.openstack.org/#/c/142474/
[5] https://review.openstack.org/#/c/142150/

Closes-bug: #1401895

Change-Id: I82b8aa4215f9669bb622548f27f8bb53544c9792
2015-01-12 17:57:17 +00:00
from-grizzly Remove commented out codes and files related to upgrade-packages 2014-11-17 11:14:33 +09:00
from-havana Remove commented out codes and files related to upgrade-packages 2014-11-17 11:14:33 +09:00
from-icehouse add new config file to upgrade 2014-08-28 12:50:57 +00:00
from-juno Drop Kilo upgrade hack for Neutron 2015-01-12 17:57:17 +00:00
tools change the javelin guests to be smaller 2014-12-01 11:34:17 -05:00
within-juno Add Ironic sideways migration testing 2014-09-05 16:14:11 -07:00
within-kilo Add within-kilo and update within-master 2014-10-15 11:20:03 -07:00
.gitignore Add a .gitignore file. 2013-03-26 13:07:05 -04:00
.gitreview add .gitreview to the project 2013-03-26 10:18:59 -04:00
check-sanity Fix worlddump call 2014-12-03 13:40:54 +11:00
clean.sh add bashate (nee bash8) test support 2014-06-19 17:14:47 -04:00
devstack.localrc.base Remove use of GRENADE_PHASE 2014-11-18 17:46:22 -08:00
devstack.localrc.example add devstack.localrc.example 2013-03-26 10:42:39 -04:00
devstack.localrc.target Remove use of GRENADE_PHASE 2014-11-18 17:46:22 -08:00
functions Move shared devstack functions to functions-common 2014-10-15 11:59:21 -07:00
functions-common Sync functions-common from devstack 2014-12-29 11:39:44 -08:00
grenade.sh Upgrade ceilometer first 2014-12-16 07:24:29 -05:00
grenaderc Teach Grenade to do Juno to Kilo upgrades 2014-10-16 08:24:22 -07:00
HACKING.rst Remove exercises and run tempest smoke tests instead 2014-02-04 15:52:06 +00:00
javelin.conf Create volume in javelin config 2012-08-31 10:04:05 -05:00
javelinrc Change terms 2013-01-23 15:50:42 -06:00
LICENSE Initial repo setup 2012-08-03 17:07:12 -05:00
prep-base remove pip install workarounds 2014-12-18 07:02:31 -05:00
prep-target Use DevStack functions in upgrade scripts 2014-03-03 08:15:02 -06:00
README.rst Remove use of GRENADE_PHASE 2014-11-18 17:46:22 -08:00
save-state Extract database dumps to function 2014-08-29 14:09:43 +01:00
setup-grenade Fix setup-grenade to pass user and host as parameter 2013-05-03 15:32:19 -03:00
setup-javelin Remove deprecated glance commands from javelin setup 2014-08-04 11:46:23 -05:00
start-dstat Run dstat during the upgrade process 2014-09-29 15:12:25 -07:00
stop-base Leave the VG alone 2014-07-07 09:33:41 -05:00
test-requirements.txt Rename bash8 to bashate 2014-08-13 12:59:45 +02:00
TODO.rst Remove exercises and run tempest smoke tests instead 2014-02-04 15:52:06 +00:00
tox.ini Rename bash8 to bashate 2014-08-13 12:59:45 +02:00
upgrade-ceilometer Add within-juno dir and within-master symlink 2014-08-26 15:17:41 -07:00
upgrade-cinder Don't stop screens in upgrade-* 2014-10-03 12:58:51 +01:00
upgrade-devstack Add within-juno dir and within-master symlink 2014-08-26 15:17:41 -07:00
upgrade-glance Don't stop screens in upgrade-* 2014-10-03 12:58:51 +01:00
upgrade-horizon Don't stop screens in upgrade-* 2014-10-03 12:58:51 +01:00
upgrade-infra Remove call to inexistent unfubar_testtools function 2014-12-10 17:19:22 +00:00
upgrade-ironic upgrade-ironic: Do not source lib/baremetal 2015-01-07 13:17:55 -08:00
upgrade-keystone Don't stop screens in upgrade-* 2014-10-03 12:58:51 +01:00
upgrade-neutron Add within-juno dir and within-master symlink 2014-08-26 15:17:41 -07:00
upgrade-nova remove sourcing of nova baremetal driver 2014-12-05 10:53:24 -05:00
upgrade-oslo don't uninstall oslo.config 2014-12-02 16:04:11 -05:00
upgrade-swift Don't stop screens in upgrade-* 2014-10-03 12:58:51 +01:00
upgrade-tempest remove sourcing of nova baremetal driver 2014-12-05 10:53:24 -05:00
within-master Add within-kilo and update within-master 2014-10-15 11:20:03 -07:00

Grenade

Grenade is an OpenStack test harness to exercise the upgrade process between releases. It uses DevStack to perform an initial OpenStack install and as a reference for the final configuration. Currently Grenade upgrades Keystone, Glance, Nova, Neutron, Cinder and Swift in their default DevStack configurations.

The master branch tests the upgrade path from the previous release (aka 'base') to the current trunk (aka 'target'). Stable branches of Grenade will be created soon after an OpenStack release and after a corresponding DevStack stable branch is available.

For example, following the release of Grizzly and the creation of DevStack's stable/grizzly branch a similar stable/grizzly branch of Grenade will be created. At that time master will be re-worked to base on Grizzly and the cycle will continue.

Goals

Continually test the upgrade process between OpenStack releases to find issues as they are introduced so they can be fixed immediately.

Status

Preparations are ongoing to add Grenade as a non-voting job in the OpenStack CI Jenkins.

  • Testing of the 'javelin' project artifacts is incomplete

Process

  • Install base OpenStack using current stable/<base-release> DevStack
  • Perform basic testing (tempest's smoke and scenarios tests)
  • Create some artifacts in a new project ('javelin') for comparison after the upgrade process.
  • Install current target DevStack to support the upgrades
  • Run upgrade scripts preserving (running?) instances and data

Terminology

Grenade has two DevStack installs present and distinguished between then as 'base' and 'target'.

  • Base: The initial install that will be upgraded.
  • Target: The reference install of target OpenStack (maybe just DevStack)

Directory Structure

Grenade creates a set of directories for both the base and target OpenStack installation sources and DevStack.

$STACK_ROOT

- <base> | - <target> | |- swift

Dependencies

This is a non-exhaustive list of dependencies:

  • git
  • tox<1.7

Install Grenade

Get Grenade from GitHub in the usual way:

git clone git://git.openstack.org/openstack-dev/grenade

Grenade knows how to install the current master branch using the included setup-grenade script. The only argument is the hostname of the target system that will run the upgrade testing.

./setup-grenade testbox

The Grenade repo and branch used can be changed by adding something like this to localrc:

GRENADE_REPO=git@github.com:dtroyer/grenade.git
GRENADE_BRANCH=dt-test

Grenade includes devstack.localrc.base and devstack.localrc.target for DevStack that are used to customize its behaviour for use with Grenade. If $BASE_DEVSTACK_DIR/localrc does not exist the following is performed by prep-base:

  • 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 $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 overwritten it if it exists.

Prepare For An Upgrade Test

./grenade.sh

grenade.sh installs DevStack for the Base release and runs its stack.sh. Then it creates a 'javelin' project containing some non-default configuration.

This is roughly the equivalent to:

grenade/prep-base
(cd /opt/stack/grizzly/devstack
 ./stack.sh)
grenade/setup-javelin
(cd /opt/stack/grizzly/devstack
 ./unstack.sh)
# dump databases to $STACK_ROOT/save
grenade/prep-target
grenade/upgrade-devstack
grenade/upgrade-keystone
grenade/upgrade-glance
grenade/upgrade-nova
grenade/upgrade-neutron
grenade/upgrade-cinder
grenade/upgrade-swift

The Target release of DevStack is installed in a different directory from the Base release.

While the Base release is running an imaginary Javelin tenant is configured to populate the databases with some non-default content:

grenade/setup-javelin

Set up the javelin credentials with javelinrc.

Testing Upgrades

The upgrade-* scripts are the individual components of the DevStack/Grenade upgrade process. They typically stop any running processes, checkout updated sources, migrate the database, any other tasks that need to be done then start the processes in screen.

These scripts are written to be idempotent.