1 首先配置一台计算节点虚拟机,配置完静态ip,主机名映射

 控制节点主机名处也需要配置

 主机名之间可以相互ping通

2 关闭防火墙

systemctl stop firewalld

systemctl disable firewalld

3 关闭SELinux

vim /etc/selinux/config       #SELINUX=enforcing  改成  SELINUX=disabled

网络管理由NetworkManager切换成network

CentOS7默认使用NetworkManager进行网络管理(不支持OpenStack)

--查看网络管理状态

systemctl status NetworkManager

systemctl status network

--停止禁用NetworkManager

systemctl stop NetworkManager

systemctl disable NetworkManager

--启用启动network

systemctl enable network

systemctl restart network

5 安装所需要的包

yum install -y centos-release-openstack-queens

yum install python-openstackclient

6 更新系统后重启

yum update -y

reboot

7 安装计算节点所需要的包

yum install -y openstack-nova-compute

8 编辑 /etc/nova/nova.conf 下的文件

[DEFAULT]
# ...
enabled_apis = osapi_compute,metadata
[DEFAULT]
# ...
transport_url = rabbit://openstack:RABBIT_PASS@controller

openstack RABBIT_PASS 为自己mq的用户名和密码  controller为自己控制节点的ip

[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 = NOVA_PASS

 

controller为自己控制节点的ip service为自己设置的用户名  NOVA_PASS自己的密码

[DEFAULT]
# ...
my_ip = MANAGEMENT_INTERFACE_IP_ADDRESS

修改为自己控制节点的ip

 

[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 = PLACEMENT_PASS

同理修改为控制节点的ip和密码

9 查看是否支持硬件加速

$ egrep -c '(vmx|svm)' /proc/cpuinfo

结果为0则需要修改一下配置

[libvirt]
# ...
virt_type = qemu

10 启动服务与设置开机自动启动

# systemctl enable libvirtd.service openstack-nova-compute.service
# systemctl start libvirtd.service openstack-nova-compute.service

成功!!! 

 

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐