OpenStack Mitaka部署<五;

Posted _诺千金

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了OpenStack Mitaka部署<五;相关的知识,希望对你有一定的参考价值。

本文介绍OpenvSwitch + vxlan部署,是在之前LinuxBridge + vxlan之上将LinuxBridge删除,替换为OVS

​共计两个节点,控制节点和计算节点

controller:

eth0:192.168.8.11 管理

eth1:172.168.0.11 隧道

eth2:没有IP none 外网

compute01:

eth0:192.168.8.31 管理

eth1:172.168.0.31 隧道

eth2:没有IP none 外网

其中,eth0放在同一个网络内,eth1放在同一个网络内,eth2放在同一个网络内


具体配置如下:

两个节点都执行:

# yum remove openstack-neutron-linuxbridge

# yum install openstack-neutron-openvswitch


控制节点:

[root@controller ~]# cat /etc/neutron/plugins/ml2/ml2_conf.ini

[DEFAULT]

[ml2]

type_drivers = flat,vxlan

tenant_network_types = vxlan

mechanism_drivers = openvswitch,l2population

extension_drivers = port_security

[ml2_type_geneve]

[ml2_type_gre]

[ml2_type_vlan]

[ml2_type_vxlan]

vni_ranges = 1001:2000

[securitygroup]

enable_ipset = True


br-ex是外部网络  后面需要手工创建

[root@controller ~]# cat /etc/neutron/plugins/ml2/openvswitch_agent.ini

[DEFAULT]

[agent]

tunnel_types = vxlan

l2_population = True

[ovs]

bridge_mappings = external:br-ex

tunnel_bridge = br-tun

local_ip = 172.16.0.11

[securitygroup]

enable_security_group = True

firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver


[root@controller ~]# cat /etc/neutron/l3_agent.ini

[DEFAULT]

interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver

external_network_bridge = br-ex

[AGENT]


[root@controller ~]# cat /etc/neutron/dhcp_agent.ini

[DEFAULT]

interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver

dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq

enable_isolated_metadata = True

[AGENT]


计算节点:

[root@computer01 ~]# cat /etc/neutron/plugins/ml2/openvswitch_agent.ini

[DEFAULT]

[agent]

tunnel_types = vxlan

l2_population = True

[ovs]

bridge_mappings = external:br-ex

tunnel_bridge = br-tun

local_ip = 172.16.0.31

[securitygroup]

enable_security_group = True

firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver


neutron数据库我也删除了,按照文档重新创建了

# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
# 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


服务:

控制节点:

systemctl enable neutron-server.service \\

neutron-openvswitch-agent.service neutron-dhcp-agent.service \\

neutron-metadata-agent.service

systemctl restart neutron-server.service \\

neutron-openvswitch-agent.service neutron-dhcp-agent.service \\

neutron-metadata-agent.service

计算节点:

systemctl enable neutron-openvswitch-agent.service

systemctl start neutron-openvswitch-agent.service


[root@controller ~]# cat admin_openrc

export OS_PROJECT_DOMAIN_NAME=default

export OS_USER_DOMAIN_NAME=default

export OS_PROJECT_NAME=admin

export OS_USERNAME=admin

export OS_PASSWORD=ADMIN_PASS

export OS_AUTH_URL=http://controller:35357/v3

export OS_IDENTITY_API_VERSION=3

export OS_IMAGE_API_VERSION=2

[root@controller ~]# . admin_openrc

[root@controller ~]# neutron agent-list

+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+

| id | agent_type | host | availability_zone | alive | admin_state_up | binary |

+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+

| 02b51535-737f-4d52-b603-c21f2e19962d | Open vSwitch agent | controller | | :-) | True | neutron-openvswitch-agent |

| 55c6f5df-1bdd-4361-90f3-4c8ebdb56b1c | Metadata agent | controller | | :-) | True | neutron-metadata-agent |

| a9522892-1f20-476c-9828-7e03dcecc192 | Open vSwitch agent | computer01 | | :-) | True | neutron-openvswitch-agent |

| bf7cb573-9c1e-485f-9ccc-bab46b6ecb60 | L3 agent | controller | nova | :-) | True | neutron-l3-agent |

| f37d9584-6763-4093-b679-4fe14f05cf2f | DHCP agent | controller | nova | :-) | True | neutron-dhcp-agent |

+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+


创建外网的br-ex

两个节点都执行(eth2上面不需要IP,只需要和外网交换机相连接即可,网卡配置文件方式为none就行):

# ovs-vsctl add-br br-ex

# ovs-vsctl add-port br-ex eth2


用admin账号登陆 密码ADMIN_PASS

管理员→网络 创建网络 创建一个vxlan网络 tag是100

以上是关于OpenStack Mitaka部署<五;的主要内容,如果未能解决你的问题,请参考以下文章

OpenStack Mitaka部署<三;

OpenStack Mitaka HA部署方案(随笔)

openstack项目day24:OpenStack mitaka部署

Openstack Mitaka for Centos7.2 部署指南

OpenStack mitaka DevStack 部署

学习OpenStack Mitaka单节点部署笔记