1、数据库准备:
[ root@linux-host4 ~]
MariaDB [ ( none) ] > CREATE DATABASE neutron;
Query OK, 1 row affected ( 0.00 sec)
MariaDB [ ( none) ] > GRANT ALL PRIVILEGES ON neutron.* TO 'neutron' @'%' IDENTIFIED BY
'neutron123' ;
Query OK, 0 rows affected ( 0.00 sec)
MariaDB [ ( none) ] > flush privileges;
Query OK, 0 rows affected ( 0.00 sec)
[ root@linux-host1 ~]
2、创建 neutron 服务并注册:
[ root@linux-host1 ~]
+-------------+----------------------------------+
| Field | Value | +-------------+----------------------------------+
| description | OpenStack Networking |
| enabled | True |
| id | 154c0450a2be4a8fa0d8819e5f045bc0 |
| name | neutron |
| type | network |
+-------------+----------------------------------+
[ root@linux-host1 ~]
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | ba022a5dd78c469bb4f82bc655d84720 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 154c0450a2be4a8fa0d8819e5f045bc0 |
| service_name | neutron |
| service_type | network |
| url | http://192.168.10.100:9696 |
+--------------+----------------------------------+
[ root@linux-host1 ~]
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | b608eee2d21a4808953e5a9a9e761e92 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 154c0450a2be4a8fa0d8819e5f045bc0 |
| service_name | neutron |
| service_type | network |
| url | http://192.168.10.100:9696 |
+--------------+----------------------------------+
[ root@linux-host1 ~]
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 00a1f952c49348e09f4ebfeb20233825 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 154c0450a2be4a8fa0d8819e5f045bc0 |
| service_name | neutron |
| service_type | network |
| url | http://192.168.10.100:9696 |
+--------------+----------------------------------+
[ root@linux-host4 ~]
listen neutron
bind 192.168.10.100:9696
mode tcp
log global
balance source
server neutron-server 192.168.10.201:9696 check inter 5000 rise 3 fall 3
[ root@linux-host4 ~]
3、部署 neutron 控制端:
[ root@linux-host1 ~]
[ root@linux-host1 ~]
766 connection = mysql+pymysql://neutron:neutron123@192.168.10.100/neutron
30 core_plugin = ml2
33 service_plugins =
570 transport_url = rabbit://openstack:123456@192.168.10.205
27 auth_strategy = keystone
846 [ keystone_authtoken]
847 auth_uri = http://192.168.10.100:5000
848 auth_url = http://192.168.10.100:35357
849 memcached_servers = 192.168.10.100:11211
850 auth_type = password
851 project_domain_name = default
852 user_domain_name = default
853 project_name = service
854 username = neutron
855 password = neutron
99 notify_nova_on_port_status_changes = true
103 notify_nova_on_port_data_changes = true
1075 [ nova]
1076 auth_url = http://192.168.10.100:35357
1077 auth_type = password
1078 project_domain_name = default
1079 user_domain_name = default
1080 region_name = RegionOne
1081 project_name = service
1082 username = nova
1083 password = nova
1197 lock_path = /var/lib/neutron/tmp
[ root@linux-host1 ~]
122 type_drivers = flat,vlan
127 tenant_network_types =
131 mechanism_drivers = linuxbridge
136 extension_drivers = port_security
172 flat_networks = internal
249 enable_ipset = true
[ root@linux-host1 ~]
1:[ DEFAULT]
113:[ ml2]
122:type_drivers = flat,vlan
127:tenant_network_types =
131:mechanism_drivers = linuxbridge
136:extension_drivers = port_security
163:[ ml2_type_flat]
172:flat_networks = internal
233:[ securitygroup]
249:enable_ipset = true
[ root@linux-host1 ~]
155 physical_interface_mappings = internal:eth0
188 enable_vxlan = false
173 enable_security_group = true
168 firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
[ root@linux-host1 ~]
1:[ DEFAULT]
113:[ agent]
144:[ linux_bridge]
155:physical_interface_mappings = internal:eth0
161:[ securitygroup]
168:firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
173:enable_security_group = true
180:[ vxlan]
188:enable_vxlan = false
[ root@linux-host1 ~]
16 interface_driver = linuxbridge
32 dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
41 enable_isolated_metadata = true
[ root@linux-host1 ~]
22 nova_metadata_ip = 192.168.10.100
34 metadata_proxy_shared_secret = 20170912
[ root@linux-host1 ~]
1:[ DEFAULT]
22:nova_metadata_ip = 192.168.10.100
34:metadata_proxy_shared_secret = 20170912
185:[ agent]
200:[ cache]
[ root@linux-host1 ~]
6935 [ neutron]
6936 url = http://192.168.10.100:9696
6937 auth_url = http://192.168.10.100:35357
6938 auth_type = password
6939 project_domain_name = default
6940 user_domain_name = default
6941 region_name = RegionOne
6942 project_name = service
6943 username = neutron
6944 password = neutron
6945 service_metadata_proxy = true
6946 metadata_proxy_shared_secret = 20170912
[ root@linux-host1 ~]
[ root@linux-host1 ~]
/etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head"
neutron
[ root@linux-host1 ~]
[ root@linux-host1 ~]
[ root@linux-host4 ~]
listen nova-api
bind 192.168.10.100:8775
mode tcp
log global
balance source
server nova-server1 192.168.10.201:8775 check inter 5000 rise 3 fall 3
[ root@linux-host1 ~]
[ root@linux-host1 ~]
[ root@linux-host1 ~]
[ root@linux-host1 ~]
systemctl restart openstack-nova-api.service neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service
[ root@linux-host1 ~]
4、部署 neutron 计算节点:
[ root@linux-host2 ~]
[ root@linux-host2 ~]
27 auth_strategy = keystone
571 transport_url = rabbit://openstack:123456@192.168.10.205
846 [ keystone_authtoken]
847 auth_uri = http://192.168.10.100:5000
848 auth_url = http://192.168.10.100:35357
849 memcached_servers = 192.168.10.100:11211
850 auth_type = password
851 project_domain_name = default
852 user_domain_name = default
853 project_name = service
854 username = neutron
855 password = neutron
1188 lock_path = /var/lib/neutron/tmp
[ root@linux-host2 ~]
155 physical_interface_mappings = internal:eth0
168 firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
188 enable_vxlan = false
173 enable_security_group = true
[ root@linux-host2 ~]
1:[ DEFAULT]
113:[ agent]
144:[ linux_bridge]
155:physical_interface_mappings = internal:eth0
161:[ securitygroup]
168:firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
173:enable_security_group = true
180:[ vxlan]
188:enable_vxlan = false
[ root@linux-host2 ~]
6933 [ neutron]
6934 url = http://192.168.10.100:9696
6935 auth_url = http://192.168.10.100:35357
6936 auth_type = password
6937 project_domain_name = default
6938 user_domain_name = default
6939 region_name = RegionOne
6940 project_name = service
6941 username = neutron
6942 password = neutron
[ root@linux-host2 ~]
[ root@linux-host2 ~]
[ root@linux-host2 ~]
[ root@linux-host1 ~]
[ root@linux-host1 ~]