Skip to content

Instantly share code, notes, and snippets.

import multiprocessing
import sys
from octavia.api import app as api_app
from octavia.common import service as octavia_service
from octavia.i18n import _LI
from octavia import version
from gunicorn.app import base as gbase
from oslo_config import cfg
# Misc
#RECLONE=True
DATABASE_PASSWORD=password
ADMIN_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=password
RABBIT_PASSWORD=password
# Enable Logging
#!/bin/bash
match1='service_provider=LOADBALANCER:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default'
insert1='service_provider=LOADBALANCERv2:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriverv2:default'
match2='service_plugins = neutron.services.l3_router.l3_router_plugin.L3RouterPlugin,neutron.services.loadbalancer.plugin.LoadBalancerPlugin'
insert2='service_plugins = neutron.services.l3_router.l3_router_plugin.L3RouterPlugin,neutron.services.loadbalancer.plugin.LoadBalancerPlugin,neutron.services.loadbalancer.plugin.LoadBalancerPluginv2'
file='/etc/neutron/neutron.conf'
match1='service_provider=LOADBALANCER:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default'
insert1='service_provider=LOADBALANCERv2:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriverv2:default'
match2='service_plugins = neutron.services.l3_router.l3_router_plugin.L3RouterPlugin,neutron.services.loadbalancer.plugin.LoadBalancerPlugin'
insert2='service_plugins = neutron.services.l3_router.l3_router_plugin.L3RouterPlugin,neutron.services.loadbalancer.plugin.LoadBalancerPlugin,neutron.services.loadbalancer.plugin.LoadBalancerPluginv2'
file='/etc/neutron/neutron.conf'
if [ ! "$(grep $insert1 $file)" ]; then
sed -i "s/$match1/$match1\n$insert1/" $file
[DEFAULT]
service_plugins = neutron.services.l3_router.l3_router_plugin.L3RouterPlugin,neutron.services.loadbalancer.plugin.LoadBalancerPlugin,neutron.services.loadbalancer.plugin.LoadBalancerPluginv2
[service_providers]
service_provider=LOADBALANCERv2:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriverv2:default