Add neutron ML2 plugin info to instalation guid

fixes bug: 1230276

Change-Id: I57bb01d491a847fbe2de96c43053d5bf11065954
This commit is contained in:
sukhdev 2013-10-30 15:04:13 -07:00 committed by Diane Fleming
parent 8507b54137
commit 280ae5b74e
3 changed files with 286 additions and 182 deletions

View File

@ -4,8 +4,9 @@
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
xml:id="section_networking-routers-with-private-networks"> xml:id="section_networking-routers-with-private-networks">
<title>Per-tenant routers with private networks</title> <title>Per-tenant routers with private networks</title>
<para>This section describes how to install the Networking service and its components for a <para>This section describes how to install the Networking service
per-tenant routers with private networks use case.</para> and its components for a per-tenant routers with private
networks use case.</para>
<informalfigure> <informalfigure>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
@ -64,35 +65,50 @@
<tbody> <tbody>
<tr> <tr>
<td>Controller Node</td> <td>Controller Node</td>
<td><para>Runs the Networking service, Identity, and all of the Compute services that are required to <td><para>Runs the Networking service, Identity, and
deploy VMs (<systemitem class="service">nova-api</systemitem>, <systemitem all of the Compute services that are required
class="service">nova-scheduler</systemitem>, for example). The node must to deploy VMs (<systemitem class="service"
have at least one network interface, which is connected to the Management >nova-api</systemitem>, <systemitem
Network. The host name is controlnode, which every other node resolves to class="service"
the IP of the controller node.</para><note> >nova-scheduler</systemitem>, for
<para>The <systemitem class="service">nova-network</systemitem> service example). The node must have at least one
should not be running. This is replaced by Networking.</para> network interface, which is connected to the
Management Network. The host name is
controlnode, which every other node resolves
to the IP of the controller node.</para><note>
<para>The <systemitem class="service"
>nova-network</systemitem> service
should not be running. This is replaced by
Networking.</para>
</note></td> </note></td>
</tr> </tr>
<tr> <tr>
<td>Compute Node</td> <td>Compute Node</td>
<td>Runs the Networking L2 agent and the Compute services that run VMs (<systemitem <td>Runs the Networking L2 agent and the Compute
class="service">nova-compute</systemitem> specifically, and optionally other services that run VMs (<systemitem class="service"
<systemitem class="service">nova-*</systemitem> services depending on >nova-compute</systemitem> specifically, and
configuration). The node must have at least two network interfaces. One optionally other <systemitem class="service"
interface communicates with the controller node through the management network. >nova-*</systemitem> services depending on
The other node is used for the VM traffic on the data network. The VM receives configuration). The node must have at least two
its IP address from the DHCP agent on this network.</td> network interfaces. One interface communicates
with the controller node through the management
network. The other node is used for the VM traffic
on the data network. The VM receives its IP
address from the DHCP agent on this network.</td>
</tr> </tr>
<tr> <tr>
<td>Network Node</td> <td>Network Node</td>
<td>Runs Networking L2 agent, DHCP agent and L3 agent. This node has access to the <td>Runs Networking L2 agent, DHCP agent and L3 agent.
external network. The DHCP agent allocates IP addresses to the VMs on data This node has access to the external network. The
network. (Technically, the addresses are allocated by the Networking server, and DHCP agent allocates IP addresses to the VMs on
distributed by the dhcp agent.) The node must have at least two network data network. (Technically, the addresses are
interfaces. One interface communicates with the controller node through the allocated by the Networking server, and
management network. The other interface is used as external network. GRE tunnels distributed by the dhcp agent.) The node must have
are set up as data networks.</td> at least two network interfaces. One interface
communicates with the controller node through the
management network. The other interface is used as
external network. GRE tunnels are set up as data
networks.</td>
</tr> </tr>
<tr> <tr>
<td>Router</td> <td>Router</td>
@ -106,49 +122,62 @@
<para><emphasis role="bold">Controller node</emphasis></para> <para><emphasis role="bold">Controller node</emphasis></para>
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>Relevant Compute services are installed, configured, and running.</para> <para>Relevant Compute services are installed, configured,
and running.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Glance is installed, configured, and running. In <para>Glance is installed, configured, and running. In
addition, an image named tty must be present.</para> addition, an image named tty must be present.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Identity is installed, configured, and running. A Networking user named <emphasis <para>Identity is installed, configured, and running. A
role="bold">neutron</emphasis> should be created on tenant <emphasis role="bold" Networking user named <emphasis role="bold"
>service</emphasis> with password <emphasis role="bold" >neutron</emphasis> should be created on tenant
>NEUTRON_PASS</emphasis>.</para> <emphasis role="bold">service</emphasis> with
password <emphasis role="bold"
>NEUTRON_PASS</emphasis>.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Additional services: <itemizedlist> <para>Additional services: <itemizedlist>
<listitem> <listitem>
<para>RabbitMQ is running with default guest and its password</para> <para>RabbitMQ is running with default guest
and its password</para>
</listitem> </listitem>
<listitem os="rhel;centos;fedora;opensuse;sles;ubuntu"> <listitem
<para>MySQL server (user is <emphasis role="bold">root</emphasis> and os="rhel;centos;fedora;opensuse;sles;ubuntu">
password is <emphasis role="bold">root</emphasis>)</para> <para>MySQL server (user is <emphasis
role="bold">root</emphasis> and
password is <emphasis role="bold"
>root</emphasis>)</para>
</listitem> </listitem>
</itemizedlist></para> </itemizedlist></para>
</listitem> </listitem>
</orderedlist> </orderedlist>
<para><emphasis role="bold">Compute node</emphasis></para> <para><emphasis role="bold">Compute node</emphasis></para>
<para>Compute is installed and configured.</para> <para>Compute is installed and configured.</para>
<section xml:id="demo_routers_with_private_networks_installions"> <section xml:id="demo_routers_with_private_networks_installions">
<title>Install</title> <title>Install</title>
<para> <para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para><emphasis role="bold">Controller node—Networking server</emphasis><orderedlist> <para><emphasis role="bold">Controller
node—Networking server</emphasis><orderedlist>
<listitem> <listitem>
<para>Install the Networking server.</para> <para>Install the Networking
server.</para>
</listitem> </listitem>
<listitem os="rhel;centos;fedora;opensuse;sles;ubuntu"> <listitem
<para>Create database <emphasis role="bold" os="rhel;centos;fedora;opensuse;sles;ubuntu">
>ovs_neutron</emphasis>.</para> <para>Create database <emphasis
role="bold"
>ovs_neutron</emphasis>.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Update the Networking configuration file, <filename> <para>Update the Networking
/etc/neutron/neutron.conf</filename>, with plug-in choice configuration file, <filename>
and Identity Service user as necessary:</para> /etc/neutron/neutron.conf</filename>,
with plug-in choice and Identity
Service user as necessary:</para>
<programlisting language="ini" os="rhel;centos;fedora;opensuse;sles;ubuntu">[DEFAULT] <programlisting language="ini" os="rhel;centos;fedora;opensuse;sles;ubuntu">[DEFAULT]
core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2 core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2
control_exchange = neutron control_exchange = neutron
@ -166,24 +195,30 @@ rabbit_host = controller
notification_driver = neutron.openstack.common.notifier.rabbit_notifier notification_driver = neutron.openstack.common.notifier.rabbit_notifier
</programlisting> </programlisting>
</listitem> </listitem>
<listitem os="rhel;centos;fedora;opensuse;sles;ubuntu"> <listitem
<para>Update the plug-in configuration file, os="rhel;centos;fedora;opensuse;sles;ubuntu">
<filename>/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini</filename>:</para> <para>Update the plug-in configuration
file,
<filename>/etc/neutron/plugins/ml2/ml2_conf.ini</filename>:</para>
<programlisting language="ini">[database] <programlisting language="ini">[database]
connection = mysql://root:root@controlnode:3306/ovs_neutron?charset=utf8
connection = mysql://root:root@controlnode:3306/ovs_neutron?charset=utf8
[ovs] [ovs]
tenant_network_type = gre tenant_network_type = gre
[ml2_type_gre]
tunnel_id_ranges = 1:1000 tunnel_id_ranges = 1:1000
enable_tunneling = True
</programlisting> </programlisting>
</listitem> </listitem>
<listitem os="rhel;centos;fedora;opensuse;sles;ubuntu"> <listitem
<para>Start the Networking server</para> os="rhel;centos;fedora;opensuse;sles;ubuntu">
<para>The Networking server can be a service of the operating <para>Start the Networking
system. The command to start the service depends on your server</para>
operating system. The following command runs the Networking <para>The Networking server can be a
server directly:</para> service of the operating system.
The command to start the service
depends on your operating system.
The following command runs the
Networking server directly:</para>
<screen><prompt>#</prompt> <userinput>neutron-server --config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini \ <screen><prompt>#</prompt> <userinput>neutron-server --config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini \
--config-file /etc/neutron/neutron.conf</userinput></screen> --config-file /etc/neutron/neutron.conf</userinput></screen>
</listitem> </listitem>
@ -195,9 +230,12 @@ enable_tunneling = True
<para>Install Compute services.</para> <para>Install Compute services.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Update the Compute configuration file, <filename> <para>Update the Compute configuration
/etc/nova/nova.conf</filename>. Make sure the following line file, <filename>
appears at the end of this file:</para> /etc/nova/nova.conf</filename>.
Make sure the following line
appears at the end of this
file:</para>
<programlisting language="ini">network_api_class=nova.network.neutronv2.api.API <programlisting language="ini">network_api_class=nova.network.neutronv2.api.API
neutron_admin_username=neutron neutron_admin_username=neutron
@ -211,137 +249,165 @@ libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver
</programlisting> </programlisting>
</listitem> </listitem>
<listitem> <listitem>
<para>Restart relevant Compute services.</para> <para>Restart relevant Compute
services.</para>
</listitem> </listitem>
</orderedlist></para> </orderedlist></para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis role="bold">Compute and Network node—L2 agent</emphasis><orderedlist> <para><emphasis role="bold">Compute and Network
node—L2 agent</emphasis><orderedlist>
<listitem> <listitem>
<para>Install and start Open vSwitch.</para> <para>Install and start Open
vSwitch.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Install the L2 agent (Neutron Open vSwitch agent).</para> <para>Install the L2 agent (Neutron
Open vSwitch agent).</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Add the integration bridge to the Open vSwitch:</para> <para>Add the integration bridge to
the Open vSwitch:</para>
<screen><prompt>#</prompt> <userinput>ovs-vsctl add-br br-int</userinput></screen> <screen><prompt>#</prompt> <userinput>ovs-vsctl add-br br-int</userinput></screen>
</listitem> </listitem>
<listitem> <listitem>
<para>Update the Networking configuration file, <filename> <para>Update the Networking
/etc/neutron/neutron.conf</filename>:</para> configuration file, <filename>
/etc/neutron/neutron.conf</filename>:</para>
<programlisting language="ini">[DEFAULT] <programlisting language="ini">[DEFAULT]
core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2 core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin
control_exchange = neutron control_exchange = neutron
rabbit_host = controller rabbit_host = controller
notification_driver = neutron.openstack.common.notifier.rabbit_notifier notification_driver = neutron.openstack.common.notifier.rabbit_notifier
</programlisting> </programlisting>
</listitem> </listitem>
<listitem> <listitem>
<para>Update the plug-in configuration file, <filename> <para>Update the plug-in configuration
/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini</filename>.</para> file, <filename>
<para>Compute node:</para> /etc/neutron/plugins/ml2/ml2_conf.ini</filename>.</para>
<para>Compute Node:</para>
<programlisting language="ini">[database] <programlisting language="ini">[database]
connection = mysql://root:root@controlnode:3306/ovs_neutron?charset=utf8 connection = mysql://root:root@controlnode:3306/neutron_ml2?charset=utf8
[ovs] [ml2]
tenant_network_type = gre tenant_network_type = gre
[ml2_type_gre]
tunnel_id_ranges = 1:1000 tunnel_id_ranges = 1:1000
enable_tunneling = True [ovs]
local_ip = 9.181.89.202 local_ip = 9.181.89.202
</programlisting> </programlisting>
<para>Network node:</para> <para>Network node:</para>
<programlisting language="ini">[database] <programlisting language="ini">[database]
connection = mysql://root:root@controlnode:3306/ovs_neutron?charset=utf8 connection = mysql://root:root@controlnode:3306/neutron_ml2?charset=utf8
[ovs] [ml2]
tenant_network_type = gre tenant_network_type = gre
[ml2_type_gre]
tunnel_id_ranges = 1:1000 tunnel_id_ranges = 1:1000
enable_tunneling = True [ovs]
local_ip = 9.181.89.203 local_ip = 9.181.89.203
</programlisting> </programlisting>
</listitem> </listitem>
<listitem> <listitem>
<para>Create the integration bridge <emphasis role="bold" <para>Create the integration bridge
>br-int</emphasis>:</para> <emphasis role="bold"
>br-int</emphasis>:</para>
<screen><prompt>#</prompt> <userinput>ovs-vsctl --may-exist add-br br-int</userinput></screen> <screen><prompt>#</prompt> <userinput>ovs-vsctl --may-exist add-br br-int</userinput></screen>
</listitem> </listitem>
<listitem> <listitem>
<para>Start the Networking L2 agent</para> <para>Start the Networking L2
agent</para>
<para>The Networking Open vSwitch L2 <para>The Networking Open vSwitch L2
agent can be a service of operating agent can be a service of operating
system. The command to start depends system. The command to start
on your operating systems. The following command depends on your operating systems.
runs the service directly: The following command runs the
</para> service directly:</para>
<screen><prompt>#</prompt> <userinput>neutron-openvswitch-agent --config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini \ <screen><prompt>#</prompt> <userinput>neutron-openvswitch-agent --config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini \
--config-file /etc/neutron/neutron.conf</userinput></screen> --config-file /etc/neutron/neutron.conf</userinput></screen>
</listitem> </listitem>
</orderedlist></para> </orderedlist></para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis role="bold">Network node—DHCP agent</emphasis><orderedlist> <para><emphasis role="bold">Network node—DHCP
agent</emphasis><orderedlist>
<listitem> <listitem>
<para>Install the DHCP agent.</para> <para>Install the DHCP agent.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Update the Networking configuration file, <filename> <para>Update the Networking
/etc/neutron/neutron.conf</filename></para> configuration file, <filename>
/etc/neutron/neutron.conf</filename></para>
<programlisting language="ini">[DEFAULT] <programlisting language="ini">[DEFAULT]
core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2 core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin
control_exchange = neutron control_exchange = neutron
rabbit_host = controller rabbit_host = controller
notification_driver = neutron.openstack.common.notifier.rabbit_notifier notification_driver = neutron.openstack.common.notifier.rabbit_notifier
allow_overlapping_ips = True</programlisting> allow_overlapping_ips = True</programlisting>
<para><emphasis role="bold">Set <para><emphasis role="bold">Set
<literal>allow_overlapping_ips</literal> because TenantA <literal>allow_overlapping_ips</literal>
and TenantC use overlapping subnets.</emphasis></para> because TenantA and TenantC use
overlapping
subnets.</emphasis></para>
</listitem> </listitem>
<listitem> <listitem>
<para>Update the DHCP configuration file <filename> <para>Update the DHCP configuration
/etc/neutron/dhcp_agent.ini</filename></para> file <filename>
/etc/neutron/dhcp_agent.ini</filename></para>
<programlisting language="ini">interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver</programlisting> <programlisting language="ini">interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver</programlisting>
</listitem> </listitem>
<listitem> <listitem>
<para>Start the DHCP agent.</para> <para>Start the DHCP agent.</para>
<para>The Networking DHCP agent can be a service of operating <para>The Networking DHCP agent can be
system. The command to start the service depends on your a service of operating system. The
operating system. The following command runs the service command to start the service
directly:</para> depends on your operating system.
The following command runs the
service directly:</para>
<screen><prompt>#</prompt> <userinput>neutron-dhcp-agent --config-file /etc/neutron/neutron.conf \ <screen><prompt>#</prompt> <userinput>neutron-dhcp-agent --config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/dhcp_agent.ini</userinput></screen> --config-file /etc/neutron/dhcp_agent.ini</userinput></screen>
</listitem> </listitem>
</orderedlist></para> </orderedlist></para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis role="bold">Network node—L3 agent</emphasis><orderedlist> <para><emphasis role="bold">Network node—L3
agent</emphasis><orderedlist>
<listitem> <listitem>
<para>Install the L3 agent.</para> <para>Install the L3 agent.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Add the external network bridge</para> <para>Add the external network
bridge</para>
<screen><prompt>#</prompt> <userinput>ovs-vsctl add-br br-ex</userinput></screen> <screen><prompt>#</prompt> <userinput>ovs-vsctl add-br br-ex</userinput></screen>
</listitem> </listitem>
<listitem> <listitem>
<para>Add the physical interface, for example eth0, that is <para>Add the physical interface, for
connected to the outside network to this bridge:</para> example eth0, that is connected to
the outside network to this
bridge:</para>
<screen><prompt>#</prompt> <userinput>ovs-vsctl add-port br-ex eth0</userinput></screen> <screen><prompt>#</prompt> <userinput>ovs-vsctl add-port br-ex eth0</userinput></screen>
</listitem> </listitem>
<listitem> <listitem>
<para>Update the L3 configuration file <filename> <para>Update the L3 configuration file
/etc/neutron/l3_agent.ini</filename>:</para> <filename>
/etc/neutron/l3_agent.ini</filename>:</para>
<programlisting language="ini">[DEFAULT] <programlisting language="ini">[DEFAULT]
interface_driver=neutron.agent.linux.interface.OVSInterfaceDriver interface_driver=neutron.agent.linux.interface.OVSInterfaceDriver
use_namespaces=True</programlisting> use_namespaces=True</programlisting>
<para><emphasis role="bold">Set the <para><emphasis role="bold">Set the
<literal>use_namespaces</literal> option (it is True by <literal>use_namespaces</literal>
default) because TenantA and TenantC have overlapping option (it is True by default)
subnets, and the routers are hosted on one l3 agent network because TenantA and TenantC have
node.</emphasis></para> overlapping subnets, and the
routers are hosted on one l3 agent
network node.</emphasis></para>
</listitem> </listitem>
<listitem> <listitem>
<para>Start the L3 agent</para> <para>Start the L3 agent</para>
<para>The Networking L3 agent can be a service of operating system. <para>The Networking L3 agent can be a
The command to start the service depends on your operating service of operating system. The
system. The following command starts the agent directly:</para> command to start the service
depends on your operating system.
The following command starts the
agent directly:</para>
<screen><prompt>#</prompt> <userinput>neutron-l3-agent --config-file /etc/neutron/neutron.conf \ <screen><prompt>#</prompt> <userinput>neutron-l3-agent --config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/l3_agent.ini</userinput></screen> --config-file /etc/neutron/l3_agent.ini</userinput></screen>
</listitem> </listitem>
@ -355,8 +421,9 @@ use_namespaces=True</programlisting>
<para>All of the commands below can be executed on the network <para>All of the commands below can be executed on the network
node.</para> node.</para>
<note> <note>
<para>Ensure that the following environment variables are set. These are used by the <para>Ensure that the following environment variables are
various clients to access the Identity service.</para> set. These are used by the various clients to access
the Identity service.</para>
</note> </note>
<para> <para>
<programlisting language="bash">export OS_USERNAME=admin <programlisting language="bash">export OS_USERNAME=admin
@ -367,7 +434,8 @@ use_namespaces=True</programlisting>
<para> <para>
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>Get the tenant ID (Used as $TENANT_ID later):</para> <para>Get the tenant ID (Used as $TENANT_ID
later):</para>
<screen><prompt>#</prompt> <userinput>keystone tenant-list</userinput> <screen><prompt>#</prompt> <userinput>keystone tenant-list</userinput>
<computeroutput>+----------------------------------+---------+---------+ <computeroutput>+----------------------------------+---------+---------+
| id | name | enabled | | id | name | enabled |
@ -435,14 +503,19 @@ use_namespaces=True</programlisting>
+------------------+--------------------------------------------+ +------------------+--------------------------------------------+
</computeroutput></screen> </computeroutput></screen>
<para><emphasis role="bold"> <para><emphasis role="bold">
<literal>provider:network_type local</literal> means that Networking <literal>provider:network_type
does not have to realize this network through provider network. local</literal> means that Networking
<literal>router:external true</literal> means that an external does not have to realize this network
network is created where you can create floating IP and router gateway through provider network.
<literal>router:external
true</literal> means that an external
network is created where you can create
floating IP and router gateway
port.</emphasis></para> port.</emphasis></para>
</listitem> </listitem>
<listitem> <listitem>
<para>Add an IP on external network to br-ex.</para> <para>Add an IP on external network to
br-ex.</para>
<para>Because br-ex is the external network <para>Because br-ex is the external network
bridge, add an IP 30.0.0.100/24 to br-ex and bridge, add an IP 30.0.0.100/24 to br-ex and
ping the floating IP of the VM from our ping the floating IP of the VM from our
@ -498,7 +571,8 @@ use_namespaces=True</programlisting>
1.</para> 1.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Create a subnet on the network TenantA-Net:</para> <para>Create a subnet on the network
TenantA-Net:</para>
<screen><prompt>#</prompt> <userinput> <screen><prompt>#</prompt> <userinput>
neutron --os-tenant-name TenantA --os-username UserA --os-password password \ neutron --os-tenant-name TenantA --os-username UserA --os-password password \
--os-auth-url=http://localhost:5000/v2.0 subnet-create TenantA-Net 10.0.0.0/24</userinput> --os-auth-url=http://localhost:5000/v2.0 subnet-create TenantA-Net 10.0.0.0/24</userinput>
@ -563,13 +637,15 @@ neutron --os-tenant-name TenantA --os-username UserA --os-password password \
<screen><prompt>#</prompt> <userinput>neutron --os-tenant-name TenantA --os-username UserA --os-password password \ <screen><prompt>#</prompt> <userinput>neutron --os-tenant-name TenantA --os-username UserA --os-password password \
--os-auth-url=http://localhost:5000/v2.0 router-interface-add \ --os-auth-url=http://localhost:5000/v2.0 router-interface-add \
TenantA-R1 51e2c223-0492-4385-b6e9-83d4e6d10657</userinput></screen> TenantA-R1 51e2c223-0492-4385-b6e9-83d4e6d10657</userinput></screen>
<para>Added interface to router TenantA-R1</para> <para>Added interface to router
<screen><prompt>#</prompt> <userinput>neutron --os-tenant-name TenantA --os-username UserA --os-password password \ TenantA-R1</para>
<screen><prompt>#</prompt> <userinput>neutron --os-tenant-name TenantA --os-username UserA --os-password password \
--os-auth-url=http://localhost:5000/v2.0 \ --os-auth-url=http://localhost:5000/v2.0 \
router-gateway-set TenantA-R1 Ext-Net</userinput></screen> router-gateway-set TenantA-R1 Ext-Net</userinput></screen>
</listitem> </listitem>
<listitem> <listitem>
<para>Associate a floating IP for TenantA_VM1.</para> <para>Associate a floating IP for
TenantA_VM1.</para>
<para>1. Create a floating IP:</para> <para>1. Create a floating IP:</para>
<screen><prompt>#</prompt> <userinput>neutron --os-tenant-name TenantA --os-username UserA --os-password password \ <screen><prompt>#</prompt> <userinput>neutron --os-tenant-name TenantA --os-username UserA --os-password password \
--os-auth-url=http://localhost:5000/v2.0 floatingip-create Ext-Net</userinput> --os-auth-url=http://localhost:5000/v2.0 floatingip-create Ext-Net</userinput>
@ -597,7 +673,8 @@ neutron --os-tenant-name TenantA --os-username UserA --os-password password \
| 6071d430-c66e-4125-b972-9a937c427520 | | fa:16:3e:a0:73:0d | {"subnet_id": "51e2c223-0492-4385-b6e9-83d4e6d10657", "ip_address": "10.0.0.3"} | | 6071d430-c66e-4125-b972-9a937c427520 | | fa:16:3e:a0:73:0d | {"subnet_id": "51e2c223-0492-4385-b6e9-83d4e6d10657", "ip_address": "10.0.0.3"} |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+ +--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
</computeroutput></screen> </computeroutput></screen>
<para>3. Associate the floating IP with the VM port:</para> <para>3. Associate the floating IP with
the VM port:</para>
<screen><prompt>$</prompt> <userinput>neutron --os-tenant-name TenantA --os-username UserA --os-password password \ <screen><prompt>$</prompt> <userinput>neutron --os-tenant-name TenantA --os-username UserA --os-password password \
--os-auth-url=http://localhost:5000/v2.0 floatingip-associate \ --os-auth-url=http://localhost:5000/v2.0 floatingip-associate \
5a1f90ed-aa3c-4df3-82cb-116556e96bf1 6071d430-c66e-4125-b972-9a937c427520</userinput> 5a1f90ed-aa3c-4df3-82cb-116556e96bf1 6071d430-c66e-4125-b972-9a937c427520</userinput>
@ -612,7 +689,8 @@ neutron --os-tenant-name TenantA --os-username UserA --os-password password \
</computeroutput></screen> </computeroutput></screen>
</listitem> </listitem>
<listitem> <listitem>
<para>Ping the public network from the server of TenantA.</para> <para>Ping the public network from the
server of TenantA.</para>
<para>In my environment, 192.168.1.0/24 is <para>In my environment, 192.168.1.0/24 is
my public network connected with my my public network connected with my
physical router, which also connects physical router, which also connects
@ -632,7 +710,8 @@ rtt min/avg/max/mdev = 1.234/1.495/1.745/0.211 ms
</computeroutput></screen> </computeroutput></screen>
</listitem> </listitem>
<listitem> <listitem>
<para>Ping floating IP of the TenantA's server:</para> <para>Ping floating IP of the TenantA's
server:</para>
<screen><prompt>$</prompt> <userinput>ping 30.0.0.2</userinput> <screen><prompt>$</prompt> <userinput>ping 30.0.0.2</userinput>
<computeroutput>PING 30.0.0.2 (30.0.0.2) 56(84) bytes of data. <computeroutput>PING 30.0.0.2 (30.0.0.2) 56(84) bytes of data.
64 bytes from 30.0.0.2: icmp_req=1 ttl=63 time=45.0 ms 64 bytes from 30.0.0.2: icmp_req=1 ttl=63 time=45.0 ms
@ -645,7 +724,8 @@ rtt min/avg/max/mdev = 0.898/15.621/45.027/20.793 ms
</computeroutput></screen> </computeroutput></screen>
</listitem> </listitem>
<listitem> <listitem>
<para>Create other servers for TenantA.</para> <para>Create other servers for
TenantA.</para>
<para>We can create more servers for <para>We can create more servers for
TenantA and add floating IPs for TenantA and add floating IPs for
them.</para> them.</para>
@ -661,7 +741,8 @@ rtt min/avg/max/mdev = 0.898/15.621/45.027/20.793 ms
IPs.</para> IPs.</para>
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>Create networks and subnets for TenantC:</para> <para>Create networks and subnets for
TenantC:</para>
<screen><prompt>#</prompt> <userinput>neutron --os-tenant-name TenantC --os-username UserC --os-password password \ <screen><prompt>#</prompt> <userinput>neutron --os-tenant-name TenantC --os-username UserC --os-password password \
--os-auth-url=http://localhost:5000/v2.0 net-create TenantC-Net1</userinput> --os-auth-url=http://localhost:5000/v2.0 net-create TenantC-Net1</userinput>
<prompt>#</prompt> <userinput>neutron --os-tenant-name TenantC --os-username UserC --os-password password \ <prompt>#</prompt> <userinput>neutron --os-tenant-name TenantC --os-username UserC --os-password password \
@ -717,13 +798,15 @@ rtt min/avg/max/mdev = 0.898/15.621/45.027/20.793 ms
them to create VMs and router.</para> them to create VMs and router.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Create a server TenantC-VM1 for TenantC on TenantC-Net1.</para> <para>Create a server TenantC-VM1 for
TenantC on TenantC-Net1.</para>
<screen><prompt>#</prompt> <userinput>nova --os-tenant-name TenantC --os-username UserC --os-password password \ <screen><prompt>#</prompt> <userinput>nova --os-tenant-name TenantC --os-username UserC --os-password password \
--os-auth-url=http://localhost:5000/v2.0 boot --image tty --flavor 1 \ --os-auth-url=http://localhost:5000/v2.0 boot --image tty --flavor 1 \
--nic net-id=91309738-c317-40a3-81bb-bed7a3917a85 TenantC_VM1</userinput></screen> --nic net-id=91309738-c317-40a3-81bb-bed7a3917a85 TenantC_VM1</userinput></screen>
</listitem> </listitem>
<listitem> <listitem>
<para>Create a server TenantC-VM3 for TenantC on TenantC-Net2.</para> <para>Create a server TenantC-VM3 for
TenantC on TenantC-Net2.</para>
<screen><prompt>#</prompt> <userinput>nova --os-tenant-name TenantC --os-username UserC --os-password password \ <screen><prompt>#</prompt> <userinput>nova --os-tenant-name TenantC --os-username UserC --os-password password \
--os-auth-url=http://localhost:5000/v2.0 boot --image tty --flavor 1 \ --os-auth-url=http://localhost:5000/v2.0 boot --image tty --flavor 1 \
--nic net-id=5b373ad2-7866-44f4-8087-f87148abd623 TenantC_VM3</userinput></screen> --nic net-id=5b373ad2-7866-44f4-8087-f87148abd623 TenantC_VM3</userinput></screen>
@ -744,10 +827,13 @@ rtt min/avg/max/mdev = 0.898/15.621/45.027/20.793 ms
will use them later.</para> will use them later.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Make sure servers get their IPs.</para> <para>Make sure servers get their
<para>We can use VNC to log on the VMs to check if they get IPs. If not, IPs.</para>
we have to make sure the Networking components are running right and <para>We can use VNC to log on the VMs to
the GRE tunnels work.</para> check if they get IPs. If not, we have
to make sure the Networking components
are running right and the GRE tunnels
work.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Create and configure a router for <para>Create and configure a router for
@ -760,17 +846,13 @@ rtt min/avg/max/mdev = 0.898/15.621/45.027/20.793 ms
<prompt>#</prompt> <userinput>neutron --os-tenant-name TenantC --os-username UserC --os-password password \ <prompt>#</prompt> <userinput>neutron --os-tenant-name TenantC --os-username UserC --os-password password \
--os-auth-url=http://localhost:5000/v2.0 router-interface-add \ --os-auth-url=http://localhost:5000/v2.0 router-interface-add \
TenantC-R1 38f0b2f0-9f98-4bf6-9520-f4abede03300</userinput></screen> TenantC-R1 38f0b2f0-9f98-4bf6-9520-f4abede03300</userinput></screen>
<screen><prompt>#</prompt> <userinput>neutron --os-tenant-name TenantC --os-username UserC --os-password password \ <screen><prompt>#</prompt> <userinput>neutron --os-tenant-name TenantC --os-username UserC --os-password password \
--os-auth-url=http://localhost:5000/v2.0 \ --os-auth-url=http://localhost:5000/v2.0 \
router-gateway-set TenantC-R1 Ext-Net</userinput></screen> router-gateway-set TenantC-R1 Ext-Net</userinput></screen>
</listitem> </listitem>
<listitem> <listitem>
<para>Checkpoint: ping from within TenantC's servers.</para> <para>Checkpoint: ping from within
<para>Since we have a router connecting to two subnets, the VMs on these subnets are able to ping each other. TenantC's servers.</para>
And since we have set the router's gateway interface, TenantC's servers are able to ping external network IPs, such as 192.168.1.1, 30.0.0.1 etc.</para>
</listitem>
<listitem>
<para>Associate floating IPs for TenantC's servers.</para>
<para>Since we have a router connecting to <para>Since we have a router connecting to
two subnets, the VMs on these subnets two subnets, the VMs on these subnets
are able to ping each other. And since are able to ping each other. And since
@ -780,7 +862,19 @@ rtt min/avg/max/mdev = 0.898/15.621/45.027/20.793 ms
192.168.1.1, 30.0.0.1 etc.</para> 192.168.1.1, 30.0.0.1 etc.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Associate floating IPs for TenantC's servers.</para> <para>Associate floating IPs for TenantC's
servers.</para>
<para>Since we have a router connecting to
two subnets, the VMs on these subnets
are able to ping each other. And since
we have set the router's gateway
interface, TenantC's servers are able
to ping external network IPs, such as
192.168.1.1, 30.0.0.1 etc.</para>
</listitem>
<listitem>
<para>Associate floating IPs for TenantC's
servers.</para>
<para>We can use the similar commands as <para>We can use the similar commands as
we used in TenantA's section to finish we used in TenantA's section to finish
this task.</para> this task.</para>
@ -791,20 +885,26 @@ rtt min/avg/max/mdev = 0.898/15.621/45.027/20.793 ms
</para> </para>
</section> </section>
<section xml:id="section_use-cases-tenant-router"> <section xml:id="section_use-cases-tenant-router">
<title>Use case: per-tenant routers with private networks</title> <title>Use case: per-tenant routers with private
<para>This use case represents a more advanced router scenario in which each tenant gets at networks</title>
least one router, and potentially has access to the Networking API to create additional <para>This use case represents a more advanced router scenario
routers. The tenant can create their own networks, potentially uplinking those networks in which each tenant gets at least one router, and
to a router. This model enables tenant-defined, multi-tier applications, with each tier potentially has access to the Networking API to create
being a separate network behind the router. Since there are multiple routers, tenant additional routers. The tenant can create their own
subnets can overlap without conflicting, since access to external networks all happens networks, potentially uplinking those networks to a
via SNAT or Floating IPs. Each router uplink and floating IP is allocated from the router. This model enables tenant-defined, multi-tier
external network subnet.</para> applications, with each tier being a separate network
behind the router. Since there are multiple routers,
tenant subnets can overlap without conflicting, since
access to external networks all happens via SNAT or
Floating IPs. Each router uplink and floating IP is
allocated from the external network subnet.</para>
<para> <para>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata scale="55" <imagedata scale="55"
fileref="../common/figures/UseCase-MultiRouter.png" align="left"/> fileref="../common/figures/UseCase-MultiRouter.png"
align="left"/>
</imageobject> </imageobject>
</mediaobject> </mediaobject>
<!--Image source link: https://docs.google.com/a/nicira.com/drawings/d/1mmQc8cBUoTEfEns-ehIyQSTvOrjUdl5xeGDv9suVyAY/edit --> <!--Image source link: https://docs.google.com/a/nicira.com/drawings/d/1mmQc8cBUoTEfEns-ehIyQSTvOrjUdl5xeGDv9suVyAY/edit -->

View File

@ -96,7 +96,7 @@
<listitem> <listitem>
<para>Edit file <filename>/etc/neutron/neutron.conf</filename> <para>Edit file <filename>/etc/neutron/neutron.conf</filename>
and modify: and modify:
<programlisting language="ini">core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2 <programlisting language="ini">core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin
auth_strategy = keystone auth_strategy = keystone
fake_rabbit = False fake_rabbit = False
rabbit_password = guest</programlisting> rabbit_password = guest</programlisting>
@ -104,12 +104,13 @@ rabbit_password = guest</programlisting>
</listitem> </listitem>
<listitem> <listitem>
<para>Edit file <filename> <para>Edit file <filename>
/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini</filename> /etc/neutron/plugins/ml2/ml2_conf.ini</filename>
and modify:</para> and modify:</para>
<programlisting language="ini">[database] <programlisting language="ini">[database]
connection = mysql://neutron:<replaceable>NEUTRON_DBPASS</replaceable>@localhost:3306/neutron connection = mysql://neutron:<replaceable>NEUTRON_DBPASS</replaceable>@localhost:3306/neutron
[ovs] [ml2]
tenant_network_type = vlan tenant_network_type = vlan
[ml2_type_vlan]
network_vlan_ranges = physnet1:100:2999</programlisting> network_vlan_ranges = physnet1:100:2999</programlisting>
</listitem> </listitem>
<listitem> <listitem>
@ -165,13 +166,15 @@ rabbit_host = controller</programlisting>
<step> <step>
<para>Update the plug-in configuration file, <para>Update the plug-in configuration file,
<filename> <filename>
/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini /etc/neutron/plugins/ml2/ml2_conf.ini
</filename>:</para> </filename>:</para>
<programlisting language="ini">[database] <programlisting language="ini">[database]
connection = mysql://neutron:<replaceable>NEUTRON_DBPASS</replaceable>@controller:3306/neutron connection = mysql://neutron:<replaceable>NEUTRON_DBPASS</replaceable>@controller:3306/neutron
[ovs] [ml2]
tenant_network_type=vlan tenant_network_type=vlan
[ml2_type_vlan]
network_vlan_ranges = physnet1:1:4094 network_vlan_ranges = physnet1:1:4094
[ovs]
bridge_mappings = physnet1:br-eth1</programlisting> bridge_mappings = physnet1:br-eth1</programlisting>
</step> </step>
<step> <step>
@ -278,12 +281,14 @@ rabbit_host = controller</programlisting>
</step> </step>
<step> <step>
<para>Update the file <filename> <para>Update the file <filename>
/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini</filename>:</para> /etc/neutron/plugins/ml2/ml2_conf.ini</filename>:</para>
<programlisting language="ini">[database] <programlisting language="ini">[database]
connection = mysql://neutron:<replaceable>NEUTRON_DBPASS</replaceable>@controller:3306/neutron connection = mysql://neutron:<replaceable>NEUTRON_DBPASS</replaceable>@controller:3306/neutron
[ovs] [ml2]
tenant_network_type = vlan tenant_network_type = vlan
[ml2_type_vlan]
network_vlan_ranges = physnet1:1:4094 network_vlan_ranges = physnet1:1:4094
[ovs]
bridge_mappings = physnet1:br-eth1</programlisting> bridge_mappings = physnet1:br-eth1</programlisting>
</step> </step>
<step> <step>

View File

@ -88,7 +88,7 @@
</informaltable> </informaltable>
<para>The demo assumes the following prerequisites:</para> <para>The demo assumes the following prerequisites:</para>
<para><emphasis role="bold">Controller node</emphasis></para> <para><emphasis role="bold">Controller node</emphasis></para>
<orderedlist> <itemizedlist>
<listitem> <listitem>
<para>Relevant Compute services are installed, configured, <para>Relevant Compute services are installed, configured,
and running.</para> and running.</para>
@ -119,13 +119,13 @@
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</listitem> </listitem>
</orderedlist> </itemizedlist>
<para><emphasis role="bold">Compute node</emphasis></para> <para><emphasis role="bold">Compute node</emphasis></para>
<orderedlist> <itemizedlist>
<listitem> <listitem>
<para>Compute is installed and configured.</para> <para>Compute is installed and configured.</para>
</listitem> </listitem>
</orderedlist> </itemizedlist>
<section xml:id="demo_flat_installions"> <section xml:id="demo_flat_installions">
<title>Install</title> <title>Install</title>
<itemizedlist> <itemizedlist>
@ -162,7 +162,6 @@ core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2
control_exchange = neutron control_exchange = neutron
rabbit_host = controller rabbit_host = controller
notification_driver = neutron.openstack.common.notifier.rabbit_notifier notification_driver = neutron.openstack.common.notifier.rabbit_notifier
[keystone_authtoken] [keystone_authtoken]
admin_tenant_name=service admin_tenant_name=service
admin_user=neutron admin_user=neutron
@ -177,6 +176,7 @@ admin_password=<replaceable>NEUTRON_PASS</replaceable>
connection = mysql://root:root@controller:3306/ovs_neutron?charset=utf8 connection = mysql://root:root@controller:3306/ovs_neutron?charset=utf8
[ovs] [ovs]
network_vlan_ranges = physnet1 network_vlan_ranges = physnet1
[ovs]
bridge_mappings = physnet1:br-eth0 bridge_mappings = physnet1:br-eth0
</programlisting> </programlisting>
</listitem> </listitem>
@ -200,14 +200,12 @@ bridge_mappings = physnet1:br-eth0
following line is at the end of the following line is at the end of the
file:</para> file:</para>
<programlisting language="ini">network_api_class=nova.network.neutronv2.api.API <programlisting language="ini">network_api_class=nova.network.neutronv2.api.API
neutron_admin_username=neutron neutron_admin_username=neutron
neutron_admin_password=<replaceable>NEUTRON_PASS</replaceable> neutron_admin_password=<replaceable>NEUTRON_PASS</replaceable>
neutron_admin_auth_url=http://controller:35357/v2.0/ neutron_admin_auth_url=http://controller:35357/v2.0/
neutron_auth_strategy=keystone neutron_auth_strategy=keystone
neutron_admin_tenant_name=service neutron_admin_tenant_name=service
neutron_url=http://controller:9696/ neutron_url=http://controller:9696/
libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver
</programlisting> </programlisting>
</listitem> </listitem>
@ -250,6 +248,7 @@ notification_driver = neutron.openstack.common.notifier.rabbit_notifier</program
connection = mysql://root:root@controller:3306/ovs_neutron?charset=utf8 connection = mysql://root:root@controller:3306/ovs_neutron?charset=utf8
[ovs] [ovs]
network_vlan_ranges = physnet1 network_vlan_ranges = physnet1
[ovs]
bridge_mappings = physnet1:br-eth0</programlisting> bridge_mappings = physnet1:br-eth0</programlisting>
</listitem> </listitem>
<listitem> <listitem>
@ -438,14 +437,14 @@ rtt min/avg/max/mdev = 1.234/1.495/1.745/0.211 ms</computeroutput></screen>
outside world. For each subnet on an external network, the outside world. For each subnet on an external network, the
gateway configuration on the physical router must be gateway configuration on the physical router must be
manually configured outside of OpenStack.</para> manually configured outside of OpenStack.</para>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata scale="80" <imagedata scale="80"
fileref="../common/figures/UseCase-SingleFlat.png" fileref="../common/figures/UseCase-SingleFlat.png"
/> />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
<!--Image source link: https://docs.google.com/a/nicira.com/drawings/d/1Jb6iSoBo4G7fv7i2EMpYTMTxesLPmEPKIbI7sVbhhqY/edit --> <!--Image source link: https://docs.google.com/a/nicira.com/drawings/d/1Jb6iSoBo4G7fv7i2EMpYTMTxesLPmEPKIbI7sVbhhqY/edit -->
</section> </section>
<?hard-pagebreak?> <?hard-pagebreak?>
<section xml:id="section_use-cases-multi-flat"> <section xml:id="section_use-cases-multi-flat">
@ -454,14 +453,14 @@ rtt min/avg/max/mdev = 1.234/1.495/1.745/0.211 ms</computeroutput></screen>
network use case, except that tenants can see multiple network use case, except that tenants can see multiple
shared networks via the Networking API and can choose shared networks via the Networking API and can choose
which network (or networks) to plug into.</para> which network (or networks) to plug into.</para>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata scale="60" <imagedata scale="60"
fileref="../common/figures/UseCase-MultiFlat.png" fileref="../common/figures/UseCase-MultiFlat.png"
/> />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
<!--Image source link: https://docs.google.com/a/nicira.com/drawings/d/14ayGsyunW_P-wvY8OiueE407f7540JD3VsWUH18KHvU/edit --> <!--Image source link: https://docs.google.com/a/nicira.com/drawings/d/14ayGsyunW_P-wvY8OiueE407f7540JD3VsWUH18KHvU/edit -->
</section> </section>
<section xml:id="section_use-cases-mixed"> <section xml:id="section_use-cases-mixed">
<title>Use case: mixed flat and private network</title> <title>Use case: mixed flat and private network</title>