OpenStackNewton版本部署----用Openvswitch替换Linuxbridge
来源:互联网 发布:好东东网络 编辑:程序博客网 时间:2024/05/16 14:26
OpenStackNewton版本部署----用Openvswitch替换
基于之后与Opendaylight互通的需要,需要将Linux bridge替换位Openvswitch(OVS)。
安装和配置控制节点
1、如果已经安装Linux bridge,就先停止Linux bridge的服务
# systemctl stop neutron-linuxbridge-agent.service
2、删除neutron数据库
mysql> DROP DATABASE neutron;
3、创建数据库
1)root用户登录数据库
$ mysql -u root -p
2)创建neutron数据库
mysql> CREATE DATABASE neutron;
mysql> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' \
IDENTIFIED BY 'NEUTRON_DBPASS';
mysql> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' \
IDENTIFIED BY 'NEUTRON_DBPASS';
4、安装组件
# yum install neutron-openvswitch-agent -y
5、在/etc/neutron/neutron.conf添加如下配置:
[DEFAULT]
...
rpc_backend = rabbit
[oslo_messaging_rabbit]
rabbit_host = 192.168.1.103
rabbit_userid = openstack
rabbit_password = DPASS
6、在/etc/neutron/plugins/ml2/ml2_conf.ini修改如下配置:
[ml2]
...
mechanism_drivers = openvswitch,l2population
7、在/etc/nova/nova.conf i修改如下配置:
[DEFAULT]
...
dhcpbridge_flagfile = /etc/nova/nova.conf
dhcpbridge = /usr/bin/nova-dhcpbridge
state_path = /var/lib/nova
force_dhcp_release = True
dhcpbridge_flagfile = /etc/nova/nova.conf
verbose = True
ec2_private_dns_show_ip = True
[libvirt]
use_virtio_for_bridges = True
[wsgi]
api_paste_config = /etc/nova/api-paste.ini
8、修改/etc/neutron/plugins/ml2/openvswitch_agent.ini文件:
[agent]
tunnel_types = vxlan
l2_population = True
prevent_arp_spoofing = True
[ovs]
local_ip = 192.168.1.103
bridge_mappings = provider:br-ex
[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
9、对/etc/neutron/l3_agent.ini做如下修改:
[DEFAULT]
...
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
10、对/etc/neutron/dhcp_agent.ini做如下修改:
[DEFAULT]
...
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
11、填充数据库
# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
12、重启服务
# systemctl restart neutron-server.service \
neutron-openvswitch-agent.service neutron-dhcp-agent.service \
neutron-metadata-agent.service neutron-l3-agent
13、新建外部网络桥接
# ovs-vsctl add-br br-ex
# ovs-vsctl add-port br-ex eno1
14、再次重启服务
# systemctl restart neutron-server.service \
neutron-openvswitch-agent.service neutron-dhcp-agent.service \
neutron-metadata-agent.service neutron-l3-agent
安装和配置计算节点
1、在/etc/sysctl.conf中添加如下配置:
net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0
net.bridge.bridge-nf-call-iptables=1
net.bridge.bridge-nf-call-ip6tables=1
然后用如下命令使之生效:
#sysctl -p
2、安装组件
# yum install neutron-openvswitch-agent -y
3、修改/etc/neutron/plugins/ml2/openvswitch_agent.ini文件:
[agent]
tunnel_types = vxlan
l2_population = True
prevent_arp_spoofing = True
[ovs]
local_ip = 192.168.1.104
[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
4、重启计算服务
# systemctl restart openstack-nova-compute.service
5、重启OVS
# systemctl restart neutron-openvswitch-agent
验证操作
# openstack network agent list
如果能看到控制节点和计算节点上的neutron-openvswitch-agent正常工作,那么配置成功。
- OpenStackNewton版本部署----用Openvswitch替换Linuxbridge
- 手动升级openvswitch版本以替换mininet自带的openvswitch
- Neutron总结-linuxbridge-agent换为openvswitch-agent
- openvswitch
- OpenvSwitch
- LinuxBridge介绍
- RDO多节点部署OpenStack Havana(多节点+vlan+openvswitch)
- 安装部署 替换
- 用REST获得openvswitch ovsdb的信息
- 手动替换GCC版本
- make版本替换
- make版本替换
- setLatestEventInfo 高版本替换
- neutron: linuxbridge 架构解析
- Linuxbridge-tap研究
- Linux-虚拟网络设备-LinuxBridge
- Release版本 替换掉NSLog
- 字符串替换各语言版本
- applicationContext.xml配置
- linux内核启动参数的传递
- 前端模块化,AMD与CMD的区别
- 解决springmvc加载JS,CSS等文件问题【转】
- 基于Python语言使用RabbitMQ消息队列(五)
- OpenStackNewton版本部署----用Openvswitch替换Linuxbridge
- YARN动态资源池配置案例
- 视频信号vsync hsync dotclock 的关系
- 在Delphi中动态地使用SQL查询语句
- 节假日管理-java swing+mysql
- 解除安卓手机锁
- 纳税服务系统【用户模块之用户唯一性校验】
- OpenCV中feature2D学习——ORB和BruteForceMatcher
- Linux基础-4