Nova具体功能如下:
1 实例生命周期管理
2 管理计算资源
3 网络和认证管理
4 REST风格的API
5 异步的一致性通信
6 Hypervisor透明:支持Xen,XenServer/XCP, KVM, UML, VMware vSphere and Hyper-V

7.1 部署与配置nova - compute162

#安装包

apt install nova-compute -y

#备份nova配置

cp /etc/nova/nova.conf /etc/nova/nova.conf.bak
egrep -v "^$|^#" /etc/nova/nova.conf.bak >/etc/nova/nova.conf

#配置nova配置文件,在对应项底下增加以下字段
#vim /etc/nova/nova.conf


[DEFAULT]
# ...
my_ip = 172.16.1.162
transport_url = rabbit://rabbitmq:rabbitmq.123@controller160:5672/

[api]
# ...
auth_strategy = keystone

[keystone_authtoken]
# ...
www_authenticate_uri = http://controller160:5000
auth_url = http://controller160:5000
memcached_servers = controller160:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = nova
password = nova.123

[vnc]
enabled = true
# ...
enabled = true
server_listen = 0.0.0.0
server_proxyclient_address = $my_ip
novncproxy_base_url = http://controller160:6080/vnc_auto.html

[glance]
# ...
api_servers = http://controller160:9292

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

[placement]
# ...
region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://controller160:5000/v3
username = placement
password = placement.123

#根据实际硬件支持填写支持项qemu/kvm
#vim /etc/nova/nova-compute.conf

[libvirt]
# ...
virt_type = qemu

#重启nova服务,并配置开机启动:

systemctl enable nova-compute
systemctl restart nova-compute
systemctl status nova-compute

7.2 nova-compute服务验证 - controller160

#加载管理凭证

source adminrc.sh

#查看计算节点列表

openstack compute service list

#输出

+----+----------------+---------------+----------+---------+-------+----------------------------+
| ID | Binary         | Host          | Zone     | Status  | State | Updated At                 |
+----+----------------+---------------+----------+---------+-------+----------------------------+
|  1 | nova-scheduler | controller160 | internal | enabled | up    | 2020-05-20T07:18:40.000000 |
|  3 | nova-conductor | controller160 | internal | enabled | up    | 2020-05-20T07:18:39.000000 |
| 11 | nova-compute   | compute162    | nova     | enabled | up    | 2020-05-20T07:18:32.000000 |
+----+----------------+---------------+----------+---------+-------+----------------------------+

#发现计算节点:

su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova

#输出

Found 2 cell mappings.
Skipping cell0 since it does not contain hosts.
Getting computes from cell 'cell1': 74d4b65d-4d9c-4699-885e-4a773e295ef8
Checking host mapping for compute host 'compute162': 3b00aa80-d3bf-4b55-9b24-b1e25a3273b4
Creating host mapping for compute host 'compute162': 3b00aa80-d3bf-4b55-9b24-b1e25a3273b4
Found 1 unmapped computes in cell: 74d4b65d-4d9c-4699-885e-4a773e295ef8

#计算节点自动发现配置,在nova.conf添加如下配置
vim /etc/nova/nova.conf

[scheduler]
discover_hosts_in_cells_interval = 300

#执行状态检查,都为success为正常

nova-status upgrade check

#输出

+--------------------------------+
| Upgrade Check Results          |
+--------------------------------+
| Check: Cells v2                |
| Result: Success                |
| Details: None                  |
+--------------------------------+
| Check: Placement API           |
| Result: Success                |
| Details: None                  |
+--------------------------------+
| Check: Ironic Flavor Migration |
| Result: Success                |
| Details: None                  |
+--------------------------------+
| Check: Cinder API              |
| Result: Success                |
| Details: None                  |
+--------------------------------+

至此,nova-compute服务已部署完毕,如有问题请联系我改正,感激不尽!

7.x 部署过程遇到的问题汇总

eg1. 查看节点是否支持硬件加速
egrep -c '(vmx|svm)' /proc/cpuinfo
输出为0时,/etc/nova/nova-compute.conf配置需要更改成以下项
virt_type = qemu
输出为1时,更改成
virt_type = kvm
Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐