一、服务安装(计算节点)
安装软件:
# yum install openstack-nova-compute -y
编辑/etc/nova/nova.conf文件并设置如下内容:
# vim /etc/nova/nova.conf
[DEFAULT]
enabled_apis = osapi_compute,metadata
transport_url = rabbit://openstack:openstack123@10.10.11.11
my_ip = 10.10.11.12
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[api]
auth_strategy = keystone
[keystone_authtoken]
auth_uri = http://10.10.11.11:5000
auth_url = http://10.10.11.11:35357
memcached_servers = 10.10.11.11:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova123
[vnc]
enabled = True
server_listen = 0.0.0.0
server_proxyclient_address = $my_ip
novncproxy_base_url = http://10.10.11.11:6080/vnc_auto.html
[glance]
api_servers = http://10.10.11.11:9292
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
[placement]
os_region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://10.10.11.11:35357/v3
username = placement
password = placement123
检测当前计算节点是否支持硬件虚拟化
# egrep -c '(vmx|svm)' /proc/cpuinfo
我使用的虚拟机,这里返回0,明显我不支持硬件虚拟化
可以编辑/etc/nova/nova.conf文件设置qemu来提供软件虚拟化
# vim /etc/nova/nova.conf
[libvirt]
virt_type = qemu
设置服务的开机自启动,并启动计算服务:
# systemctl enable libvirtd.service openstack-nova-compute.service
# systemctl start libvirtd.service openstack-nova-compute.service
# systemctl status libvirtd.service openstack-nova-compute.service
二、向cell数据库添加计算节点(控制节点)
添加admin环境变量:
# source admin-openrc
执行下面的命令,查看计算节点信息是否已经在数据库:
# openstack compute service list --service nova-compute
发现计算节点:
# su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
三、验证可用性(控制节点)
添加admin环境变量:
# source admin-openrc
列出计算服务的运行状态:
# openstack compute service list
列出认证服务的端口:
# openstack catalog list
列出镜像信息,确认能访问镜像服务:
# openstack image list
确认cells和placement api成功运行:
# nova-status upgrade check