OpenStack实战八——Neutron计算节点部署

1. 安装组件

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

                                                                                                                                                                                               

2. 计算节点Neutron配置

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

(从node1将/etc/neutron/neutron.conf配置文件scp到/etc/neutron/,注意权限为root neutron)

[root@linux-node1 ~]# scp /etc/neutron/neutron.conf 192.168.56.12:/etc/neutron/
[root@linux-node2 ~]# chown -R root.neutron /etc/neutron/neutron.conf
  • 1.在[database] 部分,删除所有connection项,因为计算节点不直接访问数据库。

  • 2.删除node1在[nova]下的配置,notify两个通知配置注释掉,30行coreplugin、serviceplugins两个插件配置注释掉

  • 3.查看计算节点Neutron配置

    [root@linux-node2 ~]# grep '^[a-z]' /etc/neutron/neutron.conf
    auth_strategy = keystone
    rpc_backend = rabbit
    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 = $state_path/lock
    rabbit_host = 192.168.56.11
    rabbit_userid = openstack
    rabbit_password = openstack

                                        

3. 计算节点配置网络服务

3.1 编辑/etc/nova/nova.conf,在[neutron]部分,配置访问参数

[root@linux-node2 ~]# vim /etc/nova/nova.conf
[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

3.2 配置Linuxbridge代理

  • 1.与控制节点配置完全一样,从node1上将/etc/neutron/plugins/ml2/linuxbridge_agent.ini scp过来。

  • [root@linux-node1 ~]# scp /etc/neutron/plugins/ml2/linuxbridge_agent.ini 192.168.56.12:/etc/neutron/plugins/ml2/

                                                               

4. 完成安装

4.1 重启计算服务

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

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

[root@linux-node2 ~]# systemctl enable neutron-linuxbridge-agent.service
[root@linux-node2 ~]# systemctl start neutron-linuxbridge-agent.service

4.3 查看是否配置成功,能看到node2上的Linux bridge agent说明部署成功

[root@linux-node1 ~]# source admin-openstack.sh 
[root@linux-node1 ~]# neutron agent-list
+--------------------+--------------------+--------------------+-------------------+-------+----------------+-----------------------+
| id                 | agent_type         | host               | availability_zone | alive | admin_state_up | binary                |
+--------------------+--------------------+--------------------+-------------------+-------+----------------+-----------------------+
| 359b9e64-5cd1      | Metadata agent     | linux-             |                   | 🙂   | True           | neutron-metadata-     |
| -499d-             |                    | node1.example.com  |                   |       |                | agent                 |
| 8f94-5da454944257  |                    |                    |                   |       |                |                       |
| 935ffbe4-d5d1-4336 | Linux bridge agent | linux-             |                   | 🙂   | True           | neutron-linuxbridge-  |
| -a2ac-aabcbff3c154 |                    | node2.example.com  |                   |       |                | agent                 |
| bca4f7fc-9c45-4ba2 | DHCP agent         | linux-             | nova              | 🙂   | True           | neutron-dhcp-agent    |
| -83b6-5f5f9d1974e2 |                    | node1.example.com  |                   |       |                |                       |
| c549a7a4-2c0d-4842 | Linux bridge agent | linux-             |                   | 🙂   | True           | neutron-linuxbridge-  |
| -9620-9b1e19625947 |                    | node1.example.com  |                   |       |                | agent                 |
+--------------------+--------------------+--------------------+-------------------+-------+----------------+-----------------------+


anzhihe安志合个人博客,版权所有丨 如未注明,均为原创 丨转载请注明转自:https://chegva.com/2079.html | ☆★★每天进步一点点,加油!★★☆

您可能还感兴趣的文章!

发表评论

电子邮件地址不会被公开。 必填项已用*标注