Openstack 云计算(二): Openstack Rocky部署四 neutron 部署与验证 (计算节点)

标签(空格分隔): openstack系列


  • 一: 在计算节点安装neutron

# Install and configure compute node
https://docs.openstack.org/neutron/rocky/install/compute-install-rdo.html

安装neutron组件

yum install openstack-neutron-linuxbridge ebtables ipset -y

Openstack Rocky部署四 neutron 部署与验证(计算节点)_第1张图片

快速配置/etc/neutron/neutron.conf

openstack-config --set /etc/neutron/neutron.conf DEFAULT transport_url  rabbit://openstack:openstack@controller
openstack-config --set /etc/neutron/neutron.conf DEFAULT auth_strategy keystone
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken www_authenticate_uri  http://controller:5000
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_url http://controller:5000
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken memcached_servers controller:11211
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_type password
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken project_domain_name default
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken user_domain_name default
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken project_name service
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken username neutron
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken password neutron
openstack-config --set /etc/neutron/neutron.conf oslo_concurrency lock_path /var/lib/neutron/tmp

Openstack Rocky部署四 neutron 部署与验证(计算节点)_第2张图片


egrep -v '(^$|^#)' /etc/neutron/neutron.conf

Openstack Rocky部署四 neutron 部署与验证(计算节点)_第3张图片

快速配置/etc/neutron/plugins/ml2/linuxbridge_agent.ini

openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini linux_bridge physical_interface_mappings  provider:ens33
openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini vxlan enable_vxlan false
openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini securitygroup enable_security_group true
openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini securitygroup firewall_driver neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

10.png-62.8kB

Openstack Rocky部署四 neutron 部署与验证(计算节点)_第4张图片

配置nova计算服务与neutron网络服务协同工作

openstack-config --set /etc/nova/nova.conf neutron url http://controller:9696
openstack-config --set /etc/nova/nova.conf neutron auth_url http://controller:5000
openstack-config --set /etc/nova/nova.conf neutron auth_type password
openstack-config --set /etc/nova/nova.conf neutron project_domain_name default
openstack-config --set /etc/nova/nova.conf neutron user_domain_name default
openstack-config --set /etc/nova/nova.conf neutron region_name RegionOne
openstack-config --set /etc/nova/nova.conf neutron project_name service 
openstack-config --set /etc/nova/nova.conf neutron username neutron
openstack-config --set /etc/nova/nova.conf neutron password neutron

Openstack Rocky部署四 neutron 部署与验证(计算节点)_第5张图片

Openstack Rocky部署四 neutron 部署与验证(计算节点)_第6张图片

重新启动计算节点

systemctl restart openstack-nova-compute.service
systemctl status openstack-nova-compute.service

Openstack Rocky部署四 neutron 部署与验证(计算节点)_第7张图片

启动neutron网络组件,并配置开机自启动

# 需要启动1个服务,网桥代理
systemctl restart neutron-linuxbridge-agent.service
systemctl status neutron-linuxbridge-agent.service

systemctl enable neutron-linuxbridge-agent.service
systemctl list-unit-files |grep neutron* |grep enabled

Openstack Rocky部署四 neutron 部署与验证(计算节点)_第8张图片

至此,计算节点的网络配置完成,转回到控制节点进行验证操作
在控制节点检查确认neutron服务安装成功

# Verify operation
https://docs.openstack.org/neutron/rocky/install/verify.html

# 以下命令在控制节点执行
1)获取管理权限
cd /openstack
source keystone-admin-pass.sh
2)列表查看加载的网络插件
openstack extension list --network

neutron ext-list

Openstack Rocky部署四 neutron 部署与验证(计算节点)_第9张图片

Openstack Rocky部署四 neutron 部署与验证(计算节点)_第10张图片

查看网络代理列表
openstack network agent list

Openstack Rocky部署四 neutron 部署与验证(计算节点)_第11张图片

正常情况下:控制节点有3个服务,计算节点有1个服务,如果不是,需要检查计算节点配置:网卡名称,IP地址,端口,密码等要素