码迷,mamicode.com
首页 > 其他好文 > 详细

B10-openstack高可用(t版)-nova计算节点节点集群部署

时间:2020-06-14 14:24:37      阅读:116      评论:0      收藏:0      [点我收藏+]

标签:硬件加速   image   manage   安装   auth   lock   aging   linu   lld   

1. 安装nova-compute

全部计算节点安装nova-compute服务,以compute01节点为例

[root@compute01 ~]# yum install python-openstackclient openstack-utils openstack-selinux -y

[root@compute01 ~]# yum install openstack-nova-compute -y

 

2. 配置nova.conf

[root@compute01 ~]# egrep -v "^#|^$" /etc/nova/nova.conf
[DEFAULT]
enabled_apis = osapi_compute,metadata
transport_url = rabbit://openstack:huayun@10.100.214.200:5672
my_ip = 10.100.214.205
use_neutron = true
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[api]
auth_strategy = keystone
[api_database]
[barbican]
[cache]
[cinder]
[compute]
[conductor]
[console]
[consoleauth]
[cors]
[database]
[devices]
[ephemeral_storage_encryption]
[filter_scheduler]
[glance]
api_servers = http://10.100.214.200:9292
[guestfs]
[healthcheck]
[hyperv]
[ironic]
[key_manager]
[keystone]
[keystone_authtoken]
www_authenticate_uri = http://10.100.214.200:5000/
auth_url = http://10.100.214.200:5000/
memcached_servers = 10.100.214.201:11211,10.100.214.202:11211,10.100.214.203:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = nova
password = huayun

#  通过“egrep -c ‘(vmx|svm)‘ /proc/cpuinfo”命令查看主机是否支持硬件加速,返回1或者更大的值表示支持,返回0表示不支持; 支持硬件加速使用”kvm”类型,不支持则使用”qemu”类型;

[libvirt]

virt_type=kvm

[metrics]
[mks]
[neutron]
[notifications]
[osapi_v21]
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_middleware]
[oslo_policy]
[pci]
[placement]
region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://10.100.214.200:5000/v3
username = placement
password = huayun
[powervm]
[privsep]
[profiler]
[quota]
[rdp]
[remote_debug]
[scheduler]
[serial_console]
[service_user]
[spice]
[upgrade_levels]
[vault]
[vendordata_dynamic_auth]
[vmware]
[vnc]
enabled = true
server_listen = 0.0.0.0
server_proxyclient_address = $my_ip
novncproxy_base_url = http://10.100.214.200:6080/vnc_auto.html
[workarounds]
[wsgi]
[xenserver]
[xvp]
[zvm]

 

将配置文件拷贝到两外两个计算机点上去(并修改对应的配置)

[root@compute01 ~]# scp /etc/nova/nova.conf 10.100.214.207:/etc/nova/

[root@compute01 ~]# scp /etc/nova/nova.conf 10.100.214.206:/etc/nova/

 

3. 启动服务(全部计算节点启动)

[root@compute01 ~]# systemctl enable libvirtd.service openstack-nova-compute.service
[root@compute01 ~]# systemctl start libvirtd.service openstack-nova-compute.service

 

4. 向cell数据库添加计算节点

任意控制节点执行皆可

[root@controller01 ~]# source admin-openrc 

[root@controller01 ~]# openstack compute service list --service nova-compute

技术图片

 

 

1)手工发现计算节点

# 手工发现计算节点主机,即添加到cell数据库

[root@controller01 ~]# su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova

技术图片

 

 

2)自动发现计算节点

# 在全部控制节点操作;
# 为避免新加入计算节点时,手动执行注册操作”nova-manage cell_v2 discover_hosts”,可设置控制节点定时自动发现主机;
# 涉及控制节点nova.conf文件的[scheduler]字段;
# 如下设置自动发现时间为5min,可根据实际环境调节

[root@controller01 ~]# vim /etc/nova/nova.conf

[scheduler]
discover_hosts_in_cells_interval = 300

 

重启nova-api服务即可生效

[root@controller01 ~]# systemctl restart openstack-nova-api.service

 

B10-openstack高可用(t版)-nova计算节点节点集群部署

标签:硬件加速   image   manage   安装   auth   lock   aging   linu   lld   

原文地址:https://www.cnblogs.com/zhaopei123/p/13124661.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!