1.下载RDO官网软件源
cd /etc/yum.repos.d/
curl -O https://trunk.rdoproject.org/centos7/delorean-deps.repo
curl -O https://trunk.rdoproject.org/centos7/current-passed-ci/delorean.repo
2.下载openstack软件仓库
[root@openstackpro01 ~]# yum upgrade
3.重启
4.安装软件包openstack-nova-compute
[root@openstackpro02 ~]# yum install openstack-nova-compute
5.编辑配置文件 /etc/nova/nova.conf配置文件(!未验证!!!!!!!!!!!!!!!!)
[DEFAULT]
enabled_apis=osapi_compute,metadata
transport_url=rabbit://openstack:123456@192.168.253.130
my_ip=192.168.253.130
use_neutron=true
firewall_driver=nova.virt.firewall.NoopFirewallDriver
[api]
auth_strategy=keystone
[keystone_authtoken]
auth_url=http://192.168.253.130:5000/v3
memcached_servers=192.168.253.130:11211
auth_type=password
project_domain_name=default
user_domain_name=default
project_name=service
username=nova
password=123456
[vnc]
enabled=true
server_listen=$my_ip
server_proxyclient_address=$my_ip
novncproxy_base_url=http://192.168.253.130:6080/vnc_auto.html
[glance]
api_servers=http://192.168.253.130: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
username=placement
password=123456
auth_url=http://192.168.253.130:5000/v3
6.检查计算节点是否支持虚拟机的硬件加速
# egrep -c ‘(vmx|svm)’ /proc/cpuinfo
0
If this command returns a value of zero, your compute node does not support hardware acceleration and you must configure libvirt to use QEMU instead of KVM.
7.Edit the [libvirt] section in the /etc/nova/nova.conf file as follows:
[libvirt]
virt_type=qemu
8.启动计算服务及其依赖,配置开机自启动
systemctl enable libvirtd.service openstack-nova-compute.service
systemctl start libvirtd.service openstack-nova-compute.service
systemctl status libvirtd.service openstack-nova-compute.service
9.将计算节点添加到cell数据库(控制节点上执行)
openstack compute service list —service nova-compute
有问题!!!!!!!!!!!!!!!!!!!!!!!!!!!
Unable to establish connection to http://192.168.253.130:8774/v2.1/os-services?binary=nova-compute: HTTPConnectionPool(host='192.168.253.130', port=8774): Max retries exceeded with url: /v2.1/os-services?binary=nova-compute (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8af3d79110>: Failed to establish a new connection: [Errno 111] Connection refused',))
如果遇到一下错误,则是openstack注册API时的端口号错误,将端口号的35357改为5000即可
[root@openstackpro01 ~]# keystone-manage bootstrap --bootstrap-password du1314520 --bootstrap-admin-url http://192.168.96.133:5000/v3/ --bootstrap-internal-url http://192.168.96.133:5000/v3/ --bootstrap-public-url http://192.168.96.133:5000/v3/ --bootstrap-region-id RegionOne
[root@openstackpro01 ~]# openstack endpoint list
openstack compute service list —service nova-compute
10.注册计算主机,添加新的计算节点
[root@openstackpro01 ~]# nova-manage cell_v2 discover_hosts —verbose