一) Neutron计算节点部署
1、安装软件包
# yum install -y openstack-neutron-linuxbridge ebtables ipset
2、配置文件neutron.conf
因为neutron控制节点跟计算节点配置几乎一样,直接复制控制节点的文件到计算节点,将不同的部分进行修改。
[root@controller ~]# scp -p /etc/neutron/neutron.conf root@compute:/etc/neutron/
注意:需保持权限相同
编辑配置文件neutron.conf
# vim /etc/neutron/neutron.conf [database] #connection = # 删除mysql连接路径 [nova] # 删除nova标签下keystone配置,所有配置 #notify_nova_on_port_status_changes = true # 注释 #notify_nova_on_port_data_changes = true # 注释 #core_plugin = ml2 # 注释 #service_plugins = # 注释
[neutron] url = http://controller:9696 auth_url = http://controller:35357 auth_type = password project_domain_name = Default user_domain_name = Default region_name = RegionOne project_name = service username = neutron password = redhat
编辑配置文件linuxbridge_agent.ini
[root@compute ~]# vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini [linux_bridge] #将公共虚拟网络和公共物理网络接口对应起来 physical_interface_mappings = provider:ens33 [vxlan] #禁止VXLAN覆盖网络 enable_vxlan = False [securitygroup] #启用安全组并配置防火墙驱动 enable_security_group = True firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
重启计算节点nova-compute
# systemctl restart openstack-nova-compute.service
启动Linuxbridge代理并配置它开机自启动
systemctl enable neutron-linuxbridge-agent.service systemctl start neutron-linuxbridge-agent.service
进入控制节点(controller)检查
[root@controller ~]# source admin-openrc [root@controller ~]# neutron agent-list +-------------------+-------------------+------------+-------------------+-------+----------------+----------------------+ | id | agent_type | host | availability_zone | alive | admin_state_up | binary | +-------------------+-------------------+------------+-------------------+-------+----------------+----------------------+ | 52c06adb-97d7 | Linux bridge | compute | | :-) | True | neutron-linuxbridge- | | -48fc-ab8f- | agent | | | | | agent | | 3165037e9eed | | | | | | | | 7e69f611-7e35 | Linux bridge | controller | | :-) | True | neutron-linuxbridge- | | -440a-8aac- | agent | | | | | agent | | a4fa08946fbb | | | | | | | | 89f3c190-c40c- | DHCP agent | controller | nova | :-) | True | neutron-dhcp-agent | | 43cf- | | | | | | | | 9aa8-3a775e82f03e | | | | | | | | ee2178cd-b510 | Metadata agent | controller | | :-) | True | neutron-metadata- | | -487c-b28f- | | | | | | agent | | acb04d87b9bd | | | | | | | +-------------------+-------------------+------------+-------------------+-------+----------------+----------------------