其他分享
首页 > 其他分享> > A07. openstack架构实战-neutron计算节点安装

A07. openstack架构实战-neutron计算节点安装

作者:互联网

计算节点neutron的安装

一:安装neutron相关软件包

ipset使用来批量控制iptables工具的

[root@compute01 ~]#  yum install -y  openstack-neutron-linuxbridge ebtables ipset

 

network的相关配置

Networking 通用组件的配置包括认证机制、消息队列和插件。

二:编辑``/etc/neutron/neutron.conf`` 文件并完成如下操作:

1:在``[database]`` 部分,注释所有``connection`` 项,因为计算节点不直接访问数据库。

       在 “[DEFAULT]” 和 “[oslo_messaging_rabbit]”部分,配置 “RabbitMQ” 消息队列的连接:

[DEFAULT]
transport_url = rabbit://openstack:huayun@controller01

2:在 “[DEFAULT]” 和 “[keystone_authtoken]” 部分,配置认证服务访问

[DEFAULT]
auth_strategy = keystone

[keystone_authtoken]
auth_uri = http://controller01:5000
auth_url = http://controller01:35357
memcached_servers = controller01:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = huayun

3:在 [oslo_concurrency] 部分,配置锁路径:

[oslo_concurrency]
lock_path = /var/lib/neutron/tmp

 

三:配置网络(这里选择公共网络进行配置)

配置Linuxbridge代理

Linuxbridge代理为实例建立layer-2虚拟网络并且处理安全组规则。

编辑``/etc/neutron/plugins/ml2/linuxbridge_agent.ini``文件并且完成以下操作:

1:在``[linux_bridge]``部分,将公共虚拟网络和公共物理网络接口对应起来

[linux_bridge]
physical_interface_mappings = provider:ens192

2:在``[vxlan]``部分,禁止VXLAN覆盖网络:

[vxlan]
enable_vxlan = false

3:在 ``[securitygroup]``部分,启用安全组并配置 Linuxbridge iptables firewall driver:

[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

 

4: 通过验证以下所有sysctl值是否设置为确保Linux操作系统内核支持网桥过滤器(要启用网络桥接器支持,通常br_netfilter需要加载内核模块。)

[root@compute01 ~]# echo "net.bridge.bridge-nf-call-iptables = 1" >> /etc/sysctl.conf
[root@compute01 ~]# echo "net.bridge.bridge-nf-call-ip6tables = 1" >> /etc/sysctl.conf

sysctl -p
modinfo br_netfilter
modprobe br_netfilter

5:为计算节点配置网络服务

编辑``/etc/nova/nova.conf``文件并完成下面的操作

在``[neutron]`` 部分,配置访问参数:

[neutron]
url = http://controller01:9696
auth_url = http://controller01:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = huayun

完成安装

重启计算服务:

[root@compute01 ~]# systemctl restart openstack-nova-compute.service

启动Linuxbridge代理并配置它开机自启动:

[root@compute01 ~]# systemctl enable neutron-linuxbridge-agent.service && systemctl start  neutron-linuxbridge-agent.service

校验

[root@controller01 ~]# neutron agent-list
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
+--------------------------------------+--------------------+--------------+-------------------+-------+----------------+---------------------------+
| id                                   | agent_type         | host         | availability_zone | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+--------------+-------------------+-------+----------------+---------------------------+
| 0ed9a50d-d805-4cb4-bdb0-f09cb496af0b | Linux bridge agent | compute01    |                   | :-)   | True           | neutron-linuxbridge-agent |
| af066e09-2b33-4742-a342-917c0e55b4d3 | DHCP agent         | controller01 | nova              | :-)   | True           | neutron-dhcp-agent        |
| cf9adb65-b6c4-4088-9d22-96967b4505c5 | Linux bridge agent | controller01 |                   | :-)   | True           | neutron-linuxbridge-agent |
| ee2e8e9a-4512-48e9-8dc2-e3f262f433bc | Metadata agent     | controller01 |                   | :-)   | True           | neutron-metadata-agent    |
+--------------------------------------+--------------------+--------------+-------------------+-------+----------------+---------------------------+

 

标签:linuxbridge,bridge,name,A07,agent,controller01,openstack,neutron
来源: https://www.cnblogs.com/zhaopei123/p/12955629.html