Openstack入门篇(十二)之neutron服务(计算节点)的部署与测试

  • 1.Neutron组件安装

[root@linux-node2 ~]# yum install -y openstack-neutron-linuxbridge ebtables ipset
  • 2.配置通用组件

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

[root@linux-node2 ~]# vim /etc/neutron/neutron.conf
在[DEFAULT]部分,配置RabbitMQ消息队列访问权限:

[DEFAULT]
...
transport_url = rabbit://openstack:openstack@192.168.56.11
在 “[DEFAULT]” 和 “[keystone_authtoken]” 部分,配置认证服务访问:

[DEFAULT]
...
auth_strategy = keystone

[keystone_authtoken]
...
auth_uri = http://192.168.56.11:5000
auth_url = http://192.168.56.11:35357
memcached_servers = 192.168.56.11:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron
在 [oslo_concurrency] 部分,配置锁路径:

[oslo_concurrency]
...
lock_path = /var/lib/neutron/tmp
查看所有配置项:

[root@linux-node2 ~]# grep "^[a-z]" /etc/neutron/neutron.conf 
auth_strategy = keystone
transport_url = rabbit://openstack:openstack@192.168.56.11
auth_uri = http://192.168.56.11:5000
auth_url = http://192.168.56.11:35357
memcached_servers = 192.168.56.11:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron
lock_path = /var/lib/neutron/tmp
  • 3.配置linuxbridge代理

控制节点的/etc/neutron/plugins/ml2/linuxbridge_agent.ini配置文件和计算节点是一样的,可以使用scp拷贝过去

[root@linux-node1 ~]# scp /etc/neutron/plugins/ml2/linuxbridge_agent.ini root@192.168.56.12:/etc/neutron/plugins/ml2/
  • 4.配置计算服务来使用网络服务

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

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

[neutron]
...
url = http://192.168.56.11:9696
auth_url = http://192.168.56.11:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron
  • 5.完成安装

重启计算服务:

[root@linux-node2 ~]# systemctl restart openstack-nova-compute.service
启动Linuxbridge代理并配置它开机自启动:

[root@linux-node2 ~]# systemctl enable neutron-linuxbridge-agent.service
[root@linux-node2 ~]# systemctl start neutron-linuxbridge-agent.service
  • 6.在node1上查看是否成功启用

[root@linux-node1 ~]# neutron agent-list
[root@linux-node1 ~]# nova service-list

这两个出来的结果正常,才可以正常创建虚拟机

  • 7.底层网络变化

使用brctl show查看

 

此时node2上的虚拟机网络结构如下:
linux-node2作为计算节点,对应的tap设备为:tap31d0e21e-bb,并且连接到bridge

 

 

posted @ 2018-08-10 15:00  烟雨浮华  阅读(2495)  评论(0编辑  收藏  举报