1.下载RDO官网软件源

    1. cd /etc/yum.repos.d/
    2. curl -O https://trunk.rdoproject.org/centos7/delorean-deps.repo
    3. 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配置文件(!未验证!!!!!!!!!!!!!!!!)

    1. [DEFAULT]
    2. enabled_apis=osapi_compute,metadata
    3. transport_url=rabbit://openstack:123456@192.168.253.130
    4. my_ip=192.168.253.130
    5. use_neutron=true
    6. firewall_driver=nova.virt.firewall.NoopFirewallDriver
    7. [api]
    8. auth_strategy=keystone
    9. [keystone_authtoken]
    10. auth_url=http://192.168.253.130:5000/v3
    11. memcached_servers=192.168.253.130:11211
    12. auth_type=password
    13. project_domain_name=default
    14. user_domain_name=default
    15. project_name=service
    16. username=nova
    17. password=123456
    18. [vnc]
    19. enabled=true
    20. server_listen=$my_ip
    21. server_proxyclient_address=$my_ip
    22. novncproxy_base_url=http://192.168.253.130:6080/vnc_auto.html
    23. [glance]
    24. api_servers=http://192.168.253.130:9292
    25. [oslo_concurrency]
    26. lock_path=/var/lib/nova/tmp
    27. [placement]
    28. os_region_name=RegionOne
    29. project_domain_name=Default
    30. project_name=service
    31. auth_type=password
    32. user_domain_name=Default
    33. username=placement
    34. password=123456
    35. 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:

    1. [libvirt]
    2. virt_type=qemu

    8.启动计算服务及其依赖,配置开机自启动

    1. systemctl enable libvirtd.service openstack-nova-compute.service
    2. systemctl start libvirtd.service openstack-nova-compute.service
    3. systemctl status libvirtd.service openstack-nova-compute.service

    image.png
    9.将计算节点添加到cell数据库(控制节点上执行)
    openstack compute service list —service nova-compute

    有问题!!!!!!!!!!!!!!!!!!!!!!!!!!!

    1. 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',))

    image.png

    如果遇到一下错误,则是openstack注册API时的端口号错误,将端口号的35357改为5000即可
    image.png
    image.png

    1. [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
    2. [root@openstackpro01 ~]# openstack endpoint list

    image.png
    openstack compute service list —service nova-compute
    image.png
    10.注册计算主机,添加新的计算节点
    [root@openstackpro01 ~]# nova-manage cell_v2 discover_hosts —verbose
    image.png