File: upgrade-designate

package info (click to toggle)
designate 1%3A21.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,860 kB
  • sloc: python: 49,608; sh: 1,914; sql: 155; makefile: 83; javascript: 3
file content (27 lines) | stat: -rw-r--r-- 1,028 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/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"
}