Enable flat network type support

1. What is the problem
Flat network type is commonly used as the external network type, but
currently users can not create a flat external network via Tricircle.

2. What is the solution for the problem
Support flat network type.

3. What features need to be implemented to the Tricircle to
realize the solution
(1) A new type driver for flat network is added.
(2) Release note is added
(3) Related documents are updated

Change-Id: I148e1102510dda96a9fcd8a4b76de09cd802833c
This commit is contained in:
zhiyuan_cai 2017-03-27 10:55:58 +08:00
parent 819b3fa96a
commit ee008cae6b
16 changed files with 788 additions and 9 deletions

View File

@ -28,6 +28,7 @@ HOST_IP=10.250.201.24
Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS=(network_vlan_ranges=bridge:2001:3000,extern:3001:4000)
Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS=(vni_ranges=1001:2000)
Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS=(flat_networks=bridge,extern)
OVS_BRIDGE_MAPPINGS=bridge:br-vlan
# Specify Central Region name

View File

@ -32,6 +32,7 @@ KEYSTONE_AUTH_HOST=10.250.201.24
Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS=(network_vlan_ranges=bridge:2001:3000,extern:3001:4000)
Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS=(vni_ranges=1001:2000)
Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS=(flat_networks=bridge,extern)
OVS_BRIDGE_MAPPINGS=bridge:br-vlan,extern:br-ext
# Specify Central Region name

View File

@ -96,6 +96,7 @@ function init_local_neutron_variables {
local vlan_ranges=(network_vlan_ranges=$vlan_option,$ext_option)
Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS=$vlan_ranges
Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS="vni_ranges=$TRICIRCLE_DEFAULT_VXLAN_RANGE"
Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS="flat_networks=$TRICIRCLE_DEFAULT_FLAT_NETWORKS"
local vlan_mapping="bridge:$TRICIRCLE_DEFAULT_VLAN_BRIDGE"
local ext_mapping="extern:$TRICIRCLE_DEFAULT_EXT_BRIDGE"
@ -249,6 +250,11 @@ function start_central_neutron_server {
tenant_network_types+=,vxlan
iniset $NEUTRON_CONF.$server_index tricircle vni_ranges `echo $Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS | awk -F= '{print $2}'`
fi
if [ "Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS" != "" ]; then
type_drivers+=,flat
tenant_network_types+=,flat
iniset $NEUTRON_CONF.$server_index tricircle flat_networks `echo $Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS | awk -F= '{print $2}'`
fi
iniset $NEUTRON_CONF.$server_index tricircle type_drivers $type_drivers
iniset $NEUTRON_CONF.$server_index tricircle tenant_network_types $tenant_network_types
iniset $NEUTRON_CONF.$server_index tricircle enable_api_gateway False

View File

@ -16,6 +16,7 @@ TRICIRCLE_DEFAULT_EXT_BRIDGE=${TRICIRCLE_DEFAULT_EXT_BRIDGE:-br-ext}
TRICIRCLE_DEFAULT_EXT_RANGE=${TRICIRCLE_DEFAULT_EXT_RANGE:-151:200}
TRICIRCLE_ADD_DEFAULT_BRIDGES=${TRICIRCLE_ADD_DEFAULT_BRIDGES:-False}
TRICIRCLE_DEFAULT_VXLAN_RANGE=${TRICIRCLE_DEFAULT_VXLAN_RANGE:-1001:2000}
TRICIRCLE_DEFAULT_FLAT_NETWORKS=${TRICIRCLE_DEFAULT_FLAT_NETWORKS:-bridge,extern}
TRICIRCLE_CONF_DIR=${TRICIRCLE_CONF_DIR:-/etc/tricircle}
TRICIRCLE_STATE_PATH=${TRICIRCLE_STATE_PATH:-/var/lib/tricircle}

View File

@ -0,0 +1,587 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
<title>Configuration Guide</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7614 2013-02-21 15:55:51Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="configuration-guide">
<h1 class="title">Configuration Guide</h1>
<p>A brief introduction to configure Tricircle service. Only the
configuration items for Tricircle will be described here. Logging,
messaging, database, keystonemiddleware etc configuration which are
generated from OpenStack Oslo library, will not be described here. Since
these configuration items are common to Nova, Cinder, Neutron. Please
refer to corresponding description from Nova, Cinder or Neutron.</p>
<div class="section" id="common-options">
<h1>Common Options</h1>
<p>In the common configuration options, the group of &quot;client&quot; need to be
configured in Admin API, XJob, Local Plugin and Central Plugin. The
&quot;tricircle_db_connection&quot; should be configured in Admin API, XJob and
Central Plugin.</p>
<table border="1" class="config-ref-table docutils" id="common">
<caption>Description of common configuration options</caption>
<colgroup>
<col width="50%" />
<col width="50%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Configuration option = Default value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><strong>[DEFAULT]</strong></td>
<td>&nbsp;</td>
</tr>
<tr><td><tt class="docutils literal">tricircle_db_connection</tt> = <tt class="docutils literal">None</tt></td>
<td>(String) database connection string for Tricircle, for example, mysql+pymysql://root:password&#64;127.0.0.1/tricircle?charset=utf8</td>
</tr>
<tr><td><strong>[client]</strong></td>
<td>&nbsp;</td>
</tr>
<tr><td><tt class="docutils literal">admin_password</tt> = <tt class="docutils literal">None</tt></td>
<td>(String) password of admin account, needed when auto_refresh_endpoint set to True, for example, password.</td>
</tr>
<tr><td><tt class="docutils literal">admin_tenant</tt> = <tt class="docutils literal">None</tt></td>
<td>(String) tenant name of admin account, needed when auto_refresh_endpoint set to True, for example, demo.</td>
</tr>
<tr><td><tt class="docutils literal">admin_tenant_domain_name</tt> = <tt class="docutils literal">Default</tt></td>
<td>(String) tenant domain name of admin account, needed when auto_refresh_endpoint set to True.</td>
</tr>
<tr><td><tt class="docutils literal">admin_user_domain_name</tt> = <tt class="docutils literal">Default</tt></td>
<td>(String) user domain name of admin account, needed when auto_refresh_endpoint set to True.</td>
</tr>
<tr><td><tt class="docutils literal">admin_username</tt> = <tt class="docutils literal">None</tt></td>
<td>(String) username of admin account, needed when auto_refresh_endpoint set to True.</td>
</tr>
<tr><td><tt class="docutils literal">auth_url</tt> = <tt class="docutils literal"><span class="pre">http://127.0.0.1:5000/v3</span></tt></td>
<td>(String) keystone authorization url, for example, <a class="reference external" href="http://$service_host:5000/v3">http://$service_host:5000/v3</a></td>
</tr>
<tr><td><tt class="docutils literal">auto_refresh_endpoint</tt> = <tt class="docutils literal">True</tt></td>
<td>(Boolean) if set to True, endpoint will be automatically refreshed if timeout accessing endpoint.</td>
</tr>
<tr><td><tt class="docutils literal">ew_bridge_cidr</tt> = <tt class="docutils literal">100.0.0.0/9</tt></td>
<td>(String) cidr pool of the east-west bridge network, for example, 100.0.0.0/9</td>
</tr>
<tr><td><tt class="docutils literal">identity_url</tt> = <tt class="docutils literal"><span class="pre">http://127.0.0.1:35357/v3</span></tt></td>
<td>(String) keystone service url, for example, <a class="reference external" href="http://$service_host:35357/v3">http://$service_host:35357/v3</a></td>
</tr>
<tr><td><tt class="docutils literal">neutron_timeout</tt> = <tt class="docutils literal">60</tt></td>
<td>(Integer) timeout for neutron client in seconds.</td>
</tr>
<tr><td><tt class="docutils literal">ns_bridge_cidr</tt> = <tt class="docutils literal">100.128.0.0/9</tt></td>
<td>(String) cidr pool of the north-south bridge network, for example, 100.128.0.0/9</td>
</tr>
<tr><td><tt class="docutils literal">top_region_name</tt> = <tt class="docutils literal">None</tt></td>
<td>(String) region name of Central Neutron in which client needs to access, for example, CentralRegion.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="tricircle-admin-api-settings">
<h1>Tricircle Admin API Settings</h1>
<p>Tricircle Admin API servers for managing the mapping between OpenStack instances
and availability zone, retrieving object uuid routing and exposing API for
maintenance. The following items should be configured in Tricircle's api.conf.</p>
<table border="1" class="config-ref-table docutils" id="tricircle-admin-api">
<caption>Description of Tricircle Admin API configuration options</caption>
<colgroup>
<col width="50%" />
<col width="50%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Configuration option = Default value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><strong>[DEFAULT]</strong></td>
<td>&nbsp;</td>
</tr>
<tr><td><tt class="docutils literal">api_workers</tt> = <tt class="docutils literal">1</tt></td>
<td>(Integer) The port to bind to</td>
</tr>
<tr><td><tt class="docutils literal">auth_strategy</tt> = <tt class="docutils literal">keystone</tt></td>
<td>(String) The type of authentication to use</td>
</tr>
<tr><td><tt class="docutils literal">bind_host</tt> = <tt class="docutils literal">0.0.0.0</tt></td>
<td>(String) The host IP to bind to</td>
</tr>
<tr><td><tt class="docutils literal">bind_port</tt> = <tt class="docutils literal">19999</tt></td>
<td>(Integer) The port to bind to</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="tricircle-xjob-settings">
<h1>Tricircle XJob Settings</h1>
<p>Tricircle XJob serves for receiving and processing cross OpenStack
functionality and other async jobs from Admin API or Tricircle Central
Neutron Plugin. The following items should be configured in Tricircle's
xjob.conf.</p>
<table border="1" class="config-ref-table docutils" id="tricircle-xjob">
<caption>Description of Tricircle XJob configuration options</caption>
<colgroup>
<col width="50%" />
<col width="50%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Configuration option = Default value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><strong>[DEFAULT]</strong></td>
<td>&nbsp;</td>
</tr>
<tr><td><tt class="docutils literal">periodic_enable</tt> = <tt class="docutils literal">True</tt></td>
<td>(Boolean) Enable periodic tasks</td>
</tr>
<tr><td><tt class="docutils literal">periodic_fuzzy_delay</tt> = <tt class="docutils literal">60</tt></td>
<td>(Integer) Range of seconds to randomly delay when starting the periodic task scheduler to reduce stampeding. (Disable by setting to 0)</td>
</tr>
<tr><td><tt class="docutils literal">report_interval</tt> = <tt class="docutils literal">10</tt></td>
<td>(Integer) Seconds between nodes reporting state to datastore</td>
</tr>
<tr><td><tt class="docutils literal">host</tt> = <tt class="docutils literal">tricircle.xhost</tt></td>
<td>(String) The host name for RPC server, each node should have different host name.</td>
</tr>
<tr><td><tt class="docutils literal">job_run_expire</tt> = <tt class="docutils literal">180</tt></td>
<td>(Integer) Running job is considered expires after this time, in seconds</td>
</tr>
<tr><td><tt class="docutils literal">workers</tt> = <tt class="docutils literal">1</tt></td>
<td>(Integer) Number of workers</td>
</tr>
<tr><td><tt class="docutils literal">worker_handle_timeout</tt> = <tt class="docutils literal">1800</tt></td>
<td>(Integer) Timeout for worker's one turn of processing, in seconds</td>
</tr>
<tr><td><tt class="docutils literal">worker_sleep_time</tt> = <tt class="docutils literal">60</tt></td>
<td>(Float) Seconds a worker sleeps after one run in a loop</td>
</tr>
<tr><td><tt class="docutils literal">redo_time_span</tt> = <tt class="docutils literal">172800</tt></td>
<td>(Integer) Time span in seconds, we calculate the latest job timestamp by
subtracting this time span from the current timestamp, jobs created
between these two timestamps will be redone</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="networking-setting-for-tricircle">
<h1>Networking Setting for Tricircle</h1>
<p>To make the networking automation work, two plugins need to be configured:
Tricircle Central Neutron Plugin and Tricircle Local Neutron Plugin.</p>
<p><strong>Tricircle Central Neutron Plugin</strong></p>
<p>The Tricircle Central Neutron Plugin serves for tenant level L2/L3 networking
automation across multiple OpenStack instances. The following items should be
configured in central Neutron's neutron.conf.</p>
<table border="1" class="config-ref-table docutils" id="central-neutron">
<caption>Description of Central Neutron configuration options</caption>
<colgroup>
<col width="50%" />
<col width="50%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Configuration option = Default value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><strong>[DEFAULT]</strong></td>
<td>&nbsp;</td>
</tr>
<tr><td><tt class="docutils literal">core_plugin</tt> = <tt class="docutils literal">None</tt></td>
<td>(String) core plugin central Neutron server uses, should be set to tricircle.network.central_plugin.TricirclePlugin</td>
</tr>
<tr><td><strong>[tricircle]</strong></td>
<td>&nbsp;</td>
</tr>
<tr><td><tt class="docutils literal">bridge_network_type</tt> = <tt class="docutils literal">shared_vlan</tt></td>
<td>(String) Type of l3 bridge network, this type should be enabled in tenant_network_types and is not local type, for example, shared_vlan.</td>
</tr>
<tr><td><tt class="docutils literal">default_region_for_external_network</tt> = <tt class="docutils literal">RegionOne</tt></td>
<td>(String) Default region where the external network belongs to, it must exist, for example, RegionOne.</td>
</tr>
<tr><td><tt class="docutils literal">network_vlan_ranges</tt> = <tt class="docutils literal">None</tt></td>
<td>(String) List of &lt;physical_network&gt;:&lt;vlan_min&gt;:&lt;vlan_max&gt; or &lt;physical_network&gt; specifying physical_network names usable for VLAN provider and tenant networks, as well as ranges of VLAN tags on each available for allocation to tenant networks, for example,bridge:2001:3000.</td>
</tr>
<tr><td><tt class="docutils literal">tenant_network_types</tt> = <tt class="docutils literal">local,shared_vlan</tt></td>
<td>(String) Ordered list of network_types to allocate as tenant networks. The default value &quot;local&quot; is useful for single pod connectivity. For example, local and shared_vlan.</td>
</tr>
<tr><td><tt class="docutils literal">type_drivers</tt> = <tt class="docutils literal">local,shared_vlan</tt></td>
<td>(String) List of network type driver entry points to be loaded from the tricircle.network.type_drivers namespace. For example, local and shared_vlan.</td>
</tr>
</tbody>
</table>
<p><strong>Tricircle Local Neutron Plugin</strong></p>
<p>The Tricircle Local Neutron Plugin serves for cross Neutron networking
automation triggering. It is a shim layer between real core plugin and
Neutron API server. The following items should be configured in local
Neutron's neutron.conf</p>
<table border="1" class="config-ref-table docutils" id="local-neutron">
<caption>Description of Local Neutron configuration options</caption>
<colgroup>
<col width="50%" />
<col width="50%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Configuration option = Default value</th>
<th class="head">Description and Example</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><strong>[DEFAULT]</strong></td>
<td>&nbsp;</td>
</tr>
<tr><td><tt class="docutils literal">core_plugin</tt> = <tt class="docutils literal">None</tt></td>
<td>(String) core plugin local Neutron server uses, should be set to tricircle.network.local_plugin.TricirclePlugin</td>
</tr>
<tr><td><strong>[tricircle]</strong></td>
<td>&nbsp;</td>
</tr>
<tr><td><tt class="docutils literal">central_neutron_url</tt> = <tt class="docutils literal">None</tt></td>
<td>(String) Central Neutron server url, for example, <a class="reference external" href="http://$service_host:9696">http://$service_host:9696</a></td>
</tr>
<tr><td><tt class="docutils literal">real_core_plugin</tt> = <tt class="docutils literal">None</tt></td>
<td>(String) The core plugin the Tricircle local plugin will invoke, for example, neutron.plugins.ml2.plugin.Ml2Plugin</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>

View File

@ -160,7 +160,8 @@ configured in central Neutron's neutron.conf.
- (String) List of network type driver entry points to be loaded from the tricircle.network.type_drivers namespace, for example, local vlan and vxlan.
* - ``vni_ranges`` = ``None``
- (String) Comma-separated list of <vni_min>:<vni_max> tuples enumerating ranges of VXLAN VNI IDs that are available for tenant network allocation, for example, 1001:2000
* - ``flat_networks`` = ``*``
- (String) List of physical_network names with which flat networks can be created. Use default '*' to allow flat networks with arbitrary physical_network names. Use an empty list to disable flat networks.
**Tricircle Local Neutron Plugin**

View File

@ -130,6 +130,19 @@ RegionOne,
this option can be omitted if only VxLAN networks are needed
- if you would like to also configure flat network, you can set
Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS, the format of it is
(flat_networks=phy_net1,phy_net2,...). Besides specifying a list of
physical network names, you can also use '*' to allow flat networks with
arbitrary physical network names; or use an empty list to disable flat
networks. For simplicity, we use the same physical networks and bridge
mappings for vlan and flat network configuration. Similar to vlan network,
You need to additionally specify the physical network "extern" to ensure
the central neutron can create "extern" physical network which located in
other pods::
Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS=(flat_networks=bridge,extern)
- set TRICIRCLE_START_SERVICES to True to install the Tricircle service and
central Neutron in node1::
@ -198,6 +211,16 @@ In pod2 in node2 for OpenStack RegionTwo,
OVS_BRIDGE_MAPPINGS=extern:br-ext
- if you would like to also configure flat network, you can set
Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS, the format of it is
(flat_networks=phy_net1,phy_net2,...). Besides specifying a list of
physical network names, you can also use '*' to allow flat networks with
arbitrary physical network names; or use an empty list to disable flat
networks. For simplicity, we use the same physical networks and bridge
mappings for vlan and flat network configuration::
Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS=(flat_networks=bridge,extern)
- set TRICIRCLE_START_SERVICES to False(it's True by default) so Tricircle
services and central Neutron will not be started in node2::

View File

@ -40,7 +40,6 @@ will be created in a default region.
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --provider:network_type vlan --provider:physical_network extern --router:external --availability-zone-hint RegionOne ext-net1
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
@ -59,6 +58,29 @@ will be created in a default region.
| tenant_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
+---------------------------+--------------------------------------+
Now you can also create flat type external network
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --provider:network_type flat --provider:physical_network extern --router:external --availability-zone-hint RegionOne ext-net1
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | RegionOne |
| id | df2c8e3a-3f25-4cba-a902-33289f3a8aee |
| name | ext-net1 |
| project_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
| provider:network_type | flat |
| provider:physical_network | extern |
| provider:segmentation_id | |
| router:external | True |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
+---------------------------+--------------------------------------+
For external network, the network will be created in the region specified in
availability-zone-hint too.

View File

@ -44,7 +44,6 @@ Create external network ext-net1, which will be located in RegionOne.
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --provider:network_type vlan --provider:physical_network extern --router:external --availability-zone-hint RegionOne ext-net1
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
@ -63,6 +62,29 @@ Create external network ext-net1, which will be located in RegionOne.
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
+---------------------------+--------------------------------------+
Now you can also create flat type external network
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --provider:network_type flat --provider:physical_network extern --router:external --availability-zone-hint RegionOne ext-net1
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | RegionOne |
| id | 17d969a5-efe3-407f-9657-61658a4a5193 |
| name | ext-net1 |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| provider:network_type | flat |
| provider:physical_network | extern |
| provider:segmentation_id | |
| router:external | True |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
+---------------------------+--------------------------------------+
Create subnet in ext-net1.
.. code-block:: console
@ -508,6 +530,29 @@ Create external network ext-net2, which will be located in RegionTwo.
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
+---------------------------+--------------------------------------+
Now you can also create flat type external network
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --provider:network_type flat --provider:physical_network extern --router:external --availability-zone-hint RegionTwo ext-net2
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | RegionTwo |
| id | 0b6d43d1-a837-4f91-930e-dfcc74ef483b |
| name | ext-net2 |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| provider:network_type | flat |
| provider:physical_network | extern |
| provider:segmentation_id | |
| router:external | True |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
+---------------------------+--------------------------------------+
Create subnet in ext-net2.
.. code-block:: console

View File

@ -108,6 +108,29 @@ Create external network ext-net1, which will be located in RegionThree.
| tenant_id | 640e791e767e49939d5c600fdb3f8431 |
+---------------------------+--------------------------------------+
Now you can also create flat type external network
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --provider:network_type flat --provider:physical_network extern --router:external --availability-zone-hint RegionTwo ext-net1
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | RegionTwo |
| id | c151c1a2-ec8c-4975-bb85-9a8e143100b0 |
| name | ext-net1 |
| project_id | 640e791e767e49939d5c600fdb3f8431 |
| provider:network_type | flat |
| provider:physical_network | extern |
| provider:segmentation_id | |
| router:external | True |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 640e791e767e49939d5c600fdb3f8431 |
+---------------------------+--------------------------------------+
Create subnet in ext-net1.
.. code-block:: console

View File

@ -67,6 +67,11 @@ network is 1001~2000, add the following configuration to the above local.conf::
Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS=(vni_ranges=1001:2000)
If you also want to configure flat network, suppose you use the same physical
network as the vlan network, configure the local.conf like this::
Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS=(flat_networks=bridge,extern)
In both RegionOne and RegionTwo, external network is able to be provisioned,
the settings will look like this in /etc/neutron/plugins/ml2/ml2_conf.ini::
@ -74,6 +79,8 @@ the settings will look like this in /etc/neutron/plugins/ml2/ml2_conf.ini::
vni_ranges = 1001:2000(or the range that you configure)
flat_networks = bridge,extern
bridge_mappings = bridge:br-vlan,extern:br-ext
Please be aware that the physical network name for tenant VLAN network is
@ -85,8 +92,9 @@ follows::
bridge_network_type = vxlan
network_vlan_ranges = bridge:101:150,extern:151:200
vni_ranges = 1001:2000
tenant_network_types = local,vlan,vxlan
type_drivers = local,vlan,vxlan
flat_networks = bridge,extern
tenant_network_types = local,vlan,vxlan,flat
type_drivers = local,vlan,vxlan,flat
The default network type in central Neutron is local network, i.e, one
network can only be presented in one local Neutron. In which region the
@ -102,6 +110,10 @@ command for vlan network type, or --provider-network-type vxlan for vxlan
network type. Both vlan and vxlan network type could work as the bridge
network. The default bridge network type is vxlan.
If you want to create a flat network, which is usually used as the external
network type, then you have to specify --provider-network-type flat in network
creation command.
You can create L2 network for different purposes, and the supported network
types for different purposes are summarized as follows.
@ -113,10 +125,10 @@ types for different purposes are summarized as follows.
* - Networking purpose
- Supported
* - Local L2 network for instances
- VLAN, VxLAN
- FLAT, VLAN, VxLAN
* - Cross Neutron L2 network for instances
- VLAN, VxLAN
- FLAT, VLAN, VxLAN
* - Bridge network for routers
- VLAN, VxLAN
- FLAT, VLAN, VxLAN
* - External network
- VLAN
- FLAT, VLAN

View File

@ -0,0 +1,4 @@
---
features:
- |
Support flat type of tenant network or external network

View File

@ -64,3 +64,4 @@ tricircle.network.type_drivers =
local = tricircle.network.drivers.type_local:LocalTypeDriver
vlan = tricircle.network.drivers.type_vlan:VLANTypeDriver
vxlan = tricircle.network.drivers.type_vxlan:VxLANTypeDriver
flat = tricircle.network.drivers.type_flat:FlatTypeDriver

View File

@ -101,6 +101,7 @@ JT_SHADOW_PORT_SETUP = 'shadow_port_setup'
NT_LOCAL = 'local'
NT_VLAN = 'vlan'
NT_VxLAN = 'vxlan'
NT_FLAT = 'flat'
# cross-pod VxLAN networking support mode
NM_P2P = 'p2p'

View File

@ -90,6 +90,12 @@ tricircle_opts = [
help=_('Comma-separated list of <vni_min>:<vni_max> tuples '
'enumerating ranges of VXLAN VNI IDs that are '
'available for tenant network allocation.')),
cfg.ListOpt('flat_networks',
default='*',
help=_("List of physical_network names with which flat "
"networks can be created. Use default '*' to allow "
"flat networks with arbitrary physical_network names. "
"Use an empty list to disable flat networks.")),
cfg.StrOpt('bridge_network_type',
default='vxlan',
help=_('Type of l3 bridge network, this type should be enabled '

View File

@ -0,0 +1,45 @@
# Copyright 2017 Huawei Technologies Co., Ltd.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from oslo_log import log
from neutron.plugins.ml2 import driver_api
from neutron.plugins.ml2.drivers import type_flat
from tricircle.common import constants
LOG = log.getLogger(__name__)
class FlatTypeDriver(type_flat.FlatTypeDriver):
def __init__(self):
super(type_flat.FlatTypeDriver, self).__init__()
self._parse_networks(cfg.CONF.tricircle.flat_networks)
def get_type(self):
return constants.NT_FLAT
def initialize(self):
LOG.info("FlatTypeDriver initialization complete")
def reserve_provider_segment(self, context, segment):
res = super(FlatTypeDriver,
self).reserve_provider_segment(context, segment)
res[driver_api.NETWORK_TYPE] = self.get_type()
return res
def get_mtu(self, physical_network=None):
pass