Commit 34475c27 authored by David Johnson's avatar David Johnson

Merge branch 'install-neutron-lbaasv2'

parents 1200ae1d be407b94
......@@ -1303,7 +1303,7 @@ if [ -z "${NEUTRON_DBPASS}" ]; then
fi
fi
maybe_install_packages neutron-server neutron-plugin-ml2 python-neutronclient
maybe_install_packages neutron-server neutron-plugin-ml2 python-neutron-lbaas python-neutronclient
#
# Install a patch to make manual router interfaces less likely to hijack
......@@ -1325,7 +1325,12 @@ if [ -z "${NEUTRON_DBPASS}" ]; then
crudini --set /etc/neutron/neutron.conf DEFAULT verbose ${VERBOSE_LOGGING}
crudini --set /etc/neutron/neutron.conf DEFAULT debug ${DEBUG_LOGGING}
crudini --set /etc/neutron/neutron.conf DEFAULT core_plugin ml2
crudini --set /etc/neutron/neutron.conf DEFAULT service_plugins 'router,metering'
if [ $OSVERSION -lt $OSNEWTON ]; then
crudini --set /etc/neutron/neutron.conf DEFAULT service_plugins 'router,metering'
else
crudini --set /etc/neutron/neutron.conf DEFAULT service_plugins \
'router,metering,neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2'
fi
crudini --set /etc/neutron/neutron.conf DEFAULT allow_overlapping_ips True
if [ $OSVERSION -le $OSKILO ]; then
......@@ -1479,6 +1484,11 @@ EOF
firewall_driver $fwdriver
fi
if [ $OSVERSION -ge $OSNEWTON ]; then
crudini --set /etc/neutron/neutron_lbaas.conf service_providers \
service_provider "LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default"
fi
crudini --set /etc/nova/nova.conf DEFAULT \
network_api_class nova.network.neutronv2.api.API
crudini --set /etc/nova/nova.conf DEFAULT \
......@@ -1547,6 +1557,24 @@ EOF
su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade ${OSCODENAME}" neutron
fi
# Install the neutron lbaas dashboard panel, and update the neutron
# db for lbaas.
if [ $OSVERSION -ge $OSNEWTON ]; then
git clone https://git.openstack.org/openstack/neutron-lbaas-dashboard
cd neutron-lbaas-dashboard
git checkout stable/${OSRELEASE}
python setup.py install
cp -p neutron_lbaas_dashboard/enabled/_1481_project_ng_loadbalancersv2_panel.py \
/usr/share/openstack-dashboard/openstack_dashboard/local/enabled/
echo "OPENSTACK_NEUTRON_NETWORK['enable_lb'] = True" \
>> /etc/openstack-dashboard/local_settings.py
/usr/share/openstack-dashboard/manage.py collectstatic --noinput \
&& /usr/share/openstack-dashboard/manage.py compress
service_restart apache2
su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --subproject neutron-lbaas upgrade head" neutron
fi
service_restart nova-api
service_restart nova-scheduler
service_restart nova-conductor
......
......@@ -55,7 +55,8 @@ crudini --set /etc/neutron/neutron.conf DEFAULT auth_strategy keystone
crudini --set /etc/neutron/neutron.conf DEFAULT verbose ${VERBOSE_LOGGING}
crudini --set /etc/neutron/neutron.conf DEFAULT debug ${DEBUG_LOGGING}
crudini --set /etc/neutron/neutron.conf DEFAULT core_plugin ml2
crudini --set /etc/neutron/neutron.conf DEFAULT service_plugins 'router,metering'
crudini --set /etc/neutron/neutron.conf DEFAULT service_plugins \
'router,metering,neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2'
crudini --set /etc/neutron/neutron.conf DEFAULT allow_overlapping_ips True
crudini --set /etc/neutron/neutron.conf DEFAULT notification_driver messagingv2
......
......@@ -55,7 +55,8 @@ crudini --set /etc/neutron/neutron.conf DEFAULT auth_strategy keystone
crudini --set /etc/neutron/neutron.conf DEFAULT verbose ${VERBOSE_LOGGING}
crudini --set /etc/neutron/neutron.conf DEFAULT debug ${DEBUG_LOGGING}
crudini --set /etc/neutron/neutron.conf DEFAULT core_plugin ml2
crudini --set /etc/neutron/neutron.conf DEFAULT service_plugins 'router,metering'
crudini --set /etc/neutron/neutron.conf DEFAULT service_plugins \
'router,metering,neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2'
crudini --set /etc/neutron/neutron.conf DEFAULT allow_overlapping_ips True
crudini --set /etc/neutron/neutron.conf DEFAULT notification_driver messagingv2
......
......@@ -53,6 +53,9 @@ EOF
sysctl -p
maybe_install_packages neutron-l3-agent neutron-dhcp-agent neutron-metering-agent
if [ $OSVERSION -ge $OSNEWTON ]; then
maybe_install_packages neutron-lbaasv2-agent
fi
# Configure the L3 agent.
crudini --set /etc/neutron/l3_agent.ini DEFAULT \
......@@ -158,6 +161,23 @@ crudini --set /etc/neutron/metering_agent.ini DEFAULT \
crudini --set /etc/neutron/metering_agent.ini DEFAULT \
use_namespaces True
if [ $OSVERSION -ge $OSNEWTON ]; then
crudini --set /etc/neutron/lbaas_agent.ini DEFAULT \
device_driver "neutron_lbaas.drivers.haproxy.namespace_driver.HaproxyNSDriver"
if [ "${ML2PLUGIN}" = "linuxbridge" ]; then
crudini --set /etc/neutron/lbaas_agent.ini DEFAULT \
interface_driver "neutron.agent.linux.interface.BridgeInterfaceDriver"
else
crudini --set /etc/neutron/lbaas_agent.ini DEFAULT \
interface_driver "neutron.agent.linux.interface.OVSInterfaceDriver"
fi
crudini --set /etc/neutron/lbaas_agent.ini haproxy \
user_group "haproxy"
crudini --set /etc/neutron/neutron_lbaas.conf service_providers \
service_provider "LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default"
fi
service_restart neutron-l3-agent
service_enable neutron-l3-agent
service_restart neutron-dhcp-agent
......@@ -166,6 +186,10 @@ service_restart neutron-metadata-agent
service_enable neutron-metadata-agent
service_restart neutron-metering-agent
service_enable neutron-metering-agent
if [ $OSVERSION -ge $OSNEWTON ]; then
service_restart neutron-lbaasv2-agent
service_enable neutron-lbaasv2-agent
fi
touch $OURDIR/setup-networkmanager-done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment