OpenStack Mitaka部署<五;

蹉跎莫遣韶光老,人生唯有读书好。这篇文章主要讲述OpenStack Mitaka部署< 五; 相关的知识,希望能为你提供帮助。
本文介绍OpenvSwitch + vxlan部署,是在之前LinuxBridge + vxlan之上将LinuxBridge删除,替换为OVS
?
?共计两个节点,控制节点和计算节点
controller:
eth0:192.168.8.11管理
eth1:172.168.0.11隧道
eth2:没有IPnone外网
compute01:
eth0:192.168.8.31管理
eth1:172.168.0.31隧道
eth2:没有IPnone外网
其中,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
【OpenStack Mitaka部署< 五; 】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 = https://www.songbingjia.com/android/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

    推荐阅读