Files
designate/devstack/upgrade/from-xena/upgrade-designate
Michael Johnson b1e1974fe8 Fix grenade job for mod_wsgi to uwsgi transition
This patch updates the grenade job to migrate from using Apache mod_wsgi
to using uwsgi for the Designate API when upgrading from Xena to Yoga.

It also splits out the wsgi devstack configuration into a library file.

Change-Id: Icf8ee4a8e7e2dff67257b0e5f82fbeab6cb7e0b8
2022-02-18 17:58:41 +00:00

28 lines
1.0 KiB
Bash

#!/usr/bin/env bash
# Designate moved from using mod_wsgi to running uwsgi with an Apache proxy
# pass-through for devstack in the yoga release cycle.
# This upgrade script updates the Apache configuration to switch the wsgi
# approach during a xena->yoga grenade test.
# Since this is a from-* script, it will run after installing the new code
# but before the upgraded code is started.
function configure_designate_upgrade {
source $GRENADE_DIR/functions
source ${TARGET_DEVSTACK_DIR}/lib/apache
DESIGNATE_DEVSTACK_DIR=$(dirname $(dirname $0))
source $DESIGNATE_DEVSTACK_DIR/lib/wsgi
# Disable the old site using mod_wsgi
disable_apache_site designate-api
# Setup the apache uswgi site "designate-api-wsgi"
designate_configure_uwsgi
enable_apache_site designate-api-wsgi
restart_apache_server
# Switch designate-api to run under uwsgi
stop_process designate-api
run_process "designate-api" "$(which uwsgi) --procname-prefix designate-api --ini $DESIGNATE_UWSGI_CONF"
}