I. Neutron environment
Reference Document: Http://www.aboutyun.com/thread-13108-1-1.html
Http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-controller-install.html
1. Create a neutron database and authorize
mysql -u root -pCREATE DATABASE neutron;
GRANT ALL PRIVILEGES ON neutron.* TO ‘neutron‘@‘localhost‘ IDENTIFIED BY ‘NEUTRON_PASS‘;GRANT ALL PRIVILEGES ON neutron.* TO ‘neutron‘@‘%‘ IDENTIFIED BY ‘NEUTRON_PASS‘;
exit
2. Effective environment variables
source admin-openrc.sh
3. Create a network user and authorize
openstack user create --password-prompt neutronUser Password:(我的设置neutron)Repeat User Password:+-----------+----------------------------------+| Field | Value |+-----------+----------------------------------+| domain_id | e0353a670a9e496da891347c589539e9 || enabled | True || id | b20a6692f77b4258926881bf831eb683 || name | neutron |+-----------+----------------------------------+
- Add Admin role to neutron user
openstackroleadd--projectservice--userneutronadmin
- Create a Neutron service instance
openstack service create --name neutron --description "OpenStack Networking" network +-------------+----------------------------------+| Field | Value |+-------------+----------------------------------+| description | OpenStack Networking || enabled | True || id | f71529314dab4a4d8eca427e701d209e || name | neutron || type | network |+-------------+----------------------------------+
- Create a Network Service API endpoint
openstack endpoint create--publicurl http://controller:9696--adminurl/http controller:9696--internalurl http://controller:9696--region regionone network+--------- -----+----------------------------------+ | Field | Value |+--------------+----------------------------------+ | Adminurl | http://controller:9696 | | ID | 85D80A6D02FC4B7683F611D7FC1493A3 | | InternalUrl | http://controller:9696 | | Publicurl | http://controller:9696 | | Region_id | Regionone | | Service_ ID | f71529314dab4a4d8eca427e701d209e | | Service_name | neutron | | service_ Type | Network | +--------------+ ----------------------------------+
Two. Installing neutron
1. Installing the Neutron component
apt-get install neutron-server neutron-plugin-ml2 python-neutronclient
2. Configuring the Environment
Vim/etc/neutron/neutron.conf[default]verbose= TrueRpc_backend= Rabbit#配置认证访问Auth_strategy= Keystone#启用 Modular Layer 2 (ML2) plug-in, routing service, and overlapping IP addresses:Core_plugin= ML2Service_plugins= Routerallow_overlapping_ips= True#配置计算节点网络拓扑变化通知notify_nova_on_port_status_changes= Truenotify_nova_on_port_data_changes= TrueNova_url= Http://controller:8774/v2[database]Connection= mysql://neutron:neutron_dbpass (neutron database password) @controller/neutron[oslo_messaging_rabbit]#配置RabbitMQ Message Queuing serviceRabbit_host= ControllerRabbit_userid= OpenStackRabbit_password= Rabbit_pass (password for created message middleware password, mine for 123) [Keystone_authtoken]#配置认证访问Auth_uri= http://controller:5000Auth_url= http://controller:35357Auth_plugin= passwordproject_domain_id= Defaultuser_domain_id= DefaultProject_Name= Serviceusername= NeutronPassword= Neutron_pass (my password NEUTRON) [Nova]#配置计算节点网络拓扑变化通知Auth_url= http://controller:35357Auth_plugin= passwordproject_domain_id= Defaultuser_domain_id= DefaultRegion_name= RegiononeProject_Name= Serviceusername= NovaPassword= Nova_pass (the Nova password set in the previous article, my Nova)
3. Configure Modular Layer 2 (ML2) plug-in
vim /etc/neutron/plugins/ml2/ml2_conf.ini[ml2]#启用flat,VLAN,GRE和VXLAN网络类型驱动,GRE租户网络,和OVS机制驱动:type_drivers = flat,vlan,gre,vxlantenant_network_types = gremechanism_drivers = openvswitch[ml2_type_gre]#配置隧道标识符的id范围tunnel_id_ranges = 1:1000[securitygroup]#启用security groups, 启用 ipset, 和 配置 OVS iptables firewall 驱动enable_security_group = Trueenable_ipset = Truefirewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
4. Reconfigure the network (modify the Control node nova.conf, add the following)
Vim/etc/nova/nova. conf[DEFAULT]#配置Apis与驱动Network_api_class = Nova. Network. Neutronv2. API. APISecurity_group_api = Neutronlinuxnet_interface_driver = Nova. Network. Linux_net. LinuxovsinterfacedriverFirewall_driver = Nova. Virt. Firewall. Noopfirewalldriver[Neutron]#配置访问参数url = http://controller:9696Auth_strategy = Keystoneadmin_auth_url = Http://controller:35357/v2. 0Admin_tenant_name = Serviceadmin_username = Neutronadmin_password = Neutron_pass (password is NEUTRON password, mine is NEUTRON)
5. Synchronize the database (after synchronization, you can see if there is a table in the database, there is success, there is no indication that SQLite database is not deleted, after the deletion in sync rm-f/var/lib/neutron/neutron.sqlite)
-s-c"neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
6. Restart Compute service and Network Service
service nova-api restartservice neutron-server restart
7. Verifying the Installation
source admin-openrc.sh
- View the created Neutron-server process (probably these items, I seem to have one more, do not know why)
Neutron net-list+-----------------------+-----------------------------------------------+| alias | name |+-----------------------+-------------------- ---------------------------+| Security-group | Security-group | | L3_agent_Scheduler | L3 Agent Scheduler | | Ext-gw-mode | Neutron L3 Configurable external Gateway mode | | binding | Port Binding | | Provider | Provider Network | | Agent | Agent | | quotas | Quota Management Support | | Dhcp_agent_Scheduler | DHCP Agent Scheduler | | l3-ha | HA Router Extension | | Multi-provider | Multi Provider Network | | external-net | Neutron External Network | | Router | Neutron L3 Router | | Allowed-address-pairs | Allowed Address Pairs | | Extraroute | Neutron Extra Route | | Extra_dhcp_opt | Neutron Extra DHCP OPTs || dvr | Distributed Virtual Router |+-----------------------+-----------------------------------------------+
Ubuntu Build OpenStack Platform (Kilo) (five. Neutron (a) control node)