在控制节点( controller )安装 Neutron 服务,同时配置支持 vxlan
1 、登录数据库创建 neutron 数据库
MariaDB [(none)]> CREATE DATABASE neutron default character set utf8;
Query OK, 1 row affected (0.002 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'openstack';
Query OK, 0 rows affected (0.000 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'openstack';
Query OK, 0 rows affected (0.000 sec)
2\装配置 Neutron( 控制节点
#创建 Neutron 用户,密码设置为 openstack2022
[root@controller glance]# openstack user create --domain default --password openstack2022 neutron
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | 4201926e60584c57bad73d6507f1fbfd |
| name | neutron |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
将 neutron 加入到 service 项目以及 admin 角色
[root@controller glance]# openstack role add --project service --user neutron admin
创建 Neutron 服务实体。
[root@controller glance]# openstack service create --name neutron --description "OpenStack Networking" network
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Networking |
| enabled | True |
| id | 024552e7966b47488aad52af0b5c4e87 |
| name | neutron |
| type | network |
+-------------+----------------------------------+
创建 Neutron API 服务端点
[root@controller glance]# openstack endpoint create --region RegionOne network public http://controller:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 13c973c72cf948ababcc42ddb1cf119e |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 024552e7966b47488aad52af0b5c4e87 |
| service_name | neutron |
| service_type | network |
| url | http://controller:9696 |
+--------------+----------------------------------+
[root@controller glance]# openstack endpoint create --region RegionOne network internal http://controller:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 4ed1c70cc14b4bcfb9afe3037fd20345 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 024552e7966b47488aad52af0b5c4e87 |
| service_name | neutron |
| service_type | network |
| url | http://controller:9696 |
+--------------+----------------------------------+
[root@controller glance]# openstack endpoint create --region RegionOne network admin http://controller:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | bf94b27ee6a949b08427d78f6f341ad6 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 024552e7966b47488aad52af0b5c4e87 |
| service_name | neutron |
| service_type | network |
| url | http://controller:9696 |
+--------------+----------------------------------+
[root@controller glance]#
安装配置 Neutron
采用 Provider-LinuxBridge 模式
# yum -y install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables
[root@controller glance]# yum -y install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables
Loaded plugins: fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: mirrors.ustc.edu.cn
* extras: mirrors.cqu.edu.cn
* updates: mirrors.ustc.edu.cn
Package ebtables-2.0.10-16.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package openstack-neutron.noarch 1:15.3.4-1.el7 will be installed
--> Processing Dependency: openstack-neutron-common = 1:15.3.4-1.el7 for package: 1:openstack-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: haproxy >= 1.5.0 for package: 1:openstack-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: dnsmasq-utils >= 2.76 for package: 1:openstack-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: keepalived for package: 1:openstack-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: dibbler-client for package: 1:openstack-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: conntrack-tools for package: 1:openstack-neutron-15.3.4-1.el7.noarch
---> Package openstack-neutron-linuxbridge.noarch 1:15.3.4-1.el7 will be installed
---> Package openstack-neutron-ml2.noarch 1:15.3.4-1.el7 will be installed
--> Running transaction check
---> Package conntrack-tools.x86_64 0:1.4.4-7.el7 will be installed
--> Processing Dependency: libnetfilter_cttimeout.so.1(LIBNETFILTER_CTTIMEOUT_1.1)(64bit) for package: conntrack-tools-1.4.4-7.el7.x86_64
--> Processing Dependency: libnetfilter_cttimeout.so.1(LIBNETFILTER_CTTIMEOUT_1.0)(64bit) for package: conntrack-tools-1.4.4-7.el7.x86_64
--> Processing Dependency: libnetfilter_cthelper.so.0(LIBNETFILTER_CTHELPER_1.0)(64bit) for package: conntrack-tools-1.4.4-7.el7.x86_64
--> Processing Dependency: libnetfilter_queue.so.1()(64bit) for package: conntrack-tools-1.4.4-7.el7.x86_64
--> Processing Dependency: libnetfilter_cttimeout.so.1()(64bit) for package: conntrack-tools-1.4.4-7.el7.x86_64
--> Processing Dependency: libnetfilter_cthelper.so.0()(64bit) for package: conntrack-tools-1.4.4-7.el7.x86_64
---> Package dibbler-client.x86_64 0:1.0.1-0.RC1.2.el7 will be installed
---> Package dnsmasq-utils.x86_64 0:2.76-17.el7_9.3 will be installed
---> Package haproxy.x86_64 0:1.5.18-9.el7_9.1 will be installed
---> Package keepalived.x86_64 0:1.3.5-19.el7 will be installed
---> Package openstack-neutron-common.noarch 1:15.3.4-1.el7 will be installed
--> Processing Dependency: python2-neutron = 1:15.3.4-1.el7 for package: 1:openstack-neutron-common-15.3.4-1.el7.noarch
--> Running transaction check
---> Package libnetfilter_cthelper.x86_64 0:1.0.0-11.el7 will be installed
---> Package libnetfilter_cttimeout.x86_64 0:1.0.0-7.el7 will be installed
---> Package libnetfilter_queue.x86_64 0:1.0.2-2.el7_2 will be installed
---> Package python2-neutron.noarch 1:15.3.4-1.el7 will be installed
--> Processing Dependency: python2-weakrefmethod >= 1.0.2 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: python2-pyroute2 >= 0.5.3 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: python2-pecan >= 1.3.2 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: python2-oslo-versionedobjects >= 1.35.1 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: python2-os-xenapi >= 0.3.1 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: python2-os-vif >= 1.15.1 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: python2-os-ken >= 0.3.1 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: python2-neutron-lib >= 1.29.1 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: python2-designateclient >= 2.7.0 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: python2-ovsdbapp for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Running transaction check
---> Package python2-designateclient.noarch 0:3.0.0-1.el7 will be installed
---> Package python2-neutron-lib.noarch 0:1.29.1-1.el7 will be installed
--> Processing Dependency: python-setproctitle for package: python2-neutron-lib-1.29.1-1.el7.noarch
---> Package python2-os-ken.noarch 0:0.4.1-1.el7 will be installed
--> Processing Dependency: python2-tinyrpc for package: python2-os-ken-0.4.1-1.el7.noarch
--> Processing Dependency: python2-paramiko for package: python2-os-ken-0.4.1-1.el7.noarch
--> Processing Dependency: python2-openvswitch for package: python2-os-ken-0.4.1-1.el7.noarch
---> Package python2-os-vif.noarch 0:1.17.0-1.el7 will be installed
---> Package python2-os-xenapi.noarch 0:0.3.4-1.el7 will be installed
---> Package python2-oslo-versionedobjects.noarch 0:1.36.1-1.el7 will be installed
--> Processing Dependency: python-oslo-versionedobjects-lang = 1.36.1-1.el7 for package: python2-oslo-versionedobjects-1.36.1-1.el7.noarch
---> Package python2-ovsdbapp.noarch 0:0.17.5-1.el7 will be installed
---> Package python2-pecan.noarch 0:1.3.2-1.el7 will be installed
--> Processing Dependency: python2-singledispatch for package: python2-pecan-1.3.2-1.el7.noarch
--> Processing Dependency: python-webtest for package: python2-pecan-1.3.2-1.el7.noarch
--> Processing Dependency: python-logutils for package: python2-pecan-1.3.2-1.el7.noarch
---> Package python2-pyroute2.noarch 0:0.5.6-1.el7 will be installed
---> Package python2-weakrefmethod.noarch 0:1.0.2-3.el7 will be installed
--> Running transaction check
---> Package python-logutils.noarch 0:0.3.3-3.el7 will be installed
---> Package python-openvswitch.x86_64 1:2.12.0-1.el7 will be installed
--> Processing Dependency: libopenvswitch-2.12.so.0(libopenvswitch_0)(64bit) for package: 1:python-openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: libopenvswitch-2.12.so.0()(64bit) for package: 1:python-openvswitch-2.12.0-1.el7.x86_64
---> Package python-oslo-versionedobjects-lang.noarch 0:1.36.1-1.el7 will be installed
---> Package python-webtest.noarch 0:2.0.23-1.el7 will be installed
--> Processing Dependency: python-waitress for package: python-webtest-2.0.23-1.el7.noarch
--> Processing Dependency: python-beautifulsoup4 for package: python-webtest-2.0.23-1.el7.noarch
---> Package python2-paramiko.noarch 0:2.4.2-2.el7 will be installed
--> Processing Dependency: python2-pynacl >= 1.0.1 for package: python2-paramiko-2.4.2-2.el7.noarch
---> Package python2-setproctitle.x86_64 0:1.1.10-12.el7 will be installed
---> Package python2-singledispatch.noarch 0:3.4.0.3-4.el7 will be installed
---> Package python2-tinyrpc.noarch 0:0.5-4.20170523git1f38ac.el7 will be installed
--> Processing Dependency: python-zmq for package: python2-tinyrpc-0.5-4.20170523git1f38ac.el7.noarch
--> Processing Dependency: python-gevent for package: python2-tinyrpc-0.5-4.20170523git1f38ac.el7.noarch
--> Running transaction check
---> Package openvswitch.x86_64 1:2.12.0-1.el7 will be installed
--> Processing Dependency: librte_vhost.so.4(DPDK_2.1)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_vhost.so.4(DPDK_2.0)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_vhost.so.4(DPDK_17.08)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_vhost.so.4(DPDK_17.05)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_vhost.so.4(DPDK_16.07)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_ring.so.2(DPDK_2.0)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_ring.so.2(DPDK_2.0)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_meter.so.2(DPDK_2.0)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_meter.so.2(DPDK_18.08)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_mempool.so.5(DPDK_2.0)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_mempool.so.5(DPDK_16.07)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_mbuf.so.4(DPDK_2.1)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_ethdev.so.11(DPDK_2.2)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_ethdev.so.11(DPDK_18.11)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_ethdev.so.11(DPDK_18.08)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_ethdev.so.11(DPDK_18.05)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_ethdev.so.11(DPDK_17.05)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_ethdev.so.11(DPDK_16.07)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_eal.so.9(DPDK_2.0)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_eal.so.9(DPDK_18.11)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_eal.so.9(DPDK_17.08)(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_vhost.so.4()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_ring.so.2()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_virtio.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_vhost.so.2()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_vdev_netvsc.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_tap.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_ring.so.2()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_qede.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_nfp.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_netvsc.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_mlx5.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_mlx4.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_ixgbe.so.2()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_i40e.so.2()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_failsafe.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_enic.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_e1000.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pmd_bnxt.so.2()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pdump.so.2()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_pci.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_net.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_metrics.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_meter.so.2()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_mempool_stack.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_mempool_ring.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_mempool_bucket.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_mempool.so.5()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_member.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_mbuf.so.4()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_latencystats.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_kvargs.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_ip_frag.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_hash.so.2()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_gso.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_gro.so.1()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_ethdev.so.11()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_eal.so.9()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_cmdline.so.2()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_bus_vmbus.so.2()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_bus_vdev.so.2()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_bus_pci.so.2()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
--> Processing Dependency: librte_bitratestats.so.2()(64bit) for package: 1:openvswitch-2.12.0-1.el7.x86_64
---> Package python-beautifulsoup4.noarch 0:4.6.0-1.el7 will be installed
---> Package python-waitress.noarch 0:0.8.9-5.el7 will be installed
---> Package python2-gevent.x86_64 0:1.1.2-2.el7 will be installed
--> Processing Dependency: libev.so.4()(64bit) for package: python2-gevent-1.1.2-2.el7.x86_64
---> Package python2-pynacl.x86_64 0:1.3.0-1.el7 will be installed
--> Processing Dependency: libsodium.so.23()(64bit) for package: python2-pynacl-1.3.0-1.el7.x86_64
---> Package python2-zmq.x86_64 0:14.7.0-11.el7 will be installed
--> Processing Dependency: libzmq.so.5()(64bit) for package: python2-zmq-14.7.0-11.el7.x86_64
--> Running transaction check
---> Package dpdk.x86_64 0:18.11.8-1.el7_8 will be installed
---> Package libev.x86_64 0:4.15-7.el7 will be installed
---> Package libsodium.x86_64 0:1.0.18-2.el7 will be installed
---> Package zeromq.x86_64 0:4.1.4-6.el7 will be installed
--> Processing Dependency: libpgm-5.2.so.0()(64bit) for package: zeromq-4.1.4-6.el7.x86_64
--> Running transaction check
---> Package openpgm.x86_64 0:5.2.122-2.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================================
Package Arch Version Repository Size
=========================================================================================================
Installing:
openstack-neutron noarch 1:15.3.4-1.el7 centos-openstack-train 22 k
openstack-neutron-linuxbridge noarch 1:15.3.4-1.el7 centos-openstack-train 13 k
openstack-neutron-ml2 noarch 1:15.3.4-1.el7 centos-openstack-train 12 k
Installing for dependencies:
conntrack-tools x86_64 1.4.4-7.el7 base 187 k
dibbler-client x86_64 1.0.1-0.RC1.2.el7 centos-openstack-train 409 k
dnsmasq-utils x86_64 2.76-17.el7_9.3 updates 31 k
dpdk x86_64 18.11.8-1.el7_8 extras 1.7 M
haproxy x86_64 1.5.18-9.el7_9.1 updates 835 k
keepalived x86_64 1.3.5-19.el7 base 332 k
libev x86_64 4.15-7.el7 extras 44 k
libnetfilter_cthelper x86_64 1.0.0-11.el7 base 18 k
libnetfilter_cttimeout x86_64 1.0.0-7.el7 base 18 k
libnetfilter_queue x86_64 1.0.2-2.el7_2 base 23 k
libsodium x86_64 1.0.18-2.el7 centos-openstack-train 149 k
openpgm x86_64 5.2.122-2.el7 centos-openstack-train 172 k
openstack-neutron-common noarch 1:15.3.4-1.el7 centos-openstack-train 198 k
openvswitch x86_64 1:2.12.0-1.el7 centos-openstack-train 2.0 M
python-beautifulsoup4 noarch 4.6.0-1.el7 centos-openstack-train 171 k
python-logutils noarch 0.3.3-3.el7 centos-openstack-train 42 k
python-openvswitch x86_64 1:2.12.0-1.el7 centos-openstack-train 231 k
python-oslo-versionedobjects-lang noarch 1.36.1-1.el7 centos-openstack-train 7.9 k
python-waitress noarch 0.8.9-5.el7 centos-openstack-train 152 k
python-webtest noarch 2.0.23-1.el7 centos-openstack-train 84 k
python2-designateclient noarch 3.0.0-1.el7 centos-openstack-train 88 k
python2-gevent x86_64 1.1.2-2.el7 centos-openstack-train 443 k
python2-neutron noarch 1:15.3.4-1.el7 centos-openstack-train 2.3 M
python2-neutron-lib noarch 1.29.1-1.el7 centos-openstack-train 362 k
python2-os-ken noarch 0.4.1-1.el7 centos-openstack-train 2.2 M
python2-os-vif noarch 1.17.0-1.el7 centos-openstack-train 89 k
python2-os-xenapi noarch 0.3.4-1.el7 centos-openstack-train 74 k
python2-oslo-versionedobjects noarch 1.36.1-1.el7 centos-openstack-train 72 k
python2-ovsdbapp noarch 0.17.5-1.el7 centos-openstack-train 107 k
python2-paramiko noarch 2.4.2-2.el7 centos-openstack-train 286 k
python2-pecan noarch 1.3.2-1.el7 centos-openstack-train 268 k
python2-pynacl x86_64 1.3.0-1.el7 centos-openstack-train 93 k
python2-pyroute2 noarch 0.5.6-1.el7 centos-openstack-train 551 k
python2-setproctitle x86_64 1.1.10-12.el7 centos-openstack-train 19 k
python2-singledispatch noarch 3.4.0.3-4.el7 centos-openstack-train 18 k
python2-tinyrpc noarch 0.5-4.20170523git1f38ac.el7 centos-openstack-train 32 k
python2-weakrefmethod noarch 1.0.2-3.el7 centos-openstack-train 13 k
python2-zmq x86_64 14.7.0-11.el7 epel 505 k
zeromq x86_64 4.1.4-6.el7 epel 556 k
Transaction Summary
=========================================================================================================
Install 3 Packages (+39 Dependent packages)
Total download size: 15 M
Installed size: 69 M
Downloading packages:
(1/42): conntrack-tools-1.4.4-7.el7.x86_64.rpm | 187 kB 00:00:00
(2/42): dnsmasq-utils-2.76-17.el7_9.3.x86_64.rpm | 31 kB 00:00:00
(3/42): dibbler-client-1.0.1-0.RC1.2.el7.x86_64.rpm | 409 kB 00:00:00
(4/42): keepalived-1.3.5-19.el7.x86_64.rpm | 332 kB 00:00:00
(5/42): libnetfilter_cttimeout-1.0.0-7.el7.x86_64.rpm | 18 kB 00:00:00
(6/42): libnetfilter_queue-1.0.2-2.el7_2.x86_64.rpm | 23 kB 00:00:00
(7/42): libsodium-1.0.18-2.el7.x86_64.rpm | 149 kB 00:00:00
(8/42): openpgm-5.2.122-2.el7.x86_64.rpm | 172 kB 00:00:00
(9/42): openstack-neutron-15.3.4-1.el7.noarch.rpm | 22 kB 00:00:00
(10/42): openstack-neutron-common-15.3.4-1.el7.noarch.rpm | 198 kB 00:00:00
(11/42): openstack-neutron-linuxbridge-15.3.4-1.el7.noarch.rpm | 13 kB 00:00:00
(12/42): openstack-neutron-ml2-15.3.4-1.el7.noarch.rpm | 12 kB 00:00:00
(13/42): libnetfilter_cthelper-1.0.0-11.el7.x86_64.rpm | 18 kB 00:00:00
(14/42): libev-4.15-7.el7.x86_64.rpm | 44 kB 00:00:00
(15/42): openvswitch-2.12.0-1.el7.x86_64.rpm | 2.0 MB 00:00:00
(16/42): python-logutils-0.3.3-3.el7.noarch.rpm | 42 kB 00:00:00
(17/42): python-openvswitch-2.12.0-1.el7.x86_64.rpm | 231 kB 00:00:00
(18/42): dpdk-18.11.8-1.el7_8.x86_64.rpm | 1.7 MB 00:00:00
(19/42): python-beautifulsoup4-4.6.0-1.el7.noarch.rpm | 171 kB 00:00:00
(20/42): python-oslo-versionedobjects-lang-1.36.1-1.el7.noarch.rpm | 7.9 kB 00:00:00
(21/42): haproxy-1.5.18-9.el7_9.1.x86_64.rpm | 835 kB 00:00:00
(22/42): python-waitress-0.8.9-5.el7.noarch.rpm | 152 kB 00:00:00
(23/42): python2-designateclient-3.0.0-1.el7.noarch.rpm | 88 kB 00:00:00
(24/42): python-webtest-2.0.23-1.el7.noarch.rpm | 84 kB 00:00:00
(25/42): python2-gevent-1.1.2-2.el7.x86_64.rpm | 443 kB 00:00:00
(26/42): python2-neutron-lib-1.29.1-1.el7.noarch.rpm | 362 kB 00:00:00
(27/42): python2-neutron-15.3.4-1.el7.noarch.rpm | 2.3 MB 00:00:00
(28/42): python2-os-vif-1.17.0-1.el7.noarch.rpm | 89 kB 00:00:00
(29/42): python2-os-xenapi-0.3.4-1.el7.noarch.rpm | 74 kB 00:00:00
(30/42): python2-os-ken-0.4.1-1.el7.noarch.rpm | 2.2 MB 00:00:00
(31/42): python2-oslo-versionedobjects-1.36.1-1.el7.noarch.rpm | 72 kB 00:00:00
(32/42): python2-ovsdbapp-0.17.5-1.el7.noarch.rpm | 107 kB 00:00:00
(33/42): python2-pecan-1.3.2-1.el7.noarch.rpm | 268 kB 00:00:00
(34/42): python2-paramiko-2.4.2-2.el7.noarch.rpm | 286 kB 00:00:00
(35/42): python2-pynacl-1.3.0-1.el7.x86_64.rpm | 93 kB 00:00:00
(36/42): python2-pyroute2-0.5.6-1.el7.noarch.rpm | 551 kB 00:00:00
(37/42): python2-setproctitle-1.1.10-12.el7.x86_64.rpm | 19 kB 00:00:00
(38/42): python2-singledispatch-3.4.0.3-4.el7.noarch.rpm | 18 kB 00:00:00
(39/42): python2-tinyrpc-0.5-4.20170523git1f38ac.el7.noarch.rpm | 32 kB 00:00:00
(40/42): python2-weakrefmethod-1.0.2-3.el7.noarch.rpm | 13 kB 00:00:00
(41/42): python2-zmq-14.7.0-11.el7.x86_64.rpm | 505 kB 00:00:00
(42/42): zeromq-4.1.4-6.el7.x86_64.rpm | 556 kB 00:00:00
---------------------------------------------------------------------------------------------------------
Total 8.8 MB/s | 15 MB 00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python2-pyroute2-0.5.6-1.el7.noarch 1/42
Installing : python2-weakrefmethod-1.0.2-3.el7.noarch 2/42
Installing : libsodium-1.0.18-2.el7.x86_64 3/42
Installing : python2-pynacl-1.3.0-1.el7.x86_64 4/42
Installing : python2-paramiko-2.4.2-2.el7.noarch 5/42
Installing : python2-os-xenapi-0.3.4-1.el7.noarch 6/42
Installing : python-beautifulsoup4-4.6.0-1.el7.noarch 7/42
Installing : dpdk-18.11.8-1.el7_8.x86_64 8/42
Installing : 1:openvswitch-2.12.0-1.el7.x86_64 9/42
Installing : 1:python-openvswitch-2.12.0-1.el7.x86_64 10/42
Installing : python2-ovsdbapp-0.17.5-1.el7.noarch 11/42
Installing : libev-4.15-7.el7.x86_64 12/42
Installing : python2-gevent-1.1.2-2.el7.x86_64 13/42
Installing : haproxy-1.5.18-9.el7_9.1.x86_64 14/42
Installing : python-waitress-0.8.9-5.el7.noarch 15/42
Installing : python-webtest-2.0.23-1.el7.noarch 16/42
Installing : python2-setproctitle-1.1.10-12.el7.x86_64 17/42
Installing : dnsmasq-utils-2.76-17.el7_9.3.x86_64 18/42
Installing : libnetfilter_cthelper-1.0.0-11.el7.x86_64 19/42
Installing : libnetfilter_cttimeout-1.0.0-7.el7.x86_64 20/42
Installing : python2-designateclient-3.0.0-1.el7.noarch 21/42
Installing : openpgm-5.2.122-2.el7.x86_64 22/42
Installing : zeromq-4.1.4-6.el7.x86_64 23/42
Installing : python2-zmq-14.7.0-11.el7.x86_64 24/42
Installing : python2-tinyrpc-0.5-4.20170523git1f38ac.el7.noarch 25/42
Installing : python2-os-ken-0.4.1-1.el7.noarch 26/42
warning: group neutron does not exist - using root
Installing : python-oslo-versionedobjects-lang-1.36.1-1.el7.noarch 27/42
Installing : python2-oslo-versionedobjects-1.36.1-1.el7.noarch 28/42
Installing : python2-os-vif-1.17.0-1.el7.noarch 29/42
Installing : python-logutils-0.3.3-3.el7.noarch 30/42
Installing : dibbler-client-1.0.1-0.RC1.2.el7.x86_64 31/42
Installing : libnetfilter_queue-1.0.2-2.el7_2.x86_64 32/42
Installing : conntrack-tools-1.4.4-7.el7.x86_64 33/42
Installing : python2-singledispatch-3.4.0.3-4.el7.noarch 34/42
Installing : python2-pecan-1.3.2-1.el7.noarch 35/42
Installing : python2-neutron-lib-1.29.1-1.el7.noarch 36/42
Installing : 1:python2-neutron-15.3.4-1.el7.noarch 37/42
Installing : 1:openstack-neutron-common-15.3.4-1.el7.noarch 38/42
Installing : keepalived-1.3.5-19.el7.x86_64 39/42
Installing : 1:openstack-neutron-15.3.4-1.el7.noarch 40/42
Installing : 1:openstack-neutron-linuxbridge-15.3.4-1.el7.noarch 41/42
Installing : 1:openstack-neutron-ml2-15.3.4-1.el7.noarch 42/42
Verifying : keepalived-1.3.5-19.el7.x86_64 1/42
Verifying : python2-singledispatch-3.4.0.3-4.el7.noarch 2/42
Verifying : libnetfilter_queue-1.0.2-2.el7_2.x86_64 3/42
Verifying : 1:openvswitch-2.12.0-1.el7.x86_64 4/42
Verifying : dibbler-client-1.0.1-0.RC1.2.el7.x86_64 5/42
Verifying : 1:openstack-neutron-linuxbridge-15.3.4-1.el7.noarch 6/42
Verifying : 1:openstack-neutron-ml2-15.3.4-1.el7.noarch 7/42
Verifying : libsodium-1.0.18-2.el7.x86_64 8/42
Verifying : python-logutils-0.3.3-3.el7.noarch 9/42
Verifying : python2-paramiko-2.4.2-2.el7.noarch 10/42
Verifying : 1:openstack-neutron-15.3.4-1.el7.noarch 11/42
Verifying : python-oslo-versionedobjects-lang-1.36.1-1.el7.noarch 12/42
Verifying : python2-os-vif-1.17.0-1.el7.noarch 13/42
Verifying : conntrack-tools-1.4.4-7.el7.x86_64 14/42
Verifying : python2-zmq-14.7.0-11.el7.x86_64 15/42
Verifying : python2-os-ken-0.4.1-1.el7.noarch 16/42
Verifying : openpgm-5.2.122-2.el7.x86_64 17/42
Verifying : python2-weakrefmethod-1.0.2-3.el7.noarch 18/42
Verifying : python2-designateclient-3.0.0-1.el7.noarch 19/42
Verifying : python2-tinyrpc-0.5-4.20170523git1f38ac.el7.noarch 20/42
Verifying : libnetfilter_cttimeout-1.0.0-7.el7.x86_64 21/42
Verifying : python2-pecan-1.3.2-1.el7.noarch 22/42
Verifying : python2-os-xenapi-0.3.4-1.el7.noarch 23/42
Verifying : python2-oslo-versionedobjects-1.36.1-1.el7.noarch 24/42
Verifying : python2-pynacl-1.3.0-1.el7.x86_64 25/42
Verifying : 1:python-openvswitch-2.12.0-1.el7.x86_64 26/42
Verifying : zeromq-4.1.4-6.el7.x86_64 27/42
Verifying : python2-pyroute2-0.5.6-1.el7.noarch 28/42
Verifying : python2-neutron-lib-1.29.1-1.el7.noarch 29/42
Verifying : 1:openstack-neutron-common-15.3.4-1.el7.noarch 30/42
Verifying : libnetfilter_cthelper-1.0.0-11.el7.x86_64 31/42
Verifying : dnsmasq-utils-2.76-17.el7_9.3.x86_64 32/42
Verifying : 1:python2-neutron-15.3.4-1.el7.noarch 33/42
Verifying : python-webtest-2.0.23-1.el7.noarch 34/42
Verifying : python2-setproctitle-1.1.10-12.el7.x86_64 35/42
Verifying : python-waitress-0.8.9-5.el7.noarch 36/42
Verifying : haproxy-1.5.18-9.el7_9.1.x86_64 37/42
Verifying : libev-4.15-7.el7.x86_64 38/42
Verifying : dpdk-18.11.8-1.el7_8.x86_64 39/42
Verifying : python2-ovsdbapp-0.17.5-1.el7.noarch 40/42
Verifying : python-beautifulsoup4-4.6.0-1.el7.noarch 41/42
Verifying : python2-gevent-1.1.2-2.el7.x86_64 42/42
Installed:
openstack-neutron.noarch 1:15.3.4-1.el7 openstack-neutron-linuxbridge.noarch 1:15.3.4-1.el7
openstack-neutron-ml2.noarch 1:15.3.4-1.el7
Dependency Installed:
conntrack-tools.x86_64 0:1.4.4-7.el7 dibbler-client.x86_64 0:1.0.1-0.RC1.2.el7
dnsmasq-utils.x86_64 0:2.76-17.el7_9.3 dpdk.x86_64 0:18.11.8-1.el7_8
haproxy.x86_64 0:1.5.18-9.el7_9.1 keepalived.x86_64 0:1.3.5-19.el7
libev.x86_64 0:4.15-7.el7 libnetfilter_cthelper.x86_64 0:1.0.0-11.el7
libnetfilter_cttimeout.x86_64 0:1.0.0-7.el7 libnetfilter_queue.x86_64 0:1.0.2-2.el7_2
libsodium.x86_64 0:1.0.18-2.el7 openpgm.x86_64 0:5.2.122-2.el7
openstack-neutron-common.noarch 1:15.3.4-1.el7 openvswitch.x86_64 1:2.12.0-1.el7
python-beautifulsoup4.noarch 0:4.6.0-1.el7 python-logutils.noarch 0:0.3.3-3.el7
python-openvswitch.x86_64 1:2.12.0-1.el7 python-oslo-versionedobjects-lang.noarch 0:1.36.1-1.el7
python-waitress.noarch 0:0.8.9-5.el7 python-webtest.noarch 0:2.0.23-1.el7
python2-designateclient.noarch 0:3.0.0-1.el7 python2-gevent.x86_64 0:1.1.2-2.el7
python2-neutron.noarch 1:15.3.4-1.el7 python2-neutron-lib.noarch 0:1.29.1-1.el7
python2-os-ken.noarch 0:0.4.1-1.el7 python2-os-vif.noarch 0:1.17.0-1.el7
python2-os-xenapi.noarch 0:0.3.4-1.el7 python2-oslo-versionedobjects.noarch 0:1.36.1-1.el7
python2-ovsdbapp.noarch 0:0.17.5-1.el7 python2-paramiko.noarch 0:2.4.2-2.el7
python2-pecan.noarch 0:1.3.2-1.el7 python2-pynacl.x86_64 0:1.3.0-1.el7
python2-pyroute2.noarch 0:0.5.6-1.el7 python2-setproctitle.x86_64 0:1.1.10-12.el7
python2-singledispatch.noarch 0:3.4.0.3-4.el7 python2-tinyrpc.noarch 0:0.5-4.20170523git1f38ac.el7
python2-weakrefmethod.noarch 0:1.0.2-3.el7 python2-zmq.x86_64 0:14.7.0-11.el7
zeromq.x86_64 0:4.1.4-6.el7
Complete!
[root@controller glance]#
#修改配置文件 /etc/neutron/neutron.conf
[root@controller neutron]# vi /etc/neutron/neutron.conf
[root@controller neutron]# cat /etc/neutron/neutron.conf
[DEFAULT]
# 启用 Modular Layer 2 (ML2) 插件
core_plugin = ml2
# service_plugins 默认为空,如果值是 router 表示支持路由模式,即 vxlan
service_plugins = router
transport_url = rabbit://openstack:openstack@controller
# 设置验证策略
auth_strategy = keystone
# 通知计算节点的网络拓扑变化
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true
allow_overlapping_ips = true
[cors]
[database]
connection = mysql+pymysql://neutron:openstack@controller/neutron
[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = openstack2022
token_cache_time=3600
[nova]
auth_url = http://controller:5000
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = openstack2022
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_middleware]
[oslo_policy]
[root@controller neutron]#
修改 ML2 插件配置文件
修改 ML2 插件配置文件 /etc/neutron/plugins/ml2/ml2_conf.ini
参考: https://docs.openstack.org/mitaka/zh_CN/install-guide-rdo/neutron-controller-install-option2.html
root:neutron ml2_conf.ini
# vi /etc/neutron/plugins/ml2/ml2_conf.ini
启用 flat 和 vlan 、 vxlan 网络,需要新增加 [ml2] 、 [ml2_type_flat] 、 [ml2_type_vxlan] 和 [securitygroup] 配置
增加 [ml2] 部分,配置支持 vxlan
[ml2]
type_drivers = flat,vlan,vxlan
tenant_network_types = vxlan
mechanism_drivers = linuxbridge,l2population
extension_drivers = port_security
增加 [ml2_type_flat] 部分,将 provider 配置为 flat 网络
[ml2_type_flat]
flat_networks = provider
增加 [ml2_type_vlan] 部分,将 vlan 配置为 flat 网络
[ml2_type_vlan]
network_vlan_ranges = provider
增加 [ml2_type_vxlan] 部分,配置 vxlan 网络识别的网络范围
[ml2_type_vxlan]
# 取值范围 1-16777215
vni_ranges = 1:3000
增加 [securitygroup] 部分,启用 ipset 提高安全效率。
[securitygroup]
enable_ipset = true
修改 /etc/neutron/plugins/ml2/linuxbridge_agent.ini 文件,配置 Linux 桥代理
# cd /etc/neutron/plugins/ml2 && mv linuxbridge_agent.ini linuxbridge_agent.ini.source && cat linuxbridge_agent.ini.source |grep -Ev "^#|^$" >
linuxbridge_agent.ini && chown root:neutron linuxbridge_agent.ini
# vi /etc/neutron/plugins/ml2/linuxbridge_agent.ini
增加 [linux_bridge] 部分,将 Provider 虚拟网络映射到物理网络 ( 能与外网通信的网段 )
[linux_bridge]
physical_interface_mappings = provider:ens33
增加 [vxlan] 部分,启用 vxlan 叠加网络
[vxlan]
# 如果要禁用 vxlan ,则设置为 false ,同时注释 local_ip 和 l2_population
enable_vxlan = true
# 每个 ( 控制和计算 ) 节点都要添加一个网卡,给 vxlan 专用,并且要配置 IP 地址(不需要配置网关,配置 IP 后,各节点可以使用对应 IP ping 通)
local_ip = 10.168.59.20
l2_population = true
增加 [securitygroup] 部分,启用安全组并配置 LinuxBridge iptables 驱动。
[securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
/*
说明: local_ip 要修改成控制节点 / 计算节点实际用于 vxlan IP 。
provider 网络使用的是 ens33 网口,部署时根据实际情况调整, provider 网络可以理解为能与外部互联网相通的网络,后面在创建 Flat 类型网络时
--provider-physical-network 要指定是 provider 。
*/
修改内核配置文件 /etc/sysctl.conf ,确保系统内核支持网桥过滤器
# vi /etc/sysctl.conf
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
[root@controller ml2]# cd /etc/neutron/plugins/ml2 && mv linuxbridge_agent.ini linuxbridge_agent.ini.source && cat linuxbridge_agent.ini.source |grep -Ev "^#|^$" > linuxbridge_agent.ini && chown root:neutron linuxbridge_agent.ini
[root@controller ml2]# ls -lt
total 32
-rw-r--r-- 1 root neutron 10 Nov 24 15:46 linuxbridge_agent.ini
-rw-r--r-- 1 root neutron 663 Nov 24 15:45 ml2_conf.ini
-rw-r----- 1 root neutron 6524 May 11 2021 sriov_agent.ini
-rw-r----- 1 root neutron 6524 May 11 2021 ml2_conf.ini.source
-rw-r----- 1 root neutron 6524 May 11 2021 linuxbridge_agent.ini.source
[root@controller ml2]# vi /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[root@controller ml2]# vi /etc/sysctl.conf
[root@controller ml2]# cat /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[DEFAULT]
#增加 [linux_bridge] 部分,将 Provider 虚拟网络映射到物理网络 ( 能与外网通信的网段 )
[linux_bridge]
physical_interface_mappings = provider:ens33
#增加 [vxlan] 部分,启用 vxlan 叠加网络
[vxlan]
# 如果要禁用 vxlan ,则设置为 false ,同时注释 local_ip 和 l2_population
enable_vxlan = true
# 每个 ( 控制和计算 ) 节点都要添加一个网卡,给 vxlan 专用,并且要配置 IP 地址(不需要配置网关,配置 IP 后,各节点可以使用对应 IP ping 通)
local_ip = 10.168.59.20
l2_population = true
#增加 [securitygroup] 部分,启用安全组并配置 LinuxBridge iptables 驱动。
[securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
[root@controller ml2]# cat /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
## default 1
net.ipv4.tcp_syncookies = 1
## default 0
net.ipv4.tcp_tw_reuse = 1
## default 0
net.ipv4.tcp_tw_recycle = 1
## default 60
net.ipv4.tcp_fin_timeout = 30
## default 256
net.ipv4.tcp_max_syn_backlog = 4096
## default 32768 60999
net.ipv4.ip_local_port_range = 1024 65535
## default 129=8
net.core.somaxconn = 32768
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
[root@controller ml2]#
#查看IP
[root@controller ml2]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:a1:56:5e brd ff:ff:ff:ff:ff:ff
inet 192.168.182.130/24 brd 192.168.182.255 scope global ens33
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fea1:565e/64 scope link
valid_lft forever preferred_lft forever
3: ens37: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:a1:56:68 brd ff:ff:ff:ff:ff:ff
inet 10.168.59.20/24 brd 10.168.59.255 scope global ens37
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fea1:5668/64 scope link
valid_lft forever preferred_lft forever
4: ens38: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:a1:56:72 brd ff:ff:ff:ff:ff:ff
inet 20.168.59.20/24 brd 20.168.59.255 scope global ens38
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fea1:5672/64 scope link
valid_lft forever preferred_lft forever
[DEFAULT]
interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true
"dhcp_agent.ini" 4L, 120C written
5: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:9e:2e:40 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
6: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN group default qlen 1000
link/ether 52:54:00:9e:2e:40 brd ff:ff:ff:ff:ff:ff
#执行以下命令 , 添加网桥过滤器,并设置开机加载
[root@controller ml2]# modprobe br_netfilter
[root@controller ml2]# sysctl -p
[DEFAULT]
nova_metadata_host = controller
metadata_proxy_shared_secret = openstack2022
[cache]
"metadata_agent.ini" 5L, 96C written
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.ip_local_port_range = 1024 65535
net.core.somaxconn = 32768
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
[root@controller ml2]# sed -i '$amodprobe br_netfilter' /etc/rc.local
[root@controller ml2]# chmod +x /etc/rc.d/rc.local
#修改 /etc/neutron/dhcp_agent.ini 文件,配置 DHCP 代理
[root@controller ml2]# cd /etc/neutron/ && mv dhcp_agent.ini dhcp_agent.ini.source && cat dhcp_agent.ini.source |grep -Ev "^#|^$" > dhcp_agent.ini && chown root:neutron dhcp_agent.ini
[root@controller neutron]# vi /etc/neutron//dhcp_agent.ini
[root@controller neutron]# cat /etc/neutron//dhcp_agent.ini
[DEFAULT]
interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true
#修改 /etc/neutron/metadata_agent.ini 文件,配置元数据代理
[root@controller neutron]# cd /etc/neutron/ && mv metadata_agent.ini metadata_agent.ini.source && cat metadata_agent.ini.source |grep -Ev "^#|^$" > metadata_agent.ini && chown root:neutron metadata_agent.ini
[root@controller neutron]# vi /etc/neutron/metadata_agent.ini
[root@controller neutron]# cat /etc/neutron/metadata_agent.ini
[DEFAULT]
[DEFAULT]
interface_driver = linuxbridge
external_network_bridge
~
"l3_agent.ini" 3L, 66C written
nova_metadata_host = controller
metadata_proxy_shared_secret = openstack2022
[cache]
#修改 /etc/neutron/l3_agent.ini 文件,配置 layer-3 代理
[root@controller neutron]# cd /etc/neutron/ && mv l3_agent.ini l3_agent.ini.source && cat l3_agent.ini.source |grep -Ev "^#|^$" > l3_agent.ini && chown root:neutron l3_agent.ini
[root@controller neutron]# # vi /etc/neutron/l3_agent.ini
[root@controller neutron]# ll
total 88
drwxr-xr-x 11 root root 260 Nov 24 15:23 conf.d
-rw-r--r-- 1 root neutron 120 Nov 24 17:45 dhcp_agent.ini
-rw-r----- 1 root neutron 6524 May 11 2021 dhcp_agent.ini.source
drwxr-xr-x 2 root root 6 May 11 2021 kill_scripts
-rw-r--r-- 1 root neutron 10 Nov 24 17:47 l3_agent.ini
-rw-r----- 1 root neutron 6524 May 11 2021 l3_agent.ini.source
-rw-r--r-- 1 root neutron 96 Nov 24 17:46 metadata_agent.ini
-rw-r----- 1 root neutron 11011 May 11 2021 metadata_agent.ini.source
-rw-r--r-- 1 root neutron 1221 Nov 24 15:31 neutron.conf
-rw-r----- 1 root neutron 39708 May 11 2021 neutron.conf.source
drwxr-xr-x 3 root root 17 Nov 24 15:23 plugins
-rw-r--r-- 1 root root 1298 May 10 2021 rootwrap.conf
[root@controller neutron]# vi /etc/neutron/l3_agent.ini
[root@controller neutron]# cat /etc/neutron/l3_agent.ini
[DEFAULT]
interface_driver = linuxbridge
external_network_bridge =
[root@controller neutron]#
配置计算服务以使用 Neutron 网络(此步可以放到安装并配置 nova )
[root@controller neutron]# yum -y install openstack-nova-api openstack-nova-conductor openstack-nova-novncproxy openstack-nova-scheduler
Loaded plugins: fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: mirrors.ustc.edu.cn
* extras: mirrors.ustc.edu.cn
* updates: mirrors.ustc.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package openstack-nova-api.noarch 1:20.6.0-1.el7 will be installed
--> Processing Dependency: openstack-nova-common = 1:20.6.0-1.el7 for package: 1:openstack-nova-api-20.6.0-1.el7.noarch
---> Package openstack-nova-conductor.noarch 1:20.6.0-1.el7 will be installed
---> Package openstack-nova-novncproxy.noarch 1:20.6.0-1.el7 will be installed
--> Processing Dependency: python-websockify for package: 1:openstack-nova-novncproxy-20.6.0-1.el7.noarch
--> Processing Dependency: novnc for package: 1:openstack-nova-novncproxy-20.6.0-1.el7.noarch
---> Package openstack-nova-scheduler.noarch 1:20.6.0-1.el7 will be installed
--> Running transaction check
---> Package novnc.noarch 0:1.1.0-6.el7 will be installed
---> Package openstack-nova-common.noarch 1:20.6.0-1.el7 will be installed
--> Processing Dependency: python2-nova = 1:20.6.0-1.el7 for package: 1:openstack-nova-common-20.6.0-1.el7.noarch
---> Package python2-websockify.noarch 0:0.8.0-13.el7 will be installed
--> Running transaction check
---> Package python2-nova.noarch 1:20.6.0-1.el7 will be installed
--> Processing Dependency: python2-tooz >= 1.58.0 for package: 1:python2-nova-20.6.0-1.el7.noarch
--> Running transaction check
---> Package python2-tooz.noarch 0:1.66.3-1.el7 will be installed
--> Processing Dependency: python2-voluptuous >= 0.8.9 for package: python2-tooz-1.66.3-1.el7.noarch
--> Processing Dependency: python2-zake for package: python2-tooz-1.66.3-1.el7.noarch
--> Processing Dependency: python-redis for package: python2-tooz-1.66.3-1.el7.noarch
--> Running transaction check
---> Package python2-redis.noarch 0:3.1.0-1.el7 will be installed
---> Package python2-voluptuous.noarch 0:0.11.5-1.el7.1 will be installed
---> Package python2-zake.noarch 0:0.2.2-2.el7 will be installed
--> Processing Dependency: python-kazoo for package: python2-zake-0.2.2-2.el7.noarch
--> Running transaction check
---> Package python-kazoo.noarch 0:2.2.1-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================
Installing:
openstack-nova-api noarch 1:20.6.0-1.el7 centos-openstack-train 7.9 k
openstack-nova-conductor noarch 1:20.6.0-1.el7 centos-openstack-train 5.5 k
openstack-nova-novncproxy noarch 1:20.6.0-1.el7 centos-openstack-train 5.9 k
openstack-nova-scheduler noarch 1:20.6.0-1.el7 centos-openstack-train 5.5 k
Installing for dependencies:
novnc noarch 1.1.0-6.el7 centos-openstack-train 949 k
openstack-nova-common noarch 1:20.6.0-1.el7 centos-openstack-train 289 k
python-kazoo noarch 2.2.1-1.el7 centos-openstack-train 130 k
python2-nova noarch 1:20.6.0-1.el7 centos-openstack-train 3.6 M
python2-redis noarch 3.1.0-1.el7 centos-openstack-train 120 k
python2-tooz noarch 1.66.3-1.el7 centos-openstack-train 99 k
python2-voluptuous noarch 0.11.5-1.el7.1 epel 53 k
python2-websockify noarch 0.8.0-13.el7 centos-openstack-train 50 k
python2-zake noarch 0.2.2-2.el7 centos-openstack-train 39 k
Transaction Summary
============================================================================================================================================
Install 4 Packages (+9 Dependent packages)
Total download size: 5.3 M
Installed size: 22 M
Downloading packages:
(1/13): openstack-nova-api-20.6.0-1.el7.noarch.rpm | 7.9 kB 00:00:00
(2/13): novnc-1.1.0-6.el7.noarch.rpm | 949 kB 00:00:00
(3/13): openstack-nova-common-20.6.0-1.el7.noarch.rpm | 289 kB 00:00:00
(4/13): openstack-nova-conductor-20.6.0-1.el7.noarch.rpm | 5.5 kB 00:00:00
(5/13): openstack-nova-novncproxy-20.6.0-1.el7.noarch.rpm | 5.9 kB 00:00:00
(6/13): openstack-nova-scheduler-20.6.0-1.el7.noarch.rpm | 5.5 kB 00:00:00
(7/13): python-kazoo-2.2.1-1.el7.noarch.rpm | 130 kB 00:00:00
(8/13): python2-redis-3.1.0-1.el7.noarch.rpm | 120 kB 00:00:00
(9/13): python2-tooz-1.66.3-1.el7.noarch.rpm | 99 kB 00:00:00
(10/13): python2-websockify-0.8.0-13.el7.noarch.rpm | 50 kB 00:00:00
(11/13): python2-zake-0.2.2-2.el7.noarch.rpm | 39 kB 00:00:00
(12/13): python2-nova-20.6.0-1.el7.noarch.rpm | 3.6 MB 00:00:00
(13/13): python2-voluptuous-0.11.5-1.el7.1.noarch.rpm | 53 kB 00:00:00
--------------------------------------------------------------------------------------------------------------------------------------------
Total 11 MB/s | 5.3 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python2-websockify-0.8.0-13.el7.noarch 1/13
Installing : novnc-1.1.0-6.el7.noarch 2/13
Installing : python2-voluptuous-0.11.5-1.el7.1.noarch 3/13
Installing : python2-redis-3.1.0-1.el7.noarch 4/13
Installing : python-kazoo-2.2.1-1.el7.noarch 5/13
Installing : python2-zake-0.2.2-2.el7.noarch 6/13
Installing : python2-tooz-1.66.3-1.el7.noarch 7/13
Installing : 1:python2-nova-20.6.0-1.el7.noarch 8/13
Installing : 1:openstack-nova-common-20.6.0-1.el7.noarch 9/13
Installing : 1:openstack-nova-scheduler-20.6.0-1.el7.noarch 10/13
Installing : 1:openstack-nova-novncproxy-20.6.0-1.el7.noarch 11/13
Installing : 1:openstack-nova-conductor-20.6.0-1.el7.noarch 12/13
Installing : 1:openstack-nova-api-20.6.0-1.el7.noarch 13/13
Verifying : python-kazoo-2.2.1-1.el7.noarch 1/13
Verifying : python2-websockify-0.8.0-13.el7.noarch 2/13
Verifying : 1:openstack-nova-scheduler-20.6.0-1.el7.noarch 3/13
Verifying : 1:openstack-nova-novncproxy-20.6.0-1.el7.noarch 4/13
Verifying : python2-zake-0.2.2-2.el7.noarch 5/13
Verifying : python2-tooz-1.66.3-1.el7.noarch 6/13
Verifying : 1:openstack-nova-common-20.6.0-1.el7.noarch 7/13
Verifying : python2-redis-3.1.0-1.el7.noarch 8/13
Verifying : 1:openstack-nova-conductor-20.6.0-1.el7.noarch 9/13
Verifying : novnc-1.1.0-6.el7.noarch 10/13
Verifying : 1:python2-nova-20.6.0-1.el7.noarch 11/13
Verifying : python2-voluptuous-0.11.5-1.el7.1.noarch 12/13
Verifying : 1:openstack-nova-api-20.6.0-1.el7.noarch 13/13
Installed:
openstack-nova-api.noarch 1:20.6.0-1.el7 openstack-nova-conductor.noarch 1:20.6.0-1.el7
openstack-nova-novncproxy.noarch 1:20.6.0-1.el7 openstack-nova-scheduler.noarch 1:20.6.0-1.el7
Dependency Installed:
novnc.noarch 0:1.1.0-6.el7 openstack-nova-common.noarch 1:20.6.0-1.el7 python-kazoo.noarch 0:2.2.1-1.el7
python2-nova.noarch 1:20.6.0-1.el7 python2-redis.noarch 0:3.1.0-1.el7 python2-tooz.noarch 0:1.66.3-1.el7
python2-voluptuous.noarch 0:0.11.5-1.el7.1 python2-websockify.noarch 0:0.8.0-13.el7 python2-zake.noarch 0:0.2.2-2.el7
Complete!
[root@controller neutron]# cd /etc/nova/ && mv nova.conf nova.conf.source && cat nova.conf.source |grep -Ev "^#|^$" > nova.conf && chown root:nova nova.conf
[root@controller nova]#
配置计算服务以使用 Neutron 网络(此步可以放到安装并配置 nova )
配置 nova
[root@controller neutron]# cd /etc/nova/ && mv nova.conf nova.conf.source && cat nova.conf.source |grep -Ev "^#|^$" > nova.conf && chown root:nova nova.conf
[root@controller nova]# ^C
[root@controller nova]# vi /etc/nova/nova.conf
[root@controller nova]# cat /etc/nova/nova.conf
[DEFAULT]
[api]
[api_database]
[barbican]
[cache]
[cinder]
[compute]
[conductor]
[console]
[consoleauth]
[cors]
[database]
[devices]
[ephemeral_storage_encryption]
[filter_scheduler]
[glance]
[guestfs]
[healthcheck]
[hyperv]
[ironic]
[key_manager]
[keystone]
[keystone_authtoken]
[libvirt]
[metrics]
[mks]
[neutron]
url = http://controller:9696
auth_url = http://controller:5000
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = openstack2022
service_metadata_proxy = true
metadata_proxy_shared_secret = openstack2022
[notifications]
[osapi_v21]
[oslo_concurrency]
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_middleware]
[oslo_policy]
[pci]
[placement]
[powervm]
[privsep]
[profiler]
[quota]
[rdp]
[remote_debug]
[scheduler]
[serial_console]
[service_user]
[spice]
[upgrade_levels]
[vault]
[vendordata_dynamic_auth]
[vmware]
[vnc]
[workarounds]
[wsgi]
[xenserver]
[xvp]
[zvm]
#初始化创建网络
[root@controller nova]# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
#同步 neutron 数据库
[root@controller nova]# 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^C
[root@controller nova]# 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
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
/usr/lib/python2.7/site-packages/pymysql/cursors.py:170: Warning: (1280, u"Name 'alembic_version_pkc' ignored for PRIMARY key.")
result = self._query(query)
Running upgrade for neutron ...
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> kilo
INFO [alembic.runtime.migration] Running upgrade kilo -> 354db87e3225
INFO [alembic.runtime.migration] Running upgrade 354db87e3225 -> 599c6a226151
INFO [alembic.runtime.migration] Running upgrade 599c6a226151 -> 52c5312f6baf
INFO [alembic.runtime.migration] Running upgrade 52c5312f6baf -> 313373c0ffee
INFO [alembic.runtime.migration] Running upgrade 313373c0ffee -> 8675309a5c4f
INFO [alembic.runtime.migration] Running upgrade 8675309a5c4f -> 45f955889773
INFO [alembic.runtime.migration] Running upgrade 45f955889773 -> 26c371498592
INFO [alembic.runtime.migration] Running upgrade 26c371498592 -> 1c844d1677f7
INFO [alembic.runtime.migration] Running upgrade 1c844d1677f7 -> 1b4c6e320f79
INFO [alembic.runtime.migration] Running upgrade 1b4c6e320f79 -> 48153cb5f051
INFO [alembic.runtime.migration] Running upgrade 48153cb5f051 -> 9859ac9c136
INFO [alembic.runtime.migration] Running upgrade 9859ac9c136 -> 34af2b5c5a59
INFO [alembic.runtime.migration] Running upgrade 34af2b5c5a59 -> 59cb5b6cf4d
INFO [alembic.runtime.migration] Running upgrade 59cb5b6cf4d -> 13cfb89f881a
INFO [alembic.runtime.migration] Running upgrade 13cfb89f881a -> 32e5974ada25
INFO [alembic.runtime.migration] Running upgrade 32e5974ada25 -> ec7fcfbf72ee
INFO [alembic.runtime.migration] Running upgrade ec7fcfbf72ee -> dce3ec7a25c9
INFO [alembic.runtime.migration] Running upgrade dce3ec7a25c9 -> c3a73f615e4
INFO [alembic.runtime.migration] Running upgrade c3a73f615e4 -> 659bf3d90664
INFO [alembic.runtime.migration] Running upgrade 659bf3d90664 -> 1df244e556f5
INFO [alembic.runtime.migration] Running upgrade 1df244e556f5 -> 19f26505c74f
INFO [alembic.runtime.migration] Running upgrade 19f26505c74f -> 15be73214821
INFO [alembic.runtime.migration] Running upgrade 15be73214821 -> b4caf27aae4
INFO [alembic.runtime.migration] Running upgrade b4caf27aae4 -> 15e43b934f81
INFO [alembic.runtime.migration] Running upgrade 15e43b934f81 -> 31ed664953e6
INFO [alembic.runtime.migration] Running upgrade 31ed664953e6 -> 2f9e956e7532
INFO [alembic.runtime.migration] Running upgrade 2f9e956e7532 -> 3894bccad37f
INFO [alembic.runtime.migration] Running upgrade 3894bccad37f -> 0e66c5227a8a
INFO [alembic.runtime.migration] Running upgrade 0e66c5227a8a -> 45f8dd33480b
INFO [alembic.runtime.migration] Running upgrade 45f8dd33480b -> 5abc0278ca73
INFO [alembic.runtime.migration] Running upgrade kilo -> 30018084ec99
INFO [alembic.runtime.migration] Running upgrade 30018084ec99 -> 4ffceebfada
INFO [alembic.runtime.migration] Running upgrade 4ffceebfada -> 5498d17be016
INFO [alembic.runtime.migration] Running upgrade 5498d17be016 -> 2a16083502f3
INFO [alembic.runtime.migration] Running upgrade 2a16083502f3 -> 2e5352a0ad4d
INFO [alembic.runtime.migration] Running upgrade 2e5352a0ad4d -> 11926bcfe72d
INFO [alembic.runtime.migration] Running upgrade 11926bcfe72d -> 4af11ca47297
INFO [alembic.runtime.migration] Running upgrade 4af11ca47297 -> 1b294093239c
INFO [alembic.runtime.migration] Running upgrade 1b294093239c -> 8a6d8bdae39
INFO [alembic.runtime.migration] Running upgrade 8a6d8bdae39 -> 2b4c2465d44b
INFO [alembic.runtime.migration] Running upgrade 2b4c2465d44b -> e3278ee65050
INFO [alembic.runtime.migration] Running upgrade e3278ee65050 -> c6c112992c9
INFO [alembic.runtime.migration] Running upgrade c6c112992c9 -> 5ffceebfada
INFO [alembic.runtime.migration] Running upgrade 5ffceebfada -> 4ffceebfcdc
INFO [alembic.runtime.migration] Running upgrade 4ffceebfcdc -> 7bbb25278f53
INFO [alembic.runtime.migration] Running upgrade 7bbb25278f53 -> 89ab9a816d70
INFO [alembic.runtime.migration] Running upgrade 5abc0278ca73 -> d3435b514502
INFO [alembic.runtime.migration] Running upgrade d3435b514502 -> 30107ab6a3ee
INFO [alembic.runtime.migration] Running upgrade 30107ab6a3ee -> c415aab1c048
INFO [alembic.runtime.migration] Running upgrade c415aab1c048 -> a963b38d82f4
INFO [alembic.runtime.migration] Running upgrade 89ab9a816d70 -> c879c5e1ee90
INFO [alembic.runtime.migration] Running upgrade c879c5e1ee90 -> 8fd3918ef6f4
INFO [alembic.runtime.migration] Running upgrade 8fd3918ef6f4 -> 4bcd4df1f426
INFO [alembic.runtime.migration] Running upgrade 4bcd4df1f426 -> b67e765a3524
INFO [alembic.runtime.migration] Running upgrade a963b38d82f4 -> 3d0e74aa7d37
INFO [alembic.runtime.migration] Running upgrade 3d0e74aa7d37 -> 030a959ceafa
INFO [alembic.runtime.migration] Running upgrade 030a959ceafa -> a5648cfeeadf
INFO [alembic.runtime.migration] Running upgrade a5648cfeeadf -> 0f5bef0f87d4
INFO [alembic.runtime.migration] Running upgrade 0f5bef0f87d4 -> 67daae611b6e
INFO [alembic.runtime.migration] Running upgrade 67daae611b6e -> 6b461a21bcfc
INFO [alembic.runtime.migration] Running upgrade 6b461a21bcfc -> 5cd92597d11d
INFO [alembic.runtime.migration] Running upgrade 5cd92597d11d -> 929c968efe70
INFO [alembic.runtime.migration] Running upgrade 929c968efe70 -> a9c43481023c
INFO [alembic.runtime.migration] Running upgrade a9c43481023c -> 804a3c76314c
INFO [alembic.runtime.migration] Running upgrade 804a3c76314c -> 2b42d90729da
INFO [alembic.runtime.migration] Running upgrade 2b42d90729da -> 62c781cb6192
INFO [alembic.runtime.migration] Running upgrade 62c781cb6192 -> c8c222d42aa9
INFO [alembic.runtime.migration] Running upgrade c8c222d42aa9 -> 349b6fd605a6
INFO [alembic.runtime.migration] Running upgrade 349b6fd605a6 -> 7d32f979895f
INFO [alembic.runtime.migration] Running upgrade 7d32f979895f -> 594422d373ee
INFO [alembic.runtime.migration] Running upgrade 594422d373ee -> 61663558142c
INFO [alembic.runtime.migration] Running upgrade 61663558142c -> 867d39095bf4, port forwarding
INFO [alembic.runtime.migration] Running upgrade 867d39095bf4 -> d72db3e25539, modify uniq port forwarding
INFO [alembic.runtime.migration] Running upgrade d72db3e25539 -> cada2437bf41
INFO [alembic.runtime.migration] Running upgrade cada2437bf41 -> 195176fb410d, router gateway IP QoS
INFO [alembic.runtime.migration] Running upgrade 195176fb410d -> fb0167bd9639
INFO [alembic.runtime.migration] Running upgrade fb0167bd9639 -> 0ff9e3881597
INFO [alembic.runtime.migration] Running upgrade 0ff9e3881597 -> 9bfad3f1e780
INFO [alembic.runtime.migration] Running upgrade 9bfad3f1e780 -> 63fd95af7dcd
INFO [alembic.runtime.migration] Running upgrade 63fd95af7dcd -> c613d0b82681
INFO [alembic.runtime.migration] Running upgrade b67e765a3524 -> a84ccf28f06a
INFO [alembic.runtime.migration] Running upgrade a84ccf28f06a -> 7d9d8eeec6ad
INFO [alembic.runtime.migration] Running upgrade 7d9d8eeec6ad -> a8b517cff8ab
INFO [alembic.runtime.migration] Running upgrade a8b517cff8ab -> 3b935b28e7a0
INFO [alembic.runtime.migration] Running upgrade 3b935b28e7a0 -> b12a3ef66e62
INFO [alembic.runtime.migration] Running upgrade b12a3ef66e62 -> 97c25b0d2353
INFO [alembic.runtime.migration] Running upgrade 97c25b0d2353 -> 2e0d7a8a1586
INFO [alembic.runtime.migration] Running upgrade 2e0d7a8a1586 -> 5c85685d616d
OK
#启动 neutron 各服务并设置为开机自启动
[root@controller nova]# systemctl enable neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service
neutron-l3-agent.servicCreated symlink from /etc/systemd/system/multi-user.target.wants/neutron-server.service to /usr/lib/systemd/system/neutron-server.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-linuxbridge-agent.service to /usr/lib/systemd/system/neutron-linuxbridge-agent.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-dhcp-agent.service to /usr/lib/systemd/system/neutron-dhcp-agent.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-metadata-agent.service to /usr/lib/systemd/system/neutron-metadata-agent.service.
[root@controller nova]# systemctl enable neutron-l3-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-l3-agent.service to /usr/lib/systemd/system/neutron-l3-agent.service.
[root@controller nova]# systemctl restart neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service neutron-l3-agent.service
[root@controller nova]# systemctl restart neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service neutron-l3-agent.service
[root@controller neutron]# ll l3_agent.ini
-rw-r--r-- 1 root neutron 66 Nov 24 17:47 l3_agent.ini
[root@controller neutron]# vi l3_agent.ini
[root@controller neutron]# systemctl restart neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service neutron-l3-agent.service
[root@controller neutron]# systemctl status neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service neutron-l3-agent.service
● neutron-server.service - OpenStack Neutron Server
Loaded: loaded (/usr/lib/systemd/system/neutron-server.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2022-11-24 18:10:34 CST; 5s ago
Main PID: 73975 (/usr/bin/python)
Tasks: 7
CGroup: /system.slice/neutron-server.service
├─73975 /usr/bin/python2 /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf --config-dir /usr/share/ne...
├─73987 /usr/bin/python2 /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf --config-dir /usr/share/ne...
├─73988 /usr/bin/python2 /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf --config-dir /usr/share/ne...
├─73989 /usr/bin/python2 /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf --config-dir /usr/share/ne...
├─73990 neutron-server: rpc worker (/usr/bin/python2 /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.con...
├─73991 neutron-server: rpc worker (/usr/bin/python2 /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.con...
└─73992 neutron-server: periodic worker (/usr/bin/python2 /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dis...
Nov 24 18:10:32 controller systemd[1]: Starting OpenStack Neutron Server...
Nov 24 18:10:33 controller neutron-server[73975]: /usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py:22: PkgResourcesDepreca...ately.
Nov 24 18:10:33 controller neutron-server[73975]: return pkg_resources.EntryPoint.parse("x=" + s).load(False)
Nov 24 18:10:34 controller systemd[1]: Started OpenStack Neutron Server.
● neutron-linuxbridge-agent.service - OpenStack Neutron Linux Bridge Agent
Loaded: loaded (/usr/lib/systemd/system/neutron-linuxbridge-agent.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2022-11-24 18:09:59 CST; 40s ago
Process: 73809 ExecStartPre=/usr/bin/neutron-enable-bridge-firewall.sh (code=exited, status=0/SUCCESS)
Main PID: 73816 (/usr/bin/python)
Tasks: 1
CGroup: /system.slice/neutron-linuxbridge-agent.service
└─73816 /usr/bin/python2 /usr/bin/neutron-linuxbridge-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /...
Nov 24 18:09:59 controller systemd[1]: Starting OpenStack Neutron Linux Bridge Agent...
Nov 24 18:09:59 controller neutron-enable-bridge-firewall.sh[73809]: net.bridge.bridge-nf-call-iptables = 1
Nov 24 18:09:59 controller neutron-enable-bridge-firewall.sh[73809]: net.bridge.bridge-nf-call-ip6tables = 1
Nov 24 18:09:59 controller systemd[1]: Started OpenStack Neutron Linux Bridge Agent.
Nov 24 18:10:01 controller sudo[73856]: neutron : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/neutron-rootwrap /etc/neutron/rootwrap....
Nov 24 18:10:02 controller sudo[73923]: neutron : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/neutron-rootwrap-daemon /etc/neu...ap.conf
● neutron-dhcp-agent.service - OpenStack Neutron DHCP Agent
Loaded: loaded (/usr/lib/systemd/system/neutron-dhcp-agent.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2022-11-24 18:10:12 CST; 27s ago
Main PID: 73956 (/usr/bin/python)
Tasks: 1
CGroup: /system.slice/neutron-dhcp-agent.service
└─73956 /usr/bin/python2 /usr/bin/neutron-dhcp-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neu...
Nov 24 18:10:12 controller systemd[1]: Stopped OpenStack Neutron DHCP Agent.
Nov 24 18:10:12 controller systemd[1]: Started OpenStack Neutron DHCP Agent.
● neutron-metadata-agent.service - OpenStack Neutron Metadata Agent
Loaded: loaded (/usr/lib/systemd/system/neutron-metadata-agent.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2022-11-24 18:09:59 CST; 40s ago
Main PID: 73813 (/usr/bin/python)
Tasks: 3
CGroup: /system.slice/neutron-metadata-agent.service
├─73813 /usr/bin/python2 /usr/bin/neutron-metadata-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc...
├─73854 /usr/bin/python2 /usr/bin/neutron-metadata-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc...
└─73855 /usr/bin/python2 /usr/bin/neutron-metadata-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc...
Nov 24 18:09:59 controller systemd[1]: Started OpenStack Neutron Metadata Agent.
● neutron-l3-agent.service - OpenStack Neutron Layer 3 Agent
Loaded: loaded (/usr/lib/systemd/system/neutron-l3-agent.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2022-11-24 18:09:59 CST; 40s ago
Main PID: 73792 (/usr/bin/python)
Tasks: 1
CGroup: /system.slice/neutron-l3-agent.service
└─73792 /usr/bin/python2 /usr/bin/neutron-l3-agent --config-file /usr/share/neutron/neutron-dist.conf --config-dir /usr/share/...
Nov 24 18:09:59 controller systemd[1]: Started OpenStack Neutron Layer 3 Agent.
Nov 24 18:10:01 controller sudo[73869]: neutron : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/neutron-rootwrap /etc/neutron/rootwrap....
Hint: Some lines were ellipsized, use -l to show in full.
[root@controller neutron]#
在计算节点( compute01 、 compute02 )安装 Neutron 服务,同时配置支持 vxlan
#安装组件,由于 neutron 和 nova 之间有相互调用配置,此处将计算服务一并安装
[root@compute01 nova]# yum -y install openstack-nova-compute
Loaded plugins: fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: mirrors.ustc.edu.cn
* extras: mirrors.ustc.edu.cn
* updates: mirrors.ustc.edu.cn
Package 1:openstack-nova-compute-20.6.0-1.el7.noarch already installed and latest version
Nothing to do
[root@compute01 nova]# yum -y install openstack-neutron-linuxbridge ebtables ipset
Loaded plugins: fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: mirrors.ustc.edu.cn
* extras: mirrors.ustc.edu.cn
* updates: mirrors.ustc.edu.cn
Package ebtables-2.0.10-16.el7.x86_64 already installed and latest version
Package ipset-7.1-1.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package openstack-neutron-linuxbridge.noarch 1:15.3.4-1.el7 will be installed
--> Processing Dependency: openstack-neutron-common = 1:15.3.4-1.el7 for package: 1:openstack-neutron-linuxbridge-15.3.4-1.el7.noarch
--> Running transaction check
---> Package openstack-neutron-common.noarch 1:15.3.4-1.el7 will be installed
--> Processing Dependency: python2-neutron = 1:15.3.4-1.el7 for package: 1:openstack-neutron-common-15.3.4-1.el7.noarch
--> Running transaction check
---> Package python2-neutron.noarch 1:15.3.4-1.el7 will be installed
--> Processing Dependency: python2-weakrefmethod >= 1.0.2 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: python2-pecan >= 1.3.2 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: python2-osprofiler >= 2.3.0 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: python2-os-xenapi >= 0.3.1 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: python2-os-ken >= 0.3.1 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: python2-neutron-lib >= 1.29.1 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: python2-designateclient >= 2.7.0 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Processing Dependency: python-httplib2 >= 0.9.1 for package: 1:python2-neutron-15.3.4-1.el7.noarch
--> Running transaction check
---> Package python2-designateclient.noarch 0:3.0.0-1.el7 will be installed
---> Package python2-httplib2.noarch 0:0.18.1-3.el7 will be installed
---> Package python2-neutron-lib.noarch 0:1.29.1-1.el7 will be installed
--> Processing Dependency: python-setproctitle for package: python2-neutron-lib-1.29.1-1.el7.noarch
---> Package python2-os-ken.noarch 0:0.4.1-1.el7 will be installed
--> Processing Dependency: python2-tinyrpc for package: python2-os-ken-0.4.1-1.el7.noarch
---> Package python2-os-xenapi.noarch 0:0.3.4-1.el7 will be installed
---> Package python2-osprofiler.noarch 0:2.8.2-1.el7 will be installed
---> Package python2-pecan.noarch 0:1.3.2-1.el7 will be installed
--> Processing Dependency: python2-singledispatch for package: python2-pecan-1.3.2-1.el7.noarch
--> Processing Dependency: python-webtest for package: python2-pecan-1.3.2-1.el7.noarch
--> Processing Dependency: python-simplegeneric for package: python2-pecan-1.3.2-1.el7.noarch
--> Processing Dependency: python-logutils for package: python2-pecan-1.3.2-1.el7.noarch
---> Package python2-weakrefmethod.noarch 0:1.0.2-3.el7 will be installed
--> Running transaction check
---> Package python-logutils.noarch 0:0.3.3-3.el7 will be installed
---> Package python-simplegeneric.noarch 0:0.8-7.el7 will be installed
---> Package python-webtest.noarch 0:2.0.23-1.el7 will be installed
--> Processing Dependency: python-waitress for package: python-webtest-2.0.23-1.el7.noarch
--> Processing Dependency: python-beautifulsoup4 for package: python-webtest-2.0.23-1.el7.noarch
---> Package python2-setproctitle.x86_64 0:1.1.10-12.el7 will be installed
---> Package python2-singledispatch.noarch 0:3.4.0.3-4.el7 will be installed
---> Package python2-tinyrpc.noarch 0:0.5-4.20170523git1f38ac.el7 will be installed
--> Processing Dependency: python-zmq for package: python2-tinyrpc-0.5-4.20170523git1f38ac.el7.noarch
--> Processing Dependency: python-werkzeug for package: python2-tinyrpc-0.5-4.20170523git1f38ac.el7.noarch
--> Processing Dependency: python-gevent for package: python2-tinyrpc-0.5-4.20170523git1f38ac.el7.noarch
--> Running transaction check
---> Package python-beautifulsoup4.noarch 0:4.6.0-1.el7 will be installed
---> Package python-waitress.noarch 0:0.8.9-5.el7 will be installed
---> Package python2-gevent.x86_64 0:1.1.2-2.el7 will be installed
--> Processing Dependency: libev.so.4()(64bit) for package: python2-gevent-1.1.2-2.el7.x86_64
---> Package python2-werkzeug.noarch 0:0.14.1-3.el7 will be installed
---> Package python2-zmq.x86_64 0:14.7.0-11.el7 will be installed
--> Processing Dependency: libzmq.so.5()(64bit) for package: python2-zmq-14.7.0-11.el7.x86_64
--> Running transaction check
---> Package libev.x86_64 0:4.15-7.el7 will be installed
---> Package zeromq.x86_64 0:4.1.4-6.el7 will be installed
--> Processing Dependency: libpgm-5.2.so.0()(64bit) for package: zeromq-4.1.4-6.el7.x86_64
--> Running transaction check
---> Package openpgm.x86_64 0:5.2.122-2.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================
Installing:
openstack-neutron-linuxbridge noarch 1:15.3.4-1.el7 centos-openstack-train 13 k
Installing for dependencies:
libev x86_64 4.15-7.el7 extras 44 k
openpgm x86_64 5.2.122-2.el7 centos-openstack-train 172 k
openstack-neutron-common noarch 1:15.3.4-1.el7 centos-openstack-train 198 k
python-beautifulsoup4 noarch 4.6.0-1.el7 centos-openstack-train 171 k
python-logutils noarch 0.3.3-3.el7 centos-openstack-train 42 k
python-simplegeneric noarch 0.8-7.el7 centos-openstack-train 12 k
python-waitress noarch 0.8.9-5.el7 centos-openstack-train 152 k
python-webtest noarch 2.0.23-1.el7 centos-openstack-train 84 k
python2-designateclient noarch 3.0.0-1.el7 centos-openstack-train 88 k
python2-gevent x86_64 1.1.2-2.el7 centos-openstack-train 443 k
python2-httplib2 noarch 0.18.1-3.el7 epel 125 k
python2-neutron noarch 1:15.3.4-1.el7 centos-openstack-train 2.3 M
python2-neutron-lib noarch 1.29.1-1.el7 centos-openstack-train 362 k
python2-os-ken noarch 0.4.1-1.el7 centos-openstack-train 2.2 M
python2-os-xenapi noarch 0.3.4-1.el7 centos-openstack-train 74 k
python2-osprofiler noarch 2.8.2-1.el7 centos-openstack-train 125 k
python2-pecan noarch 1.3.2-1.el7 centos-openstack-train 268 k
python2-setproctitle x86_64 1.1.10-12.el7 centos-openstack-train 19 k
python2-singledispatch noarch 3.4.0.3-4.el7 centos-openstack-train 18 k
python2-tinyrpc noarch 0.5-4.20170523git1f38ac.el7 centos-openstack-train 32 k
python2-weakrefmethod noarch 1.0.2-3.el7 centos-openstack-train 13 k
python2-werkzeug noarch 0.14.1-3.el7 centos-openstack-train 466 k
python2-zmq x86_64 14.7.0-11.el7 epel 505 k
zeromq x86_64 4.1.4-6.el7 epel 556 k
Transaction Summary
=====================================================================================================================================
Install 1 Package (+24 Dependent packages)
Total download size: 8.4 M
Installed size: 49 M
Downloading packages:
(1/25): libev-4.15-7.el7.x86_64.rpm | 44 kB 00:00:03
(2/25): openstack-neutron-common-15.3.4-1.el7.noarch.rpm | 198 kB 00:00:03
(3/25): openstack-neutron-linuxbridge-15.3.4-1.el7.noarch.rpm | 13 kB 00:00:00
(4/25): openpgm-5.2.122-2.el7.x86_64.rpm | 172 kB 00:00:03
(5/25): python-logutils-0.3.3-3.el7.noarch.rpm | 42 kB 00:00:00
(6/25): python-beautifulsoup4-4.6.0-1.el7.noarch.rpm | 171 kB 00:00:00
(7/25): python-simplegeneric-0.8-7.el7.noarch.rpm | 12 kB 00:00:00
(8/25): python-webtest-2.0.23-1.el7.noarch.rpm | 84 kB 00:00:00
(9/25): python2-designateclient-3.0.0-1.el7.noarch.rpm | 88 kB 00:00:00
(10/25): python2-gevent-1.1.2-2.el7.x86_64.rpm | 443 kB 00:00:00
(11/25): python2-neutron-15.3.4-1.el7.noarch.rpm | 2.3 MB 00:00:03
(12/25): python2-neutron-lib-1.29.1-1.el7.noarch.rpm | 362 kB 00:00:00
(13/25): python2-httplib2-0.18.1-3.el7.noarch.rpm | 125 kB 00:00:05
(14/25): python-waitress-0.8.9-5.el7.noarch.rpm | 152 kB 00:00:08
(15/25): python2-os-ken-0.4.1-1.el7.noarch.rpm | 2.2 MB 00:00:04
(16/25): python2-os-xenapi-0.3.4-1.el7.noarch.rpm | 74 kB 00:00:01
(17/25): python2-osprofiler-2.8.2-1.el7.noarch.rpm | 125 kB 00:00:02
(18/25): python2-setproctitle-1.1.10-12.el7.x86_64.rpm | 19 kB 00:00:00
(19/25): python2-pecan-1.3.2-1.el7.noarch.rpm | 268 kB 00:00:01
(20/25): python2-singledispatch-3.4.0.3-4.el7.noarch.rpm | 18 kB 00:00:00
(21/25): python2-weakrefmethod-1.0.2-3.el7.noarch.rpm | 13 kB 00:00:00
(22/25): python2-tinyrpc-0.5-4.20170523git1f38ac.el7.noarch.rpm | 32 kB 00:00:00
(23/25): python2-werkzeug-0.14.1-3.el7.noarch.rpm | 466 kB 00:00:02
(24/25): zeromq-4.1.4-6.el7.x86_64.rpm | 556 kB 00:00:02
(25/25): python2-zmq-14.7.0-11.el7.x86_64.rpm | 505 kB 00:00:03
-------------------------------------------------------------------------------------------------------------------------------------
Total 425 kB/s | 8.4 MB 00:00:20
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python2-weakrefmethod-1.0.2-3.el7.noarch 1/25
Installing : python2-osprofiler-2.8.2-1.el7.noarch 2/25
Installing : python-beautifulsoup4-4.6.0-1.el7.noarch 3/25
Installing : python2-werkzeug-0.14.1-3.el7.noarch 4/25
Installing : python-waitress-0.8.9-5.el7.noarch 5/25
Installing : python-webtest-2.0.23-1.el7.noarch 6/25
Installing : python2-setproctitle-1.1.10-12.el7.x86_64 7/25
Installing : libev-4.15-7.el7.x86_64 8/25
Installing : python2-gevent-1.1.2-2.el7.x86_64 9/25
Installing : python2-httplib2-0.18.1-3.el7.noarch 10/25
Installing : python2-os-xenapi-0.3.4-1.el7.noarch 11/25
Installing : python2-designateclient-3.0.0-1.el7.noarch 12/25
Installing : openpgm-5.2.122-2.el7.x86_64 13/25
Installing : zeromq-4.1.4-6.el7.x86_64 14/25
Installing : python2-zmq-14.7.0-11.el7.x86_64 15/25
Installing : python2-tinyrpc-0.5-4.20170523git1f38ac.el7.noarch 16/25
Installing : python2-os-ken-0.4.1-1.el7.noarch 17/25
warning: group neutron does not exist - using root
Installing : python-logutils-0.3.3-3.el7.noarch 18/25
Installing : python2-singledispatch-3.4.0.3-4.el7.noarch 19/25
Installing : python-simplegeneric-0.8-7.el7.noarch 20/25
Installing : python2-pecan-1.3.2-1.el7.noarch 21/25
Installing : python2-neutron-lib-1.29.1-1.el7.noarch 22/25
Installing : 1:python2-neutron-15.3.4-1.el7.noarch 23/25
Installing : 1:openstack-neutron-common-15.3.4-1.el7.noarch 24/25
Installing : 1:openstack-neutron-linuxbridge-15.3.4-1.el7.noarch 25/25
Verifying : python-simplegeneric-0.8-7.el7.noarch 1/25
Verifying : python2-singledispatch-3.4.0.3-4.el7.noarch 2/25
Verifying : python2-tinyrpc-0.5-4.20170523git1f38ac.el7.noarch 3/25
Verifying : 1:openstack-neutron-linuxbridge-15.3.4-1.el7.noarch 4/25
Verifying : python-logutils-0.3.3-3.el7.noarch 5/25
Verifying : python2-osprofiler-2.8.2-1.el7.noarch 6/25
Verifying : python2-zmq-14.7.0-11.el7.x86_64 7/25
Verifying : python2-os-ken-0.4.1-1.el7.noarch 8/25
Verifying : openpgm-5.2.122-2.el7.x86_64 9/25
Verifying : python2-weakrefmethod-1.0.2-3.el7.noarch 10/25
Verifying : python2-designateclient-3.0.0-1.el7.noarch 11/25
Verifying : zeromq-4.1.4-6.el7.x86_64 12/25
Verifying : python2-pecan-1.3.2-1.el7.noarch 13/25
Verifying : python2-os-xenapi-0.3.4-1.el7.noarch 14/25
Verifying : python2-httplib2-0.18.1-3.el7.noarch 15/25
Verifying : libev-4.15-7.el7.x86_64 16/25
Verifying : python2-neutron-lib-1.29.1-1.el7.noarch 17/25
Verifying : 1:openstack-neutron-common-15.3.4-1.el7.noarch 18/25
Verifying : 1:python2-neutron-15.3.4-1.el7.noarch 19/25
Verifying : python-webtest-2.0.23-1.el7.noarch 20/25
Verifying : python2-setproctitle-1.1.10-12.el7.x86_64 21/25
Verifying : python-waitress-0.8.9-5.el7.noarch 22/25
Verifying : python2-werkzeug-0.14.1-3.el7.noarch 23/25
[DEFAULT]
#
# From oslo.log
#
# If set to true, the logging level will be set to DEBUG instead of the default
# INFO level. (boolean value)
# Note: This option can be changed without restarting.
#debug = false
# The name of a logging configuration file. This file is appended to any
# existing logging configuration files. For details about logging configuration
# files, see the Python logging module documentation. Note that when logging
# configuration files are used then all logging configuration is set in the
# configuration file and other logging configuration options are ignored (for
# example, log-date-format). (string value)
# Note: This option can be changed without restarting.
# Deprecated group/name - [DEFAULT]/log_config
#log_config_append = <None>
# Defines the format string for %%(asctime)s in log records. Default:
Verifying : python-beautifulsoup4-4.6.0-1.el7.noarch 24/25
Verifying : python2-gevent-1.1.2-2.el7.x86_64 25/25
Installed:
openstack-neutron-linuxbridge.noarch 1:15.3.4-1.el7
Dependency Installed:
libev.x86_64 0:4.15-7.el7 openpgm.x86_64 0:5.2.122-2.el7
openstack-neutron-common.noarch 1:15.3.4-1.el7 python-beautifulsoup4.noarch 0:4.6.0-1.el7
python-logutils.noarch 0:0.3.3-3.el7 python-simplegeneric.noarch 0:0.8-7.el7
python-waitress.noarch 0:0.8.9-5.el7 python-webtest.noarch 0:2.0.23-1.el7
python2-designateclient.noarch 0:3.0.0-1.el7 python2-gevent.x86_64 0:1.1.2-2.el7
python2-httplib2.noarch 0:0.18.1-3.el7 python2-neutron.noarch 1:15.3.4-1.el7
python2-neutron-lib.noarch 0:1.29.1-1.el7 python2-os-ken.noarch 0:0.4.1-1.el7
python2-os-xenapi.noarch 0:0.3.4-1.el7 python2-osprofiler.noarch 0:2.8.2-1.el7
python2-pecan.noarch 0:1.3.2-1.el7 python2-setproctitle.x86_64 0:1.1.10-12.el7
python2-singledispatch.noarch 0:3.4.0.3-4.el7 python2-tinyrpc.noarch 0:0.5-4.20170523git1f38ac.el7
python2-weakrefmethod.noarch 0:1.0.2-3.el7 python2-werkzeug.noarch 0:0.14.1-3.el7
python2-zmq.x86_64 0:14.7.0-11.el7 zeromq.x86_64 0:4.1.4-6.el7
Complete!
[root@compute01 nova]# vi /etc/neutron/neutron.conf
[root@compute01 nova]# ls
api-paste.ini nova.conf nova.conf.source policy.json release rootwrap.conf
[root@compute01 nova]# ll
total 236
-rw-r----- 1 root nova 2923 Mar 15 2021 api-paste.ini
-rw-r--r-- 1 nova root 2110 Nov 24 19:36 nova.conf
-rw-r----- 1 root nova 220499 Mar 16 2021 nova.conf.source
-rw-r----- 1 root nova 4 Mar 16 2021 policy.json
-rw-r--r-- 1 root root 64 Mar 16 2021 release
-rw-r----- 1 root nova 966 Mar 15 2021 rootwrap.conf
[root@compute01 nova]# cd ..
[root@compute01 etc]# ls
abrt environment kdump.conf opt selinux
adjtime ethertypes kernel os_ken services
akonadi exports krb5.conf os-release sestatus.conf
aliases exports.d krb5.conf.d PackageKit setroubleshoot
aliases.db extlinux.conf ksmtuned.conf pam.d setuptool.d
alsa favicon.png latrace.d papersize sgml
alternatives fcoe ld.so.cache passwd shadow
anacrontab festival ld.so.conf passwd- shadow-
asound.conf filesystems ld.so.conf.d pbm2ppa.conf shells
at.deny firefox libaudit.conf pcp skel
audisp firewalld libblockdev pcp.conf slp.conf
audit flatpak libibverbs.d pcp.env slp.spi
autofs.conf fonts libnl Pegasus smartmontools
autofs_ldap_auth.conf foomatic libpaper.d pinforc snmp
auto.master fprintd.conf libreport pkcs11 sos.conf
auto.master.d fstab libuser.conf pki speech-dispatcher
auto.misc fuse.conf libvirt plymouth ssh
auto.net fwupd locale.conf pm ssl
auto.smb gconf localtime pnm2ppa.conf sssd
avahi gcrypt login.defs polkit-1 statetab
bash_completion.d gdbinit logrotate.conf popt.d statetab.d
bashrc gdbinit.d logrotate.d postfix subgid
binfmt.d gdm lsb-release.d ppp subuid
bluetooth geoclue lsm prelink.conf.d subversion
brltty GeoIP.conf lvm printcap sudo.conf
brltty.conf ghostscript machine-id profile sudoers
centos-release glvnd magic profile.d sudoers.d
centos-release-upstream gnupg mailcap protocols sudo-ldap.conf
certmonger GREP_COLORS mail.rc pulse sysconfig
cgconfig.conf groff makedumpfile.conf.sample purple sysctl.conf
cgconfig.d group man_db.conf pycadf sysctl.d
cgrules.conf group- matplotlibrc python systemd
cgsnapshot_blacklist.conf grub2.cfg maven qemu-ga system-release
chkconfig.d grub.d mcelog qemu-kvm system-release-cpe
chrony.conf gshadow mime.types radvd.conf target
chrony.keys gshadow- mke2fs.conf ras tcsd.conf
cifs-utils gss modprobe.d rc0.d terminfo
cron.d gssproxy modules-load.d rc1.d tmpfiles.d
cron.daily highlight motd rc2.d Trolltech.conf
cron.deny host.conf mtab rc3.d trusted-key.key
cron.hourly hostname mtools.conf rc4.d tuned
cron.monthly hosts multipath rc5.d udev
crontab hosts.allow my.cnf rc6.d udisks2
cron.weekly hosts.deny my.cnf.d rc.d unbound
crypttab hp nanorc rc.local updatedb.conf
csh.cshrc httpd ndctl rdma UPower
csh.login idmapd.conf netconfig redhat-lsb usb_modeswitch.conf
cups init.d NetworkManager redhat-release vconsole.conf
cupshelpers inittab networks request-key.conf vimrc
dbus-1 inputrc neutron request-key.d virc
dconf ipa nfs.conf resolv.conf virtuoso
default ipmi nfsmount.conf resolv.conf.save vmware-tools
depmod.d iproute2 nova rpc wgetrc
dhcp ipsec.conf nsswitch.conf rpm wpa_supplicant
DIR_COLORS ipsec.d nsswitch.conf.bak rsyncd.conf wvdial.conf
[DEFAULT]
transport_url = rabbit://openstack:openstack@controller
auth_strategy = keystone
[cors]
[database]
[keystone_authtoken]
[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = openstack2022
token_cache_time=3600
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
"neutron.conf" 30L, 638C written
DIR_COLORS.256color ipsec.secrets ntp rsyslog.conf X11
DIR_COLORS.lightbgcolor iscsi ntp.conf rsyslog.d xdg
dleyna-server-service.conf issue numad.conf rwtab xinetd.d
[DEFAULT]
[linux_bridge]
physical_interface_mappings = provider:ens33
[vxlan]
enable_vxlan = true
local_ip = 10.168.182.131
l2_population = true
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
enable_security_group = True
~
~
~
~
~
~
~
~
~
~
~
~
"linuxbridge_agent.ini" 10L, 269C written
dnsmasq.conf issue.net odbcinst.ini rwtab.d xml
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
## default 1
net.ipv4.tcp_syncookies = 1
## default 0
net.ipv4.tcp_tw_reuse = 1
## default 0
net.ipv4.tcp_tw_recycle = 1
## default 60
net.ipv4.tcp_fin_timeout = 30
## default 256
net.ipv4.tcp_max_syn_backlog = 4096
## default 32768 60999
net.ipv4.ip_local_port_range = 1024 65535
## default 129=8
net.core.somaxconn = 32768
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
"/etc/sysctl.conf" 26L, 853C written
dnsmasq.d java oddjob samba yum
dracut.conf jvm oddjobd.conf sane.d yum.conf
dracut.conf.d jvm-commmon oddjobd.conf.d sasl2 yum.repos.d
e2fsck.conf kde openldap scl
egl kde4rc openlmi securetty
enscript.cfg kderc openvswitch security
[root@compute01 etc]# cd neutron/
[root@compute01 neutron]# ls
conf.d neutron.conf plugins rootwrap.conf
[root@compute01 neutron]# ll
total 44
drwxr-xr-x 4 root root 67 Nov 24 23:18 conf.d
-rw-r----- 1 root neutron 39708 May 11 2021 neutron.conf
drwxr-xr-x 3 root root 17 Nov 24 23:18 plugins
-rw-r--r-- 1 root root 1298 May 10 2021 rootwrap.conf
#修改配置文件 /etc/neutron/neutron.conf
[root@compute01 neutron]# cd /etc/neutron/ && mv neutron.conf neutron.conf.source && cat neutron.conf.source |grep -Ev "^#|^$" > neutron.conf && chown root:neutron neutron.conf
[root@compute01 neutron]# vi /etc/neutron/neutron.conf
在 [DEFAULT] 部分,配置 RabbitMQ 消息队列访问。
[DEFAULT]
transport_url = rabbit://openstack:openstack@controller
在 [DEFAULT] 部分,配置身份认证服务
[DEFAULT]
auth_strategy = keystone
在 [keystone_authtoken] 部分,配置身份认证服务
[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = openstack2022
token_cache_time=3600
在 [oslo_concurrency] 部分,配置锁定路径
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
#修改配置文件 /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[root@compute01 neutron]# cd /etc/neutron/plugins/ml2 && mv linuxbridge_agent.ini linuxbridge_agent.ini.source && cat linuxbridge_agent.ini.source |grep -Ev "^#|^$" > linuxbridge_agent.ini && chown root:neutron linuxbridge_agent.ini
[root@compute01 ml2]# vi /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = provider:ens33
[vxlan]
enable_vxlan = true
local_ip = 10.168.59.31
l2_population = true
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
enable_security_group = True
[root@compute01 ml2]# vi /etc/sysctl.conf
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
#执行以下命令 , 添加网桥过滤器,并设置开机加载
[root@compute01 ml2]# modprobe br_netfilter
[root@compute01 ml2]# sysctl -p
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.ip_local_port_range = 1024 65535
net.core.somaxconn = 32768
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
[root@compute01 ml2]# sed -i '$amodprobe br_netfilter' /etc/rc.local
[root@compute01 ml2]# chmod +x /etc/rc.d/rc.local
[root@compute01 ml2]#
#启动 neutron-linuxbridge-agent 服务并设置开机自启动
[root@compute01 ml2]# systemctl enable neutron-linuxbridge-agent.service && systemctl restart neutron-linuxbridge-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-linuxbridge-agent.service to /usr/lib/systemd/system/neutron-linuxbridge-agent.service.
[root@compute01 ml2]# systemctl status neutron-linuxbridge-agent.service
● neutron-linuxbridge-agent.service - OpenStack Neutron Linux Bridge Agent
Loaded: loaded (/usr/lib/systemd/system/neutron-linuxbridge-agent.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2022-11-25 00:09:54 CST; 2s ago
Process: 24829 ExecStartPre=/usr/bin/neutron-enable-bridge-firewall.sh (code=exited, status=0/SUCCESS)
Main PID: 24834 (/usr/bin/python)
Tasks: 1
CGroup: /system.slice/neutron-linuxbridge-agent.service
└─24834 /usr/bin/python2 /usr/bin/neutron-linuxbridge-agent --config-file /usr/share/neutron/neutron-dist.conf --config...
Nov 25 00:09:54 compute01 systemd[1]: Starting OpenStack Neutron Linux Bridge Agent...
Nov 25 00:09:54 compute01 neutron-enable-bridge-firewall.sh[24829]: net.bridge.bridge-nf-call-iptables = 1
Nov 25 00:09:54 compute01 neutron-enable-bridge-firewall.sh[24829]: net.bridge.bridge-nf-call-ip6tables = 1
Nov 25 00:09:54 compute01 systemd[1]: Started OpenStack Neutron Linux Bridge Agent.
Nov 25 00:09:55 compute01 sudo[24847]: neutron : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/neutron-rootwrap /etc/neutron/roo...
Hint: Some lines were ellipsized, use -l to show in full.
[root@compute01 ml2]#
验证 Neutron,在控制节点执行以下操作进行验证。
----+
[root@controller neutron]# source /etc/keystone/admin-openrc.sh
#列出成功启动的 Neutron 代理
[root@controller neutron]# openstack network agent list
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| 13e7e110-69b7-4d22-996e-ffce956228e5 | DHCP agent | controller | nova | :-) | UP | neutron-dhcp-agent |
| 7de44ea6-8556-4a84-b687-33c827cc7cb3 | Linux bridge agent | controller | None | :-) | UP | neutron-linuxbridge-agent |
| c5afccc8-cdb4-4657-843d-63085871d19b | L3 agent | controller | nova | :-) | UP | neutron-l3-agent |
| e5161e41-85f1-46de-9092-5cdc393cf7b9 | Metadata agent | controller | None | :-) | UP | neutron-metadata-agent |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
[root@controller neutron]# openstack network list
#创建一个 Flat 网络
[root@controller neutron]# openstack network create --share --external --provider-network-type flat public --provider-physical-network provider
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | |
| created_at | 2022-11-24T16:13:30Z |
| description | |
| dns_domain | None |
| id | a942fde1-622b-43a5-89d3-af2ee3d073d4 |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | False |
| is_vlan_transparent | None |
| location | cloud='', project.domain_id=, project.domain_name='Default', project.id='b069ab279ac147b6a16f9ff2107f7b1b', project.name='admin', region_name='', zone= |
| mtu | 1500 |
| name | public |
| port_security_enabled | True |
| project_id | b069ab279ac147b6a16f9ff2107f7b1b |
| provider:network_type | flat |
| provider:physical_network | provider |
| provider:segmentation_id | None |
| qos_policy_id | None |
| revision_number | 1 |
| router:external | External |
| segments | None |
| shared | True |
| status | ACTIVE |
| subnets | |
| tags | |
| updated_at | 2022-11-24T16:13:31Z |
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
#创建子网在类型为 Flat 名称为 public 网络下创建子网
[root@controller neutron]# openstack subnet create --network public --allocation-pool start=192.168.59.100,end=192.168.59.2402.168.182.100,end=192.168.182.240 --dns-nameserver 202.103.24.68 --gateway 192.168.182.2 --subnet-range 192.168.182.0/24 subnet_192.168.182
+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| allocation_pools | 192.168.182.100-192.168.182.240 |
| cidr | 192.168.182.0/24 |
| created_at | 2022-11-24T16:17:37Z |
| description | |
| dns_nameservers | 202.103.24.68 |
| enable_dhcp | True |
| gateway_ip | 192.168.182.2 |
| host_routes | |
| id | b96135af-1b9f-4394-8a18-3d5033af6707 |
| ip_version | 4 |
| ipv6_address_mode | None |
| ipv6_ra_mode | None |
| location | cloud='', project.domain_id=, project.domain_name='Default', project.id='b069ab279ac147b6a16f9ff2107f7b1b', project.name='admin', region_name='', zone= |
| name | subnet_192.168.182 |
| network_id | a942fde1-622b-43a5-89d3-af2ee3d073d4 |
| prefix_length | None |
| project_id | b069ab279ac147b6a16f9ff2107f7b1b |
| revision_number | 0 |
| segment_id | None |
| service_types | |
| subnetpool_id | None |
| tags | |
| updated_at | 2022-11-24T16:17:37Z |
+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
[root@controller neutron]# openstack network list
+--------------------------------------+--------+--------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+--------+--------------------------------------+
| a942fde1-622b-43a5-89d3-af2ee3d073d4 | public | b96135af-1b9f-4394-8a18-3d5033af6707 |
+--------------------------------------+--------+--------------------------------------+
[root@controller neutron]# openstack subnet list
+--------------------------------------+--------------------+--------------------------------------+------------------+
| ID | Name | Network | Subnet |
+--------------------------------------+--------------------+--------------------------------------+------------------+
| b96135af-1b9f-4394-8a18-3d5033af6707 | subnet_192.168.182 | a942fde1-622b-43a5-89d3-af2ee3d073d4 | 192.168.182.0/24 |
+--------------------------------------+--------------------+--------------------------------------+------------------+
[root@controller neutron]# openstack port list
+--------------------------------------+------+-------------------+--------------------------------------------------------------------------------+--------+
| ID | Name | MAC Address | Fixed IP Addresses | Status |
+--------------------------------------+------+-------------------+--------------------------------------------------------------------------------+--------+
| 2b3755d1-a572-4d9e-a70e-9824c6fdc049 | | fa:16:3e:77:06:44 | ip_address='192.168.182.100', subnet_id='b96135af-1b9f-4394-8a18-3d5033af6707' | ACTIVE |
+--------------------------------------+------+-------------------+--------------------------------------------------------------------------------+--------+
创建网络接口
[root@controller neutron]# openstack port create --network public --fixed-ip subnet=subnet_192.168.182 ip-address=192.168.182.110
+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up | UP |
| allowed_address_pairs | |
| binding_host_id | |
| binding_profile | |
| binding_vif_details | |
| binding_vif_type | unbound |
| binding_vnic_type | normal |
| created_at | 2022-11-24T16:24:43Z |
| data_plane_status | None |
| description | |
| device_id | |
| device_owner | |
| dns_assignment | None |
| dns_domain | None |
| dns_name | None |
| extra_dhcp_opts | |
| fixed_ips | ip_address='192.168.182.236', subnet_id='b96135af-1b9f-4394-8a18-3d5033af6707' |
| id | e512f9bd-03d9-46fd-a2ea-1b89aaa05b30 |
| location | cloud='', project.domain_id=, project.domain_name='Default', project.id='b069ab279ac147b6a16f9ff2107f7b1b', project.name='admin', region_name='', zone= |
| mac_address | fa:16:3e:5e:32:e0 |
| name | ip-address=192.168.182.110 |
| network_id | a942fde1-622b-43a5-89d3-af2ee3d073d4 |
| port_security_enabled | True |
| project_id | b069ab279ac147b6a16f9ff2107f7b1b |
| propagate_uplink_status | None |
| qos_policy_id | None |
| resource_request | None |
| revision_number | 1 |
| security_group_ids | 07b44d58-1196-48de-b7b2-4e14f919b87c |
| status | DOWN |
| tags | |
| trunk_details | None |
| updated_at | 2022-11-24T16:24:43Z |
+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
[root@controller neutron]#