Browse Source

Merge "Refactor Devstack Plugin for OVN Octavia Provider Driver"

Zuul 3 months ago
parent
commit
d3d93a9da6

+ 1
- 1
devstack/devstackgaterc View File

@@ -20,7 +20,7 @@
20 20
 
21 21
 OVN_OPTS=$@
22 22
 
23
-OVERRIDE_ENABLED_SERVICES=key,n-api,n-cpu,n-cond,n-sch,n-crt,n-cauth,n-obj,n-api-meta,placement-api,g-api,g-reg,c-sch,c-api,c-vol,rabbit,mysql,dstat,ovn-northd,ovn-controller,q-svc,networking-ovn-metadata-agent,br-ex-tcpdump,br-int-flows,q-trunk,ovn-octavia,o-api,o-hk
23
+OVERRIDE_ENABLED_SERVICES=key,n-api,n-cpu,n-cond,n-sch,n-crt,n-cauth,n-obj,n-api-meta,placement-api,g-api,g-reg,c-sch,c-api,c-vol,rabbit,mysql,dstat,ovn-northd,ovn-controller,q-svc,networking-ovn-metadata-agent,br-ex-tcpdump,br-int-flows,q-trunk,octavia,o-api,o-hk
24 24
 export OVERRIDE_ENABLED_SERVICES
25 25
 
26 26
 if [ -z "${RALLY_SCENARIO}" ] ; then

+ 0
- 60
devstack/lib/networking-ovn View File

@@ -102,9 +102,6 @@ NEUTRON_DIR=$DEST/neutron
102 102
 
103 103
 OVN_META_CONF=$NEUTRON_CONF_DIR/networking_ovn_metadata_agent.ini
104 104
 
105
-# Octavia directory
106
-OCTAVIA_DIR=$DEST/octavia
107
-
108 105
 # Set variables for building OVS from source
109 106
 OVS_REPO=$OVN_REPO
110 107
 OVS_REPO_NAME=$OVN_REPO_NAME
@@ -566,63 +563,6 @@ function create_public_bridge {
566 563
     sudo ip link set $ext_gw_ifc up
567 564
 }
568 565
 
569
-function _start_ovn_octavia_apache_wsgi {
570
-    if [[ "$WSGI_MODE" == "uwsgi" ]]; then
571
-        run_process $OCTAVIA_API "$OCTAVIA_BIN_DIR/uwsgi --ini $OCTAVIA_UWSGI_CONF"
572
-        enable_apache_site octavia-wsgi
573
-    else
574
-        enable_apache_site octavia
575
-        restart_apache_server
576
-    fi
577
-}
578
-
579
-function _stop_ovn_octavia_apache_wsgi {
580
-    if [[ "$WSGI_MODE" == "uwsgi" ]]; then
581
-        disable_apache_site octavia-wsgi
582
-        stop_process $OCTAVIA_API
583
-    else
584
-        disable_apache_site octavia
585
-        restart_apache_server
586
-    fi
587
-}
588
-
589
-function install_ovn_octavia {
590
-    source $OCTAVIA_DIR/devstack/plugin.sh
591
-    octavia_install
592
-    octaviaclient_install
593
-}
594
-
595
-function configure_ovn_octavia {
596
-    source $OCTAVIA_DIR/devstack/plugin.sh
597
-    octavia_configure
598
-    iniset $OCTAVIA_CONF api_settings enabled_provider_drivers 'ovn:OVN provider driver'
599
-    iniset $OCTAVIA_CONF api_settings default_provider_driver 'ovn'
600
-    iniset $OCTAVIA_CONF house_keeping load_balancer_expiry_age 20
601
-}
602
-
603
-function start_ovn_octavia {
604
-    source $OCTAVIA_DIR/devstack/plugin.sh
605
-    source $OCTAVIA_DIR/devstack/settings
606
-    create_octavia_accounts
607
-    add_load-balancer_roles
608
-    if [[ "$OCTAVIA_USE_MOD_WSGI" == "True" ]]; then
609
-        _start_ovn_octavia_apache_wsgi
610
-    else
611
-        run_process $OCTAVIA_API "$OCTAVIA_API_BINARY $OCTAVIA_API_ARGS"
612
-    fi
613
-    run_process $OCTAVIA_HOUSEKEEPER  "$OCTAVIA_HOUSEKEEPER_BINARY $OCTAVIA_HOUSEKEEPER_ARGS"
614
-}
615
-
616
-function stop_ovn_octavia {
617
-    source $OCTAVIA_DIR/devstack/plugin.sh
618
-    source $OCTAVIA_DIR/devstack/settings
619
-    if [[ "$OCTAVIA_USE_MOD_WSGI" == "True" ]]; then
620
-        _stop_ovn_octavia_apache_wsgi
621
-    else
622
-        stop_process $OCTAVIA_API
623
-    fi
624
-    stop_process $OCTAVIA_HOUSEKEEPER
625
-}
626 566
 
627 567
 # Restore xtrace
628 568
 $_XTRACE_NETWORKING_OVN

+ 3
- 3
devstack/local.conf.sample View File

@@ -92,13 +92,13 @@ disable_service cinder c-sch c-api c-vol
92 92
 # amphore driver. If you want to enable Octavia amphore driver, please see
93 93
 # the local.conf sample in the octavia repo.
94 94
 enable_plugin octavia https://git.openstack.org/openstack/octavia
95
-LIBS_FROM_GIT+=python-octaviaclient
96
-enable_service ovn-octavia
95
+enable_service octavia
97 96
 enable_service o-api
98 97
 enable_service o-hk
99 98
 disable_service o-cw
100 99
 disable_service o-hm
101
-enable_plugin octavia-tempest-plugin https://git.openstack.org/openstack/octavia-tempest-plugin
100
+DISABLE_AMP_IMAGE_BUILD=True
101
+LIBS_FROM_GIT+=python-octaviaclient
102 102
 
103 103
 # If you want to enable a provider network instead of the default private
104 104
 # network after your DevStack environment installation, you *must* set

+ 2
- 2
devstack/ovn-octavia-provider.conf.sample View File

@@ -11,7 +11,7 @@ RABBIT_PASSWORD=password
11 11
 SERVICE_PASSWORD=password
12 12
 SERVICE_TOKEN=password
13 13
 ADMIN_PASSWORD=password
14
-enable_plugin networking-ovn \ $GIT_BASE/openstack/networking-ovn
14
+enable_plugin networking-ovn $GIT_BASE/openstack/networking-ovn
15 15
 enable_service ovn-northd
16 16
 enable_service ovn-controller
17 17
 enable_service networking-ovn-metadata-agent
@@ -25,9 +25,9 @@ disable_service q-meta
25 25
 
26 26
 DISABLE_AMP_IMAGE_BUILD=True
27 27
 enable_plugin octavia $GIT_BASE/openstack/octavia
28
+enable_service octavia
28 29
 enable_service o-api
29 30
 enable_service o-hk
30
-enable_service octavia
31 31
 disable_service o-cw
32 32
 disable_service o-hm
33 33
 

+ 0
- 16
devstack/plugin.sh View File

@@ -62,22 +62,6 @@ if is_service_enabled q-svc || is_service_enabled ovn-northd || is_service_enabl
62 62
     fi
63 63
 fi
64 64
 
65
-if is_service_enabled ovn-octavia; then
66
-    if [[ "$1" == "stack" && "$2" == "install" ]]; then
67
-        echo_summary "Installing octavia with ovn provider driver"
68
-        install_ovn_octavia
69
-    elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
70
-        echo_summary "Configuring octavia with ovn provider driver"
71
-        configure_ovn_octavia
72
-    elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
73
-        start_ovn_octavia
74
-    fi
75
-
76
-    if [[ "$1" == "unstack" ]]; then
77
-        echo_summary "Uninstalling octavia with ovn provider driver"
78
-        stop_ovn_octavia
79
-    fi
80
-fi
81 65
 # Restore xtrace
82 66
 $_XTRACE_OVN_PLUGIN
83 67
 

Loading…
Cancel
Save