私有云 Openstack Ocata版安装(六)计算节点安装和配置neutron组件

  • A+
所属分类:OpenStack  虚拟化/私有云
摘要

部署Openstack的服务器官方推荐两台以上,主要是创建的实例(Instances)实际上占用的是计算节点的资源,因此你的计算节点所拥有的VCPU、Memory,将决定你所创建的实例的最大Vcpu数和内存,或许是基于此种原因考虑,官方建议控制节点和计算节点分离,我此次部署是基于Vmware虚拟机,主要是用于测试环境,因此规划为单控制节点和两个计算节点,本系列会涉及到的部署组件为keystone,glance,nova,neutron,cinder,dashboard。我这次是在三台CentOS 7的服务器进行部署。

私有云 Openstack Ocata版安装(一)Controller部署:https://www.dwhd.org/20180213_234933.html

私有云 Openstack Ocata版安装(二)glance组件的安装和配置:https://www.dwhd.org/20180213_234933.html

私有云 Openstack Ocata版安装(三)nova组件的安装和配置:https://www.dwhd.org/20180214_163005.html

私有云 Openstack Ocata版安装(四)安装并配置计算节点:https://www.dwhd.org/20180214_220255.html

私有云 Openstack Ocata版安装(五)控制节点安装和配置neutron组件:https://www.dwhd.org/20180214_235838.html

一:集群信息简介

节点名 网卡IP 网络和网关 运行业务 配置 系统
Openstack Controller 192.168.200.101
172.18.100.1
172.28.100.1
192.168.200/24   192.168.200.2
172.18.0.0/16      172.18.0.1
172.28.0.0/16      172.28.0.1
MySQL、RabbitMQ、Memcached、Keystone、Glance、Nova、Neutron 4c8g100G CentOS 7.4.1708
Openstack Computer 192.168.200.102
172.18.100.2
172.28.100.2
192.168.200/24   192.168.200.2
172.18.0.0/16      172.18.0.1
172.28.0.0/16      172.28.0.1
Nova-Compute、Neutron 4c8g100G CentOS 7.4.1708
Openstack Network 192.168.200.103
172.18.100.3
172.28.100.3
192.168.200/24   192.168.200.2
172.18.0.0/16      172.18.0.1
172.28.0.0/16      172.28.0.1
4c4g40G CentOS 7.4.1708

二:安装和配置计算节点 (一下内容在计算节点上执行)

计算节点处理实例的连接性和安全性组。安装并配置服务组件

1.安装组件

[root@LB-VM-Node-192_168_200_102 ~]# yum install -y openstack-neutron-linuxbridge ebtables ipset

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

A.在[DEFAULT]小节,配置 RabbitMQ 消息队列访问信息:

[DEFAULT]
# ...
transport_url = rabbit://openstack:MDNiMDhh@controller

B.在[DEFAULT]和[keystone_authtoken]小节,配置身份服务访问信息:

[DEFAULT]
# ...
auth_strategy = keystone
[keystone_authtoken]
# ...
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = lookback

C. 在[oslo_concurrency]小节,配置锁路径:

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

3.配置 Linux bridge agent

Linux bridge agent 为云主机和处理安全组建立二层虚拟网络基础。

1. 编辑/etc/neutron/plugins/ml2/linuxbridge_agent.ini 文件并完成下列操作:

A. 在[linux_bridge]小节,映射 provider 虚拟网络到 provider 物理网络接口:

[linux_bridge]
physical_interface_mappings = provider: eth1

B. 在[vxlan]小节,启用 VXLAN 覆盖网络,配置处理覆盖网络物理网络接口的 IP 地址。启用 layer-2 population:

[vxlan]
enable_vxlan = true
local_ip = OVERLAY_INTERFACE_IP_ADDRESS
l2_population = true

C. 在[securitygroup]小节,启用安全组并配置 Linux bridge iptables 防火墙驱动:

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

我的配置样例

[root@LB-VM-Node-192_168_200_102 ~]# grep -Ev '^(#|$)' /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[DEFAULT]
[agent]
[linux_bridge]
physical_interface_mappings = provider: eth1
[securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
[vxlan]
enable_vxlan = true
local_ip = 192.168.200.102
l2_population = true
[root@LB-VM-Node-192_168_200_102 ~]#

私有云 Openstack Ocata版安装(六)计算节点安装和配置neutron组件

4.配置计算服务使用 neutron 网络

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

在[neutron]小节,配置访问参数,启用元数据代理,并配置共享秘钥:

[neutron]
# ...
url = http://controller:9696
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = lookback

私有云 Openstack Ocata版安装(六)计算节点安装和配置neutron组件

5.完成安装

A.重新启动计算服务:

[root@LB-VM-Node-192_168_200_102 ~]# systemctl restart openstack-nova-compute.service
[root@LB-VM-Node-192_168_200_102 ~]# systemctl status openstack-nova-compute.service
● openstack-nova-compute.service - OpenStack Nova Compute Server
   Loaded: loaded (/usr/lib/systemd/system/openstack-nova-compute.service; enabled; vendor preset: disabled)
   Active: active (running) since 四 2018-02-15 01:46:16 CST; 7s ago
 Main PID: 25967 (nova-compute)
   CGroup: /system.slice/openstack-nova-compute.service
           └─25967 /usr/bin/python2 /usr/bin/nova-compute

2月 15 01:46:13 LB-VM-Node-192_168_200_102.dwhd.org systemd[1]: Starting OpenStack Nova Compute Server...
2月 15 01:46:16 LB-VM-Node-192_168_200_102.dwhd.org systemd[1]: Started OpenStack Nova Compute Server.
[root@LB-VM-Node-192_168_200_102 ~]#

私有云 Openstack Ocata版安装(六)计算节点安装和配置neutron组件

B. 启动Linux桥接代理,并在系统启动时将其配置为启动:

[root@LB-VM-Node-192_168_200_102 ~]# 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@LB-VM-Node-192_168_200_102 ~]# systemctl start neutron-linuxbridge-agent.service
[root@LB-VM-Node-192_168_200_102 ~]# 

私有云 Openstack Ocata版安装(六)计算节点安装和配置neutron组件

lookback

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: