OpenStack kilo版DVR功能搭建小记

一、基本环境部署

环境说明:4 节点,每节点三个网卡,第一个网卡做管理用,第二个网卡做内部tunnel网络,第三个网卡做外部网络:
节点角色 管理网络IP 内部tunnel网络 外部网络
dvr-controller 172.16.30.2 172.16.40.2 172.16.50.2
dvr-network 172.16.30.6 172.16.40.6 172.16.50.6
dvr-dvr-compute1 172.16.30.7 172.16.40.7 172.16.50.7
compute2 172.16.30.8 172.16.40.8 172.16.50.8

根据官方安装部署文档搭建环境(使用neutron传统模式),搭建过程省略。

二、DVR相关配置

本部分主要记录在第一部分基础上需要修改哪些配置才能使用DVR功能。

1. 配置控制节点:

neutron/neutron.conf

[DEFAULT]

router_distributed = True

dhcp_agents_per_network = 计算节点+网络节点数 


/etc/neutron/plugins/ml2/ml2_conf.ini

[ml2]

mechanism_drivers = openvswitch,l2population


[agent]

l2_population = True

enable_distributed_routing = True 


  重启neutron-server

systemctl restart neutron-server.service

2. 配置网络节点:

    neutron/neutron.conf

[DEFAULT]

router_distributed = True

dhcp_agents_per_network = 计算节点+网络节点数 


    /etc/neutron/plugins/ml2/ml2_conf.ini

[ml2]

mechanism_drivers = openvswitch,l2population


[agent]

l2_population = True

enable_distributed_routing = True


    neutron/l3_agent.ini

agent_mode = dvr_snat

 

    重启neutron-agent

systemctl restart openvswitch.service

systemctl restart neutron-openvswitch-agent.service

systemctl restart neutron-l3-agent.service 

systemctl restart neutron-dhcp-agent.service 

systemctl restart neutron-metadata-agent.service

3. 配置计算节点:

    neutron/neutron.conf

[DEFAULT]

router_distributed = True

dhcp_agents_per_network = 计算节点+网络节点数 

    

    /etc/neutron/plugins/ml2/ml2_conf.ini

[ml2]

mechanism_drivers = openvswitch,l2population

 

[agent]

l2_population = True

arp_responder = True

enable_distributed_routing = True

 

[ovs]

bridge_mappings = external:br-ex                

计算节点上有FloatingIP的VM,数据是用过该节点上的Vrouter直接出去的,所以要创建br-ex桥(后边有创建) 


    neutron/l3_agent.ini

[DEFAULT]

interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver

use_namespaces = True

external_network_bridge = 

 

agent_mode = dvr

计算节点上需要额外运行L3-agent Metadata-agent。

 

neutron/metadata_agent.ini

 [DEFAULT]

auth_uri = http://dvr-controller:5000

auth_url = http://dvr-controller:35357

auth_region = RegionOne

auth_plugin = password

project_domain_id = default

user_domain_id = default

project_name = service

username = neutron

password = 123456

 

metadata_proxy_shared_secret =12345678

nova_metadata_ip = dvr-controller

 

 计算节点上要创建br-exovs桥,并将对应的接口加进去

ovs-vsctl add-br br-ex

ovs-vsctl add-port br-ex eth2

 

修改ifcfg-eth2 和 ifcfg-br-ex,固化相应的IP地址(省略);

重启网络服务;

systemctl restart network.service

 

在计算节点上启动l3-agent和metadata-agent

systemctl enable neutron-metadata-agent.service

systemctl restart neutron-metadata-agent.service

systemctl enable neutron-l3-agent.service

systemctl restart neutron-l3-agent.service

 

总结重点:

1、计算节点上需要额外运行L3-agent Metadata-agent

2、在测试验证DVR功能前,需要将所有之前测试非DVR功能时创建的网络资源删除,重建。

你可能感兴趣的:(OpenStack kilo版DVR功能搭建小记)