安装并配置计算节点
http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
yum install openstack-nova-compute 安装包报错
(yum install rpm* rpm-build rpmdev*
rpmbuild --rebuild --clean qemu-kvm-rhev-2.9.0-16.el7_4.8.src.rpm (需要依赖安装)
cd /root/rpmbuild/RPMS/x86_64/ yum 直接使用编译生成的包 yum remove 卸载原来
)
配置 /etc/nova/nova.conf
[DEFAULT]
# ...
enabled_apis = osapi_compute,metadata
[DEFAULT]
# ...
transport_url = rabbit://openstack:123456@controller
[api]
# ...
auth_strategy = keystone
[keystone_authtoken]
# ...
auth_url = http://controller:5000/v3
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = 123456
[DEFAULT]
# ...
my_ip = 192.168.12.180
[DEFAULT]
# ...
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[vnc]
# ...
enabled = True
server_listen = 0.0.0.0
server_proxyclient_address = $my_ip
novncproxy_base_url = http://controller:6080/vnc_auto.html
[glance]
# ...
api_servers = http://controller: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://controller:5000/v3
username = placement
password = 123456
/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
(网络配置
systemctl stop firewalld.service systemctl disable firewalld.service关防火墙
systemctl stop iptables systemctl disable iptables.service
rabbit 的openstack 用户不见了 rabbitmqctl list_users)
将计算节点加到数据库
. admin-openrc
openstack compute service list --service nova-compute列表
su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova 寻找计算机
/etc/nova/nova.conf
[scheduler]
discover_hosts_in_cells_interval = 300
验证安装
. admin-openrc 管理员环境变量
openstack compute service list openstack计算服务列表
openstack catalog list openstack服务列表
openstack image list openstack图像列表
(9292端口未启动 glance 未启动)
nova-status upgrade check 检查单元格和展示位置API是否成功运行
(vi /etc/httpd/conf.d/00-nova-placement-api.conf新增
<Directory />
Options All
AllowOverride All
Require all granted
</Directory>
<Directory /usr/bin/nova-placement-api>
Options All
AllowOverride All
Require all granted
</Directory>重启httpd
There are no compute resource providers in the Placement
service but there are 1 compute nodes in the deployment.
This means no compute nodes are reporting into the
Placement service and need to be upgraded and/or fixed.
(计算节点PUT提交资源不成功,查看计算节点硬件是否符合要求,CPU、内存。。)
日志位置/var/log/nova/