S1_搭建分佈式OpenStack集羣_07 nova服務配置 (計算節點)

1、服務安裝(計算節點)
安裝軟件:
# 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

2、向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

3、驗證可用性(控制節點)
添加admin環境變量:
# source admin-openrc

列出計算服務的運行狀態:
# openstack compute service list

列出認證服務的端口:
# openstack catalog list

列出鏡像信息,確認能訪問鏡像服務:
# openstack image list


確認cells和placement api成功運行:
# nova-status upgrade check
html

相關文章
相關標籤/搜索