centos7系统openstack kilo开启lbaas功能
1、安装haproxy和neutron-lbaas(在openstack资源里)
Setup the RDO repositories:
#sudo yum install -y https://rdoproject.org/repos/rdo-release.rpm
#yum -y install openstack-neutron-lbaas haproxy
2、编辑配置文件
Enable the HAProxy plug-in by using the service_provider option in the /etc/neutron/neutron.conf file:
【service_provider = LOADBALANCER:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default】
The service_plugin should be set in /etc/neutron/neutron.conf:
【service_plugins = router,lbaas】
The interface_driver and device_driver should be set in /etc/neutron/lbaas_agent.ini. Since the load balancer will be haproxy, set the device_driver accordingly:
【device_driver = neutron.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver】
根据自己的实际环境开始对应的驱动
The interface_driver will depend on the core L2 plugin being used.
For OpenVSwitch:
【interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver】
For linuxbridge:
【interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver】
重启 neutron-server service 和 neutron-lbaas-agent service进程
# service neutron-server restart
# service neutron-lbaas-agent restart
3、在dashboard上开启lbaas页面.
/etc/openstack-dashboard/local_settings中把'enable_lb'的状态改为【True】
【OPENSTACK_NEUTRON_NETWORK = {
'enable_lb': True,
...
}】
重启httpd进程:
# service httpd restart
之后就可以在dashboard上查看LBAAS页面的配置