B10-openstack高可用(t版)-nova计算节点节点集群部署
Posted zhaopei123
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了B10-openstack高可用(t版)-nova计算节点节点集群部署相关的知识,希望对你有一定的参考价值。
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计算节点节点集群部署的主要内容,如果未能解决你的问题,请参考以下文章
高可用OpenStack(Queen版)集群-16.Nova集成Ceph
B11-openstack高可用(t版)-Neutron控制/网络节点集群