第二部 OpenStack Rocky计算节点配置
一、基础环境
关防火墙,关selinux,永久修改主机名
#查看服务器是否支持虚拟化
# egrep -c '(vmx|svm)' /proc/cpuinfo
返回值为非0,支持虚拟化
为0,打开虚拟机如图内容
1、配置yum源
查看OpenStack Rocky 版本部署之一——基础环境配置
2、安装基础软件
# yum clean all && yum repolist
# yum install python-openstackclient -y
# yum install openstack-selinux -y
# yum -y install libibverbs
3、安装OpenStack应用组件
(1)安装网络服务软件包
#ipset是iptables的扩展,它允许你创建匹配安全组的规则。
# yum install openstack-neutron-linuxbridge ebtables ipset -y
(2)安装nova的软件包:
# yum install openstack-nova-compute -y
二、网络服务neutron
1、修改neutron配置文件
(1)编辑/etc/neutron/neutron.conf配置文件:
[DEFAULT]
transport_url = rabbit://openstack:openstack@controller
auth_strategy = keystone
[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:http://
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
(2)配置Linux bridge客户端
# 编辑 /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = public:ens33
[vxlan]
enable_vxlan = false
[securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
(3)配置sysctl.conf
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
2、启动服务并设置开机自启
# systemctl enable neutron-linuxbridge-agent.service
# systemctl start neutron-linuxbridge-agent.service
三、计算服务nova
1、修改nova配置文件
(1)修改/etc/nova/nova.conf
[DEFAULT]
enabled_apis = osapi_compute,metadata
transport_url = rabbit://openstack:openstack@controller
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[api]
auth_strategy = keystone
[keystone_authtoken]
auth_url = http://controller:http://
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova
#server_proxyclient_address参数代理的地址会将数据发送给novncproxy_base_url参数地址
[vnc]
enabled = True
server_listen = 0.0.0.0
server_proxyclient_address = compute
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://controllerhttp://
username = placement
password = placement
[neutron]
url = http://controllerhttp://
auth_url = http://controllerhttp://
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron
#虚拟化格式使用qemu,对机器消耗较小,其他虚拟化格式还有:kvm,lxc,qemu,uml, xen ,parallels
[libvirt]
virt_type = qemu
2、设置开机自启并启动服务
# systemctl enable libvirtd.service openstack-nova-compute.service
# systemctl start libvirtd.service openstack-nova-compute.service
3、在控制节点上查看
# openstack network agent list
# openstack compute service list
四、错误整理
1、如果报以下错误。
执行下面命令
# modprobe br_netfilter



