Neutron组件安装
1
|
[root@linux-node2 ~]
# yum install openstack-neutron-linuxbridge ebtables ipset
|
配置通用组件
Networking 通用组件的配置包括认证机制、消息队列和插件
编辑``/etc/neutron/neutron.conf`` 文件并完成如下操作:
-
在``[database]`` 部分,注释所有``connection`` 项,因为计算节点不直接访问数据库。
-
在``[DEFAULT]``部分,配置``RabbitMQ``消息队列访问权限:
1
|
transport_url = rabbit:
//openstack
:openstack@192.168.56.11
|
-
在 “[DEFAULT]” 和 “[keystone_authtoken]” 部分,配置认证服务访问:
1
2
3
4
5
6
7
8
9
10
|
auth_strategy = keystone
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]
部分,配置锁路径:
1
|
lock_path =
/var/lib/neutron/tmp
|
配置计算使用的网络服务
配置Linuxbridge代理
这里的配置和控制节点上面是一样的,所以我们把控制节点配置拷贝过来
1
2
3
|
[root@linux-node1 ~]
# scp /etc/neutron/plugins/ml2/linuxbridge_agent.ini 192.168.56.12:/etc/neutron/plugins/ml2/
root@192.168.56.12's password:
linuxbridge_agent.ini
|
编辑``/etc/nova/nova.conf``文件并完成下面的操作:
-
在``[neutron]`` 部分,配置访问参数:
1
2
3
4
5
6
7
8
9
10
|
[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
|
安装完成
重启计算服务:
1
2
3
4
|
[root@linux-node2 ~]
# systemctl restart openstack-nova-compute.service
[root@linux-node2 ~]
# ps aux|grep nova
nova 21400 56.7 6.9 1661432 130576 ? Ssl 23:19 0:11
/usr/bin/python2
/usr/bin/nova-compute
root 21433 0.0 0.0 112644 952 pts
/0
S+ 23:19 0:00
grep
--color=auto nova
|
启动Linuxbridge代理并配置它开机自启动:
1
2
3
|
[root@linux-node2 ~]
# systemctl enable neutron-linuxbridge-agent.service
Created
symlink
from
/etc/systemd/system/multi-user
.target.wants
/neutron-linuxbridge-agent
.service to
/usr/lib/systemd/system/neutron-linuxbridge-agent
.service.
[root@linux-node2 ~]
# systemctl start neutron-linuxbridge-agent.service
|
验证服务
我们从控制节点上来查看是否接收到计算节点:
1
2
3
4
5
6
7
8
9
|
[root@linux-node1 ~]
# neutron agent-list
+--------------------------------------+--------------------+-------------+-------------------+-------+----------------+---------------------------+
|
id
| agent_type | host | availability_zone | alive | admin_state_up | binary |
+--------------------------------------+--------------------+-------------+-------------------+-------+----------------+---------------------------+
| 030154d2-c9ad-4af1-91db-ea1bf01bb99f | Metadata agent | linux-node1 | | :-) | True | neutron-metadata-agent |
| 27e1ee2f-6224-4a79-b3a5-ad0f46e59c4a | DHCP agent | linux-node1 | nova | :-) | True | neutron-dhcp-agent |
| 900f0ace-c809-4493-89b0-caf0094b217a | Linux bridge agent | linux-node2 | | :-) | True | neutron-linuxbridge-agent |
| f0b914bc-ab5b-4304-89a6-29d36d809705 | Linux bridge agent | linux-node1 | | :-) | True | neutron-linuxbridge-agent |
+--------------------------------------+--------------------+-------------+-------------------+-------+----------------+---------------------------+
|
这里我们可以看到host里面已经找到了计算节点
1
2
3
4
5
6
7
8
9
|
[root@linux-node1 ~]
# nova service-list
+----+------------------+-------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+-------------+----------+---------+-------+----------------------------+-----------------+
| 3 | nova-consoleauth | linux-node1 | internal | enabled | up | 2017-01-02T20:27:14.000000 | - |
| 4 | nova-conductor | linux-node1 | internal | enabled | up | 2017-01-02T20:27:15.000000 | - |
| 5 | nova-scheduler | linux-node1 | internal | enabled | up | 2017-01-02T20:27:15.000000 | - |
| 6 | nova-compute | linux-node2 | nova | enabled | up | 2017-01-02T20:27:19.000000 | - |
+----+------------------+-------------+----------+---------+-------+----------------------------+-----------------+
|
到此计算节点的服务安装成功~~~~~~~
下面我们将学习启动实例!!!
本文转自 kesungang 51CTO博客,原文链接:http://blog.51cto.com/sgk2011/1888617,如需转载请自行联系原作者