今天应该是配置网络部分Networking Service,参考官方文档
当前版本 neutron 11.0.7.dev44
配置Controller端
配置provider interface 接口ifcfg-eno2和名称解析
配置Compute Node端,也是网络端口配置和名称解析,新创建了一个ifcfg-enp0a1,内容如下,UUID是拷贝原有的内容
DEVICE=enp0a1
TYPE=Ethernet
ONBOOT="yes"
BOOTPROTO="none"
UUID=1bb944cc-d2f0-46c7-9f2d-de9db994a81a
重新启动network服务失败,按照文档重新启动电脑,原有接口可以正常连接,这可好(之前修改网络配置后服务启动失败,导致ssh无法连接,可怕😱)。只是也未看见新增接口的状态,待查
配置好后,然后就是验证各网络连接状态,controller与compute node是否可以ping通,与外网是否可以ping通,这些准备好后,再进入下面的步骤
Install and configure controller node
创建MySQL数据库,用户及授权,注意修改NEUTRON_DBPASS
MariaDB [(none)]> CREATE DATABASE neutron;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'NEUTRON_DBPASS';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'NEUTRON_DBPASS';
创建API
openstack user create --domain default --password-prompt neutron
openstack role add --project service --user neutron admin
openstack service create --name neutron --description "OpenStack Networking" network
openstack endpoint create --region RegionOne network public http://controller:9696
openstack endpoint create --region RegionOne network internal http://controller:9696
openstack endpoint create --region RegionOne network admin http://controller:9696
Configure networking options
之前选择的网络结构就是Provider networks,所以按下面的文档进行
安装完需要的软件包
# yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables
参照文档修改几个配置文件
- /etc/neutron/neutron.conf
- /etc/neutron/plugins/ml2/ml2_conf.ini
- /etc/neutron/plugins/ml2/linuxbridge_agent.ini
- /etc/neutron/dhcp_agent.ini
返回到Networking controller node configuration页面,继续修改配置文件
- /etc/neutron/metadata_agent.ini
- /etc/nova/nova.conf
配置computo service 使用网络服务
创建链接
ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
修改数据库
su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
重新启动服务
systemctl restart openstack-nova-api.service
设置服务自启动及开启服务
systemctl enable neutron-server.service \
neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
neutron-metadata-agent.service
systemctl start neutron-server.service \
neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
neutron-metadata-agent.service
systemctl enable neutron-l3-agent.service
systemctl start neutron-l3-agent.service
controller node 配置完毕
Install and configure compute node
安装软件包
# yum install openstack-neutron-linuxbridge ebtables ipset
修改配置文件
- /etc/neutron/neutron.conf
- /etc/neutron/plugins/ml2/linuxbridge_agent.ini
- /etc/nova/nova.conf
重新启动Compute service
# systemctl restart openstack-nova-compute.service
设置开机启动及开启服务
# systemctl enable neutron-linuxbridge-agent.service
# systemctl start neutron-linuxbridge-agent.service
操作完毕,只是没有看到有验证环节,之前的服务安装后都有一个验证的步骤,可以检查是否已安装成功了
网友评论