{"id":238,"date":"2015-09-07T13:48:58","date_gmt":"2015-09-07T13:48:58","guid":{"rendered":"http:\/\/onlinelab.info\/?p=238"},"modified":"2015-09-07T13:48:58","modified_gmt":"2015-09-07T13:48:58","slug":"openstack-kilo-on-ubuntu-14-04-2-configure-neutron-3","status":"publish","type":"post","link":"https:\/\/www.asianux.org.vn\/index.php\/2015\/09\/07\/openstack-kilo-on-ubuntu-14-04-2-configure-neutron-3\/","title":{"rendered":"OpenStack Kilo on Ubuntu 14.04.2 \u2013 Configure Neutron #3"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-8807 aligncenter\" src=\"http:\/\/www.itzgeek.com\/wp-content\/uploads\/2015\/06\/OpenStack-Logo.png\" alt=\"OpenStack Logo\" width=\"200\" height=\"200\" title=\"\"><\/p>\n<p>This is the third part of configuring neutron (Networking) on Ubuntu 14.04, you can go through previous article on <a href=\"http:\/\/www.itzgeek.com\/how-tos\/linux\/ubuntu-how-tos\/openstack-kilo-on-ubuntu-14-04-2-configure-neutron-1.html\" target=\"_blank\" rel=\"noopener\">Configure Neutron #1<\/a> and\u00a0Configure Neutron #2 in which we have installed and configured Networking components on Controller node and Network Node.<\/p>\n<p>Here, we will be configuring compute node to use neutron.<\/p>\n<h2>Prerequisites:<\/h2>\n<p>Configure kernel parameters on compute node, edit \/etc\/sysctl.conf file.<\/p>\n<pre># nano \/etc\/sysctl.conf<\/pre>\n<p>Add the following parameters into the file.<\/p>\n<pre>net.ipv4.conf.all.rp_filter=0\nnet.ipv4.conf.default.rp_filter=0\nnet.bridge.bridge-nf-call-iptables=1\nnet.bridge.bridge-nf-call-ip6tables=1<\/pre>\n<p>Apply the changes.<\/p>\n<pre># sysctl -p<\/pre>\n<h2>Install and configure Networking components:<\/h2>\n<p>Install the following packages on each and every compute node you have it on OpenStack environment.<\/p>\n<pre># apt-get install neutron-plugin-ml2 neutron-plugin-openvswitch-agent<\/pre>\n<p>Edit the \/etc\/neutron\/neutron.conf file.<\/p>\n<pre># nano \/etc\/neutron\/neutron.conf<\/pre>\n<p>Modify the below settings and make sure to place a entries in the proper sections. In the case of database section, comment out any connection options as network node does not directly access the database.<\/p>\n<pre>[DEFAULT]\n...\nrpc_backend = rabbit\nverbose = True\ncore_plugin = ml2\nservice_plugins = router\nallow_overlapping_ips = True\nauth_strategy = keystone\n\n[database]\n...\n#connection = sqlite:\/\/\/\/var\/lib\/neutron\/neutron.sqlite\n\n<strong>##Comment out the above line.<\/strong>\n\n[oslo_messaging_rabbit]\n...\nrabbit_host = controller\nrabbit_userid = openstack\nrabbit_password = password\n\n<strong>## Replace \"password\" with the password you chose for the openstack account in RabbitMQ<\/strong>\n\n[keystone_authtoken]\n...\nauth_uri = http:\/\/controller:5000\nauth_url = http:\/\/controller:35357\nauth_plugin = password\nproject_domain_id = default\nuser_domain_id = default\nproject_name = service\nusername = neutron\npassword = password\n\n<strong>## Replace \"password\" with the password you chose for neutron user in the identity service<\/strong><\/pre>\n<h2>Configure Modular Layer 2 (ML2) plug-in:<\/h2>\n<p>Edit the \/etc\/neutron\/plugins\/ml2\/ml2_conf.ini file.<\/p>\n<pre># nano \/etc\/neutron\/plugins\/ml2\/ml2_conf.ini<\/pre>\n<p>Modify the below sections.<\/p>\n<pre>[ml2]\n...\ntype_drivers = flat,vlan,gre,vxlan\ntenant_network_types = gre\nmechanism_drivers = openvswitch\n\n[ml2_type_gre]\n...\ntunnel_id_ranges = 1:1000\n\n[securitygroup]\n...\nenable_security_group = True\nenable_ipset = True\nfirewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver\n\n[ovs]\nlocal_ip = 192.168.12.23\n\n<strong>## Tunnel network interface on your Compute Node.<\/strong>\n\n[agent]\ntunnel_types = gre\n<strong>\n## [ovs] and [agent] stanzas are need to be added extra at the bottom of the file.<\/strong><\/pre>\n<p>Restart the Open vSwitch service.<\/p>\n<pre># service openvswitch-switch restart<\/pre>\n<h2>Configure Compute node to use Networking:<\/h2>\n<p>By default, Compute node uses legacy networking. We must reconfigure Compute to manage networks through Neutron.<\/p>\n<p>Edit the \/etc\/nova\/nova.conf file.<\/p>\n<pre># nano \/etc\/nova\/nova.conf<\/pre>\n<p>Modify the below settings and make sure to place a entries in the proper sections. If the sections does not exists, create a sections accordingly.<\/p>\n<pre>[DEFAULT]\n...\nnetwork_api_class = nova.network.neutronv2.api.API\nsecurity_group_api = neutron\nlinuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver\nfirewall_driver = nova.virt.firewall.NoopFirewallDriver\n\n[neutron]\n\nurl = http:\/\/controller:9696\nauth_strategy = keystone\nadmin_auth_url = http:\/\/controller:35357\/v2.0\nadmin_tenant_name = service\nadmin_username = neutron\nadmin_password = password\n\n<strong>## Replace \"password\" with the password you chose for neutron user in the identity service<\/strong><\/pre>\n<p>Restart the compute and Open vSwitch agen on compute node.<\/p>\n<pre># service nova-compute restart\n# service neutron-plugin-openvswitch-agent restart<\/pre>\n<h2>Verify operation:<\/h2>\n<p>Load admin credentials on the controller node.<\/p>\n<pre># source admin-openrc.sh<\/pre>\n<p>List the agents.<\/p>\n<pre># neutron agent-list\n+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+\n| id\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | agent_type\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | host\u00a0\u00a0\u00a0 | alive | admin_state_up | binary\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\n+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+\n| 23da3f95-b81b-4426-9d7a-d5cbfc5241c0 | Metadata agent\u00a0\u00a0\u00a0\u00a0 | network | :-)\u00a0\u00a0 | True\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | neutron-metadata-agent\u00a0\u00a0\u00a0 |\n| 4217b0c0-fbd4-47d9-bc22-5187f09d958a | DHCP agent\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | network | :-)\u00a0\u00a0 | True\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | neutron-dhcp-agent\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\n| a4eaabf8-8cf0-4d72-817d-d80921b4f915 | Open vSwitch agent | compute | :-)\u00a0\u00a0 | True\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | neutron-openvswitch-agent |\n| b4cf95cd-2eba-4c69-baa6-ae8832384e40 | Open vSwitch agent | network | :-)\u00a0\u00a0 | True\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | neutron-openvswitch-agent |\n| d9e174be-e719-4f05-ad05-bc444eb97df5 | L3 agent\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | network | :-)\u00a0\u00a0 | True\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | neutron-l3-agent\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\n+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+<\/pre>\n<p>The output should have four agents alive on the network node and one agent alive on the compute node.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the third part of configuring neutron (Networking) on Ubuntu 14.04, you can go through previous article on Configure Neutron #1 and\u00a0Configure Neutron #2 in which we have installed and configured Networking components on&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-238","post","type-post","status-publish","format-standard","hentry","category-virtualization"],"_links":{"self":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/238","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/comments?post=238"}],"version-history":[{"count":0,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/238\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/media?parent=238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/categories?post=238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/tags?post=238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}