openstack安装-计算节点-nova计算服务安装

筅森魡賤 提交于 2020-03-08 16:55:06

一、基础服务安装

先安装基础工具

yum   install   net-tools  vim  telnet  wget  lrzsz 

1、添加hosts解析

cat << EOF >/etc/hosts
192.168.70.10  ipr-controller
192.168.70.11  ipr-compute01
192.168.70.12  ipr-compute02
192.168.70.13  ipr-compute03
192.168.70.14  ipr-compute04
EOF

2、修改主机名

echo "ipr-controller" >/etc/hostname

3、关闭firewalld防火墙以及禁用开机启动

systemctl stop firewalld.service && systemctl disable firewalld.service && systemctl status firewalld.service

关闭selinux

setenforce 0 && sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config 

 4、配置时间同步

安装时间同步服务

yum install chrony -y

修改配置

vim /etc/chrony.conf
server 192.168.70.10 iburst

重启ntp服务并配置开机启动

systemctl restart chronyd.service && systemctl status chronyd.service && systemctl enable chronyd.service &&systemctl list-unit-files |grep chronyd.service

设置时区,同步时间

timedatectl set-timezone Asia/Shanghai && chronyc sources &&timedatectl status

5、设置yum源

配置阿里云的bash和epel源

mv -f /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

安装openstack-rocky的仓库

yum install centos-release-openstack-rocky -y && yum clean all && yum makecache

6、更新软件包

yum update -y

二、安装nova相关服务

yum install openstack-nova-compute openstack-utils -y

三、修改配置

修改标红部分为计算节点的IP地址

openstack-config --set /etc/nova/nova.conf DEFAULT enabled_apis osapi_compute,metadata
openstack-config --set /etc/nova/nova.conf DEFAULT transport_url rabbit://openstack:openstack@192.168.70.10
openstack-config --set /etc/nova/nova.conf DEFAULT my_ip 192.168.70.22
openstack-config --set /etc/nova/nova.conf DEFAULT use_neutron true
openstack-config --set /etc/nova/nova.conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver
openstack-config --set /etc/nova/nova.conf api auth_strategy keystone
openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_url http://192.168.70.10:5000/v3
openstack-config --set /etc/nova/nova.conf keystone_authtoken memcached_servers 192.168.70.10:11211
openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_type password
openstack-config --set /etc/nova/nova.conf keystone_authtoken project_domain_name default
openstack-config --set /etc/nova/nova.conf keystone_authtoken user_domain_name default
openstack-config --set /etc/nova/nova.conf keystone_authtoken project_name service
openstack-config --set /etc/nova/nova.conf keystone_authtoken username nova
openstack-config --set /etc/nova/nova.conf keystone_authtoken password nova
openstack-config --set /etc/nova/nova.conf vnc enabled true
openstack-config --set /etc/nova/nova.conf vnc server_listen 0.0.0.0
openstack-config --set /etc/nova/nova.conf vnc server_proxyclient_address '$my_ip'
openstack-config --set /etc/nova/nova.conf vnc novncproxy_base_url http://192.168.70.10:6080/vnc_auto.html
openstack-config --set /etc/nova/nova.conf glance api_servers http://192.168.70.10:9292
openstack-config --set /etc/nova/nova.conf oslo_concurrency lock_path /var/lib/nova/tmp
openstack-config --set /etc/nova/nova.conf placement region_name RegionOne
openstack-config --set /etc/nova/nova.conf placement project_domain_name Default
openstack-config --set /etc/nova/nova.conf placement project_name service
openstack-config --set /etc/nova/nova.conf placement auth_type password
openstack-config --set /etc/nova/nova.conf placement user_domain_name Default
openstack-config --set /etc/nova/nova.conf placement auth_url http://192.168.70.10:5000/v3
openstack-config --set /etc/nova/nova.conf placement username placement
openstack-config --set /etc/nova/nova.conf placement password placement
openstack-config --set /etc/nova/nova.conf libvirt virt_type kvm
openstack-config --set /etc/nova/nova.conf scheduler discover_hosts_in_cells_interval 300



四、重启服务

systemctl start libvirtd.service openstack-nova-compute.service &&systemctl status libvirtd.service openstack-nova-compute.service && systemctl enable libvirtd.service openstack-nova-compute.service && systemctl list-unit-files |grep libvirtd.service && systemctl list-unit-files |grep openstack-nova-compute.service

 


易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!