Update docs with 3.0.1 changes

Change-Id: Ib3975cc239615d4c77027a0891fc2a94bd43ddf2
This commit is contained in:
Przemysław Szypowicz 2016-06-16 10:49:46 +02:00 committed by Przemysław
parent e7091ee10f
commit d384126e47
34 changed files with 557 additions and 214 deletions

View File

@ -5,7 +5,7 @@
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
BUILDDIR = build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
@ -15,9 +15,14 @@ endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# SVG to PDF conversion
SVG2PDF = inkscape
SVG2PDF_FLAGS =
# Build a list of SVG files to convert to PDF
PDF_FILES := $(foreach dir, images, $(patsubst %.svg,%.pdf,$(wildcard $(dir)/*.svg)))
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext

View File

@ -1,76 +1,46 @@
# BSD LICENSE
# Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Intel Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import subprocess
from docutils import nodes
from distutils.version import LooseVersion
from sphinx import __version__ as sphinx_version
from sphinx.highlighting import PygmentsBridge
from pygments.formatters.latex import LatexFormatter
project = 'Contrail plugin for Fuel'
mypreamble=ur'''
\renewcommand{\Verbatim}[1][1]{%
% list starts new par, but we don't want it to be set apart vertically
\bgroup\parskip=0pt%
\smallskip%
% The list environement is needed to control perfectly the vertical
% space.
\list{}{%
\setlength\parskip{0pt}%
\setlength\itemsep{0ex}%
\setlength\topsep{0ex}%
\setlength\partopsep{0pt}%
\setlength\leftmargin{10pt}%
}%
\item\MakeFramed {\FrameRestore}%
\tiny % <---------------- To be changed!
\OriginalVerbatim[#1]%
}
'''
if LooseVersion(sphinx_version) >= LooseVersion('1.3.1'):
html_theme = "sphinx_rtd_theme"
#html_logo = '../logo/DPDK_logo_vertical_rev_small.png'
#latex_logo = '../logo/DPDK_logo_horizontal_tag.png'
html_add_permalinks = ""
html_show_copyright = False
highlight_language = 'none'
#version = subprocess.check_output(['make', '-sRrC', '../../', 'showversion']).decode('utf-8')
version = 3.0
release = version
source_suffix = '.rst'
master_doc = 'index'
# Figures, tables and code-blocks automatically numbered if they have caption
numfig = True
project = u'Contrail plugin for Fuel'
copyright = u'2015, Mirantis Inc.'
version = '4.0'
release = '4.0-4.0.0'
pygments_style = 'sphinx'
latex_documents = [
('index',
'fuel-plugin-contrail-doc.tex',
'',
'',
'manual')
('index','fuel-plugin-contrail-doc.tex',
u'Contrail plugin for Fuel Documentation',
u'Mirantis Inc.', 'manual')
]
# Latex directives to be included directly in the latex/pdf docs.
latex_preamble = r"""
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\RecustomVerbatimEnvironment{Verbatim}{Verbatim}{xleftmargin=5mm}
"""
# Configuration for the latex/pdf docs.
latex_elements = {
'papersize': 'a4paper',
@ -78,80 +48,12 @@ latex_elements = {
# remove blank pages
'classoptions': ',openany,oneside',
'babel': '\\usepackage[english]{babel}',
# customize Latex formatting
'preamble': latex_preamble
'preamble':mypreamble,
}
# Override the default Latex formatter in order to modify the
# code/verbatim blocks.
class CustomLatexFormatter(LatexFormatter):
def __init__(self, **options):
super(CustomLatexFormatter, self).__init__(**options)
# Use the second smallest font size for code/verbatim blocks.
self.verboptions = r'formatcom=\footnotesize'
if LooseVersion(sphinx_version) >= LooseVersion('1.3.1'):
html_theme = "sphinx_rtd_theme"
# Replace the default latex formatter.
PygmentsBridge.latex_formatter = CustomLatexFormatter
######## :numref: fallback ########
# The following hook functions add some simple handling for the :numref:
# directive for Sphinx versions prior to 1.3.1. The functions replace the
# :numref: reference with a link to the target (for all Sphinx doc types).
# It doesn't try to label figures/tables.
def numref_role(reftype, rawtext, text, lineno, inliner):
"""
Add a Sphinx role to handle numref references. Note, we can't convert
the link here because the doctree isn't build and the target information
isn't available.
"""
# Add an identifier to distinguish numref from other references.
newnode = nodes.reference('',
'',
refuri='_local_numref_#%s' % text,
internal=True)
return [newnode], []
def process_numref(app, doctree, from_docname):
"""
Process the numref nodes once the doctree has been built and prior to
writing the files. The processing involves replacing the numref with a
link plus text to indicate if it is a Figure or Table link.
"""
# Iterate over the reference nodes in the doctree.
for node in doctree.traverse(nodes.reference):
target = node.get('refuri', '')
# Look for numref nodes.
if target.startswith('_local_numref_#'):
target = target.replace('_local_numref_#', '')
# Get the target label and link information from the Sphinx env.
data = app.builder.env.domains['std'].data
docname, label, _ = data['labels'].get(target, ('', '', ''))
relative_url = app.builder.get_relative_uri(from_docname, docname)
# Add a text label to the link.
if target.startswith('figure'):
caption = 'Figure'
elif target.startswith('table'):
caption = 'Table'
else:
caption = 'Link'
# New reference node with the updated link information.
newnode = nodes.reference('',
caption,
refuri='%s#%s' % (relative_url, label),
internal=True)
node.replace_self(newnode)
def setup(app):
if LooseVersion(sphinx_version) < LooseVersion('1.3.1'):
print('Upgrade sphinx to version >= 1.3.1 for '
'improved Figure/Table number handling.')
# Add a role to handle :numref: references.
app.add_role('numref', numref_role)
# Process the numref references once the doctree has been created.
app.connect('doctree-resolved', process_numref)
html_add_permalinks = ""
html_show_copyright = False
highlight_language = 'none'

View File

@ -5,6 +5,10 @@ This document describes very basic operations with Contrail UI.
For detailed information on Contrail operations, please refer to official `Juniper documentation
<http://www.juniper.net/techpubs/en_US/contrail2.0/information-products/pathway-pages/getting-started.html#configuration>`_.
.. raw:: latex
\pagebreak
Logging in
----------
@ -13,17 +17,20 @@ Log into Contrail UI using the `OpenStack admin credentials.
.. image:: images/contrail-login.png
.. raw:: latex
\pagebreak
Checking services status
------------------------
Verify the status of Contrail Control Analytics and Config nodes along with vRouters in *Infrastructure* using­ *Dashboard*
Verify the status of Contrail Control Analytics and Config nodes along with vRouters in *Infrastructure* using *Dashboard*
tab of the left-hand *Monitor* menu.
.. image:: images/contrail-services.png
Сreating the virtual networks
Creating the virtual networks
-----------------------------
@ -34,7 +41,7 @@ tab of the left-hand *Monitor* menu.
* To create an external network, you need to add ``Shared`` and ``External`` flags to the created network using
the ``Advanced Options`` sections and provide a proper Routing mark in Route Targets section to let this network to be
announced to public routing table.
announced to the public routing table.
The Routing mark is two numbers divided by a semicolon, e.g. 64512:10000.
.. image:: images/contrail-create-ext-net.png

231
doc/source/dpdk.rst Normal file
View File

@ -0,0 +1,231 @@
DPDK-based vRouter
==================
Description
-----------
The Data Plane Development Kit (DPDK) is a set of data plane libraries and network
interface controller drivers for fast packet processing. The DPDK provides a programming
framework for Intel x86 processors and enables faster development of high-speed
data packet networking applications.
By default, contrail virtual router (vrouter) is running as a kernel module on Linux.
.. image:: images/vrouter_in_kernelspace.png
The vrouter module is able to fill a 10G link with TCP traffic from a virtual
machine (VM) on one server to a VM on another server without making any
assumptions about hardware capabilities in the server NICs. Also, in order to
support interoperability and use a standards-based approach, vrouter does not
use new protocols/encapsulations. However, in network function virtualization
(NFV) scenarios, other performance metrics such as packets-per-second (pps) and
latency are as important as TCP bandwidth. With a kernel module, the pps number
is limited by various factors such as the number of VM exits, memory copies and
the overhead of processing interrupts.
In order to optimize performance for NFV use cases, vrouter can be integrated with the Intel DPDK (Data Plane Development Kit). To integrate with DPDK, the vrouter can now run in a user process instead of a kernel module.
.. image:: images/vrouter_in_userspace.png
This process links with the DPDK libraries and communicates with the vrouter host agent, which runs as a separate process. The application inside the guest VM can be written to use the DPDK API or it can use the traditional socket API. However, for NFV applications such as vMX, which require high performance, it would be preferable to use the DPDK API inside the VM.
Prerequisites
-------------
- Installed `Fuel 8.0 <https://docs.mirantis.com/openstack/fuel/fuel-8.0/>`_
- Installed contrail plugin :doc:`/install_guide`
- Environment must be created with "KVM" for compute virtualization and "Neutron with tunneling segmentation" for networking
- Network card must support DPDK. List of compatible adapters can be found on `DPDK website <http://dpdk.org/doc/guides/nics/index.html>`_
Restrictions
------------
- Only compute hosts can be configured with DPDK role. "DPDK role" is just a mark that enables DPDK feature on certain compute. If you try to use it with other roles it wouldn't have any effect.
- Contrail DPDK feature doesn't work with qemu virtualization as far as with nested KVM. This means that for current release DPDK-based vRouter works only on baremetal computes.
- Contrail DPDK vrouter permanently uses 1GB of hugepages, therefore, it is necessary to allocate enough amount of hugepages to run DPDK vrouter and VM's(with DPDK) respectively.
.. raw:: latex
\clearpage
Configuration
-------------
To enable DPDK you should proceed with following steps:
#. Enable contrail plugin in Fuel UI settings
.. image:: images/enable_contrail_plugin.png
#. Enable DPDK on Fuel UI
.. image:: images/enable_contrail_dpdk.png
#. Choose the size and amount of huge pages to allocate. They will be used for
both vRouter process and VMs backing. 2MB sized huge pages can be added on-fly,
1GB sized require a reboot. Also, it is necessary to leave some amount of memory
for the operating system itself.
#. Add DPDK role on computes where you want to have DPDK-based vRouter.
**Computes that are not marked with DPDK role will use kernel-based vRouter.**
.. image:: images/add_dpdk_role.png
#. Deploy environment
.. warning::
Computes with DPDK-based vRouter require flavor with HugePages enabled.
**Instances with usual flavours can't be launched on DPDK-enabled hosts.**
If DPDK is enabled in plugin settings Fuel will create one flavor that will have hugepages support, named "m1.small.hpgs". One can create custom flavor with following steps on controller node::
# . openrc
# nova flavor-create m2.small.hpgs auto 2000 20 2
# nova flavor-key m2.small.hpgs set hw:mem_page_size=large
# nova flavor-key m2.small.hpgs set aggregate_instance_extra_specs:hpgs=true
.. raw:: latex
\clearpage
Verification
------------
After deploy finishes, you can verify your installation. First, proceed with basic checks.
#. Check that Contrail services and DPDK vrouter are running on compute node::
root@node-37:~# contrail-status
== Contrail vRouter ==
supervisor-vrouter: active
contrail-vrouter-agent active
contrail-vrouter-dpdk active
contrail-vrouter-nodemgr active
#. Check if DPDK vrouter catch interface::
root@node-37:~# /opt/contrail/bin/dpdk_nic_bind.py -s
Network devices using DPDK-compatible driver
============================================
0000:06:00.0 '82599ES 10-Gigabit SFI/SFP+ Network Connection' drv=igb_uio unused=
Network devices using kernel driver
===================================
0000:02:00.0 'I350 Gigabit Network Connection' if=eth0 drv=igb unused=igb_uio
0000:02:00.1 'I350 Gigabit Network Connection' if=eth1 drv=igb unused=igb_uio
0000:06:00.1 '82599ES 10-Gigabit SFI/SFP+ Network Connection' if=eth3 drv=ixgbe unused=igb_uio
Other network devices
=====================
<none>
#. Check if vrouter use hugepages::
root@node-37:~# grep Huge /proc/meminfo
AnonHugePages: 0 kB
HugePages_Total: 30000
HugePages_Free: 29488
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
#. Check if vrouter utilize CPU:
.. image:: images/vrouter_utilize_cpu.png
#. Check if vrouter create interface after creation VM::
root@node-41:~# vif --list
Vrouter Interface Table
Flags: P=Policy, X=Cross Connect, S=Service Chain, Mr=Receive Mirror
Mt=Transmit Mirror, Tc=Transmit Checksum Offload, L3=Layer 3, L2=Layer 2
D=DHCP, Vp=Vhost Physical, Pr=Promiscuous, Vnt=Native Vlan Tagged
Mnp=No MAC Proxy, Dpdk=DPDK PMD Interface, Rfl=Receive Filtering Offload
Mon=Interface is Monitored, Uuf=Unknown Unicast Flood, Vof=VLAN insert/strip offload
vif0/0 PCI: 0:0:0.0 (Speed 10000, Duplex 1)
Type:Physical HWaddr:00:1b:21:87:21:98 IPaddr:0
Vrf:0 Flags:L3L2Vp MTU:1514 Ref:14
RX device packets:3671 bytes:513937 errors:10
RX port packets:3671 errors:0
RX queue packets:6 errors:0
RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0
RX packets:3671 bytes:499253 errors:0
TX packets:4049 bytes:2135246 errors:0
TX port packets:4049 errors:0
TX device packets:4049 bytes:2135246 errors:0
vif0/1 Virtual: vhost0
Type:Host HWaddr:00:1b:21:87:21:98 IPaddr:0
Vrf:0 Flags:L3L2 MTU:1514 Ref:8
RX port packets:4111 errors:0
RX queue packets:4093 errors:0
RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0
RX packets:4111 bytes:2143597 errors:0
TX packets:3786 bytes:509223 errors:0
TX queue packets:790 errors:0
TX port packets:3771 errors:0
vif0/2 Socket: unix
Type:Agent HWaddr:00:00:5e:00:01:00 IPaddr:0
Vrf:65535 Flags:L3 MTU:1514 Ref:2
RX port packets:45 errors:0
RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0
RX packets:45 bytes:4322 errors:3
TX packets:951 bytes:95940 errors:0
TX queue packets:951 errors:0
TX port packets:951 errors:0 syscalls:951
vif0/3 Ethernet: veth1404577d-b
Type:Virtual HWaddr:00:00:5e:00:01:00 IPaddr:0
Vrf:2 Flags:PL3L2D MTU:9160 Ref:11
RX port packets:31 errors:0
RX queue packets:24 errors:0
RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0
RX packets:31 bytes:18164 errors:0
TX packets:19 bytes:1091 errors:4
TX queue packets:14 errors:0
TX port packets:15 errors:0
DPDK related options
--------------------
In this chapter described DPDK related options that you can change from Fuel UI:
- *"Enable DPDK feature for this environment."* - this option enable DPDK globally, remember that you anyway must use "DPDK" role to mark compute where you want to have DPDK
- *"Hugepage size"* - Choose the size of huge pages that will be used for a dpdk feature. Check if 1GB pages are supported on the target compute node. # grep pdpe1gb /proc/cpuinfo | uniq
- *"Hugepages amount (%)"* - set amount of memory allocated on each compute node for huge pages. It will use % of all memory available on compute. Remember that DPDK vrouter permanently use 1GB of huge pages and other applications running on compute node may not support huge pages, so this parameter should be used carefully.
- *"CPU pinning"* - this hexadecimal value describes how many and which exact processors will be used by dpdk-vrouter. CPU pinning is implemented using `taskset util <http://www.linuxcommand.org/man_pages/taskset1.html>`_
- *"Patch Nova"* - current release (7.0) of MOS nova doesn't have support for DPDK-based vRouter. In future, necessary patches will be included in MOS maintenance updates.
- *"Install Qemu and Libvirt from Contrail"* - DPDK-based vRouter needs huge pages memory-backing for guests. MOS 7.0 ships with qemu and libvirt that don't support it. This is needed only for DPDK feature and will be implemented only on nodes where we have "DPDK" role.
How to change huge pages settings after deployment
--------------------------------------------------
After deploy is finished, plugin settigs are locked in Fuel UI. Therefore, huge pages size/ammount cannot be changed
by plug-in, and should be changed manually on each compute node. Here are the nessesary steps:
**2MB-sized huge pages** are set with sysctl and can be added on fly with this command::
# sysctl -w vm.nr_hugepages=<number of pages>
Here number of huge pages can be calculated from ammount that you want to be set, for example 20GB = 20 * 1024 / 2 = 10240 pieces.
Then edit the /etc/sysctl.conf file to make these changes persistent over reboots.
**1GB-sized huge pages** are set through the kernel parameter and require a reboot to take effect.
Kernel versions supplied with Ubuntu 14.04 don't support on fly allocation for 1GB-sized huge pages.
First, edit the /etc/default/grub file and set needed amount of huge pages.
Here is the example for GRUB_CMDLINE_LINUX in /etc/default/grub::
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX hugepagesz=1024M hugepages=20
Then update the bootloader and reboot for these parameters to take effect::
# update-grub
# reboot

View File

@ -0,0 +1,65 @@
SR-IOV
======
Prerequisites
-------------
This guide assumes that you have `installed Fuel <https://docs.mirantis.com/openstack/fuel/fuel-8.0/>`_
and performed steps 5.3.1 - 5.3.9 from :doc:`/install_guide`.
To enable SR-IOV you need sriov capable network PCI card. Also, it is important to remember
that only compute hosts can be configured with sriov role.
Features
--------
#. You can have multple VLANs inside one physical network
#. When using Passthrough (as in sriov scenario), there are no dhcp and metadata provided over openstack. You have to manage that manually or provide additional network port with usual openstack network.
What is SR-IOV
--------------
Quoting `Mirantis blog post: <https://www.mirantis.com/blog/carrier-grade-mirantis-openstack-the-mirantis-nfv-initiative-part-1-single-root-io-virtualization-sr-iov/>`_
SR-IOV is a PCI Special Interest Group (PCI-SIG) specification for virtualizing network interfaces, representing each physical resource as a configurable entity (called a PF for Physical Function), and creating multiple virtual interfaces (VFs or Virtual Functions) with limited configurability on top of it, recruiting support for doing so from the system BIOS, and conventionally, also from the host OS or hypervisor. Among other benefits, SR-IOV makes it possible to run a very large number of network-traffic-handling VMs per compute without increasing the number of physical NICs/ports and provides means for pushing processing for this down into the hardware layer, off-loading the hypervisor and significantly improving both throughput and deterministic network performance.
How to check if network interface is sriov capable, and how many VFs are available/enabled
------------------------------------------------------------------------------------------
Issue following command on boostraped host::
lspci -s <bus ID> -vvv
How to enable SR-IOV in fuel
----------------------------
#. Enable SR-IOV in plugin settings and configure unique physnet name.
.. image:: images/enable_sriov_settings.png
#. Assign SR-IOV role to compute hosts. SR-IOV will be enabled on all SR-IOV
capable interfaces, not assigned to Fuel bridges(networks in Fuel UI).
.. image:: images/enable_sriov_role_node.png
#. Perform deploy as in 5.3.10 :doc:`/install_guide`
How to create VM with sriov device
----------------------------------
#. Create VN with configured physical network and vlan id::
neutron net-create --provider:physical_network=<physical network from contrail settings tab> \
--provider: segmentation_id=<Vlan_id> <Network_Name>
#. Create a subnet::
neutron subnet-create <Network_name> <Subnet>
#. Create a Port::
neutron port-create --fixed-ip subnet_id=<subnet uuid>,ip_address=<IP address from above subnet> \
--name <name of port> <vn uuid> --binding:vnic_type direct
#. Boot VM with the port::
nova boot --flavor m1.large --image <image name> --nic port-id=<uuid of above port> <vm name>

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -1,6 +1,6 @@
.. _fuel-plugin-contrail:
Guide to the Contrail plugin version 3.0 for Fuel 7.0
Guide to the Contrail plugin version 4.0 for Fuel 8.0
=====================================================
.. toctree::
@ -12,7 +12,10 @@ Guide to the Contrail plugin version 3.0 for Fuel 7.0
limitations
sys_reqs
install_guide
dpdk
enable_sriov
using_network_templates
verification
contrail_ui_intro
tuning
appendix

View File

@ -4,77 +4,72 @@ Installation Guide
Prerequisites
-------------
This guide assumes that you have `installed Fuel <https://docs.mirantis.com/openstack/fuel/fuel-7.0/user-guide.html>`_
This guide assumes that you have `installed Fuel <https://docs.mirantis.com/openstack/fuel/fuel-8.0/pdf/Fuel-8.0-UserGuide.pdf>`_
and all the nodes of your future environment are discovered and functional.
Note, if you want to use Juniper Contrail instead of OpenContrail, you need to get proprietary Contrail packages
for your operating system.
They can be obtained from Juniper as a part of your support subscription.
OpenContrail packages are provided within the plugin package.
Installing Contrail Plugin
--------------------------
#. Download Contrail plugin from the `Fuel Plugins Catalog <https://software.mirantis.com/download-mirantis-openstack-fuel-plug-ins/>`_.
#. Copy the rpm downloaded at previous step to the Fuel Master node and install the plugin:
#. Copy the rpm downloaded at previous step to the Fuel Master node and install the plugin
::
scp contrail-3.0-3.0.0-1.noarch.rpm <Fuel Master node ip>:/tmp/
scp contrail-4.0-4.0.0.noarch.rpm <Fuel Master node ip>:/tmp/
#. Log into the Fuel Master node and install the plugin
::
ssh <the Fuel Master node ip>
fuel plugins --install /tmp/contrail-3.0.0.noarch.rpm
fuel plugins --install contrail-4.0-4.0.0.noarch.rpm
You should get the following output
::
Plugin <plugin-name-version>.rpm was successfully installed
..
#. In case if you are using Juniper Contrail, copy Juniper contrail install package (obtained from Juniper by subscription, see Prerequisites above) to the Fuel Master node and run the installation script to unpack the vendor package and populate plugin repository
#. Copy Juniper contrail install package (obtained from Juniper by subscription, more information can be found on
`official Juniper Contrail web-site <http://www.juniper.net/us/en/products-services/sdn/contrail/contrail-networking/>`_ )
to the Fuel Master node and run the installation script to unpack the vendor package and populate plugin repository
::
scp contrail-install-packages_3.0-2652-kilo_all.deb \
<Fuel Master node ip>:/var/www/nailgun/plugins/contrail-3.0/
ssh <Fuel Master node ip> /var/www/nailgun/plugins/contrail-3.0/install.sh
scp contrail-install-packages_3.0.2.0-51~14.04-liberty_all.deb \
<Fuel Master node ip>:/var/www/nailgun/plugins/contrail-4.0/
ssh <Fuel Master node ip> /var/www/nailgun/plugins/contrail-4.0/install.sh
.. raw:: latex
\pagebreak
\clearpage
Configuring Contrail Plugin
---------------------------
----------------------------
#. First you need to `create environment <https://docs.mirantis.com/openstack/fuel/fuel-7.0/user-guide.html#create-a-new-openstack-environment>`_ in Fuel UI.
#. First, you need to `create environment (page 3) <https://docs.mirantis.com/openstack/fuel/fuel-8.0/pdf/Fuel-8.0-UserGuide.pdf>`_ in Fuel UI.
.. image:: images/name_and_release.png
:width: 80%
#. Please select KVM or QEMU hypervisor type for your environment
.. image:: images/compute.png
:width: 80%
#. Please select Neutron with tunneling segmentation network model.
GRE segmentation is also supported, but you need to set it from Fuel CLI
.. image:: images/networking_setup.png
:width: 80%
#. If you plan to use Heat orchestration with autoscaling, you need to install Ceilometer too.
.. image:: images/additional_services.png
:width: 80%
#. Activate the plugin and fill configuration fields with correct values:
* Select the Contrail packages distribution: OpenContrail from plugin package or proprietary Contrail packages
from Juniper.
* AS number for BGP Gateway nodes communication: (defaults to 64512).
* Gateway nodes IP addresses (provided as comma-separated list) - peer addresses for BGP interaction with border routers.
* Gateway nodes IP addresses (provided as a comma-separated list) - peer addresses for BGP interaction with border routers.
#. Add nodes and assign them the following roles:
@ -87,42 +82,38 @@ Configuring Contrail Plugin
* If you plan to use Heat with autoscaling, in addition to Ceilometer you need to add node with MongoDB role
This 3 roles are not necessary need to be on same node.
These 3 roles are not necessary need to be on the same node.
You can place them on different nodes if needed.
.. image:: images/contrail-roles.png
:width: 80%
Sample node configuration is provided on picture below.
Sample node configuration is provided on a picture below.
.. image:: images/node-roles.png
:width: 80%
#. `Configure the disks <https://docs.mirantis.com/openstack/fuel/fuel-master/user-guide.html#id46>`_ on nodes with
Contrail-DB role selected.
The recommended size of partition for Contrail database is 256 GB or more.
#. Configure the network settings. See details at `Mirantis OpenStack User Guide <https://docs.mirantis.com/
openstack/fuel/fuel-7.0/user-guide.html#network-settings-ug>`_.
#. The recommended size of partition for Contrail database is 256 GB or more.
#. Configure the network settings. See details at `Mirantis OpenStack User Guide (page 16) <https://docs.mirantis.com/openstack/fuel/fuel-8.0/pdf/Fuel-8.0-UserGuide.pdf>`_.
* Open Nodes tab:
Select all the nodes, push **Configure interfaces** button
.. image:: images/conf-interfaces.png
:width: 80%
* Set *Private* network to the separate network interface as untagged network.
* Set *Private* network to the separate network interface as the untagged network.
**DO NOT USE THIS PHYSICAL INTERFACE FOR ANY OTHER NETWORK.**
This interface will be used by contrail vRouter as untagged port.
It is recommended to set set the bigger MTU for Private interfaces (e.g. 9000) if the switching hardware supports
This interface will be used by contrail vRouter as the untagged port.
It is recommended to set the bigger MTU for Private interfaces (e.g. 9000) if the switching hardware supports
Jumbo Frames.
This will enhance contrail network performance by avoiding packet fragmentation within Private network.
For other networking options please refer to `Mirantis OpenStack User Guide <https://docs.mirantis.com/openstack/fuel
/fuel-7.0/user-guide.html#network-settings-ug>`_.
In case of using multiple L2 segments you may need to configure networking according to the `Operations Guide
<https://docs.mirantis.com/openstack/fuel/fuel-7.0/operations.html#configuring-multiple-cluster-networks>`_ and supply
For other networking options please refer to `Mirantis OpenStack User Guide <https://docs.mirantis.com/openstack/fuel/fuel-8.0/pdf/Fuel-8.0-UserGuide.pdf>`_.
In case of using multiple L2 segments, you may need to configure networking according to the `Operations Guide
<https://docs.mirantis.com/openstack/fuel/fuel-8.0/mos-planning-guide.html#network-multiple-cluster-networks>`_ and supply
static routes to BGP peers and other cluster networks in network_1.yaml file.
#. Example network configuration
@ -130,24 +121,28 @@ Configuring Contrail Plugin
Hardware servers with two network interfaces are used as openstack nodes.
The interfaces configuration is following:
* Public, Management and Storage networks on the same interface with Admin net, using tagged VLANs
* Management and Storage networks on the same interface with Admin net, using tagged VLANs
* Second interface is dedicated for Contrail operations as untagged (Private network)
* The second interface is dedicated for Public network as untagged
* The forth interface is dedicated for Contrail operations as untagged (Private network)
.. image:: images/conf-interfaces2.png
.. warning::
Be sure to launch `network verification check <https://docs.mirantis.com/openstack/fuel/fuel-7.0/user-guide.html#verify-networks-ug>`_
before starting deployment. **Incorrect network configuration will result in non-functioning environment.**
#. Press **Deploy changes** to `deploy the environment <https://docs.mirantis.com/openstack/fuel/fuel-7.0/user-guide.html#
deploy-changes>`_.
#. Press **Deploy changes** to `deploy the environment (page 25) <https://docs.mirantis.com/openstack/fuel/fuel-8.0/pdf/Fuel-8.0-UserGuide.pdf>`_.
After installation is finished, `Contrail Web UI <http://www.juniper.net/techpubs/en_US/contrail2.0/topics/task/configuration
/monitor-dashboard-vnc.html>`_ can be accessed by the same IP address as Horizon, but using HTTPS protocol and port 8143.
For example, if you configured public network as described on screenshot below, then Contrail Web UI can be accessed by
**https://172.16.0.2:8143**
**https://<Private-VIP>:8143**
.. image:: images/public-net.png
.. note::
.. warning::
WARNING! first usable addresses from Private network will be used as VIP for Contrail controllers.
**First usable addresses from the Private network will be used as VIP for Contrail controllers.**
For example, if your Private network CIDR is 192.168.200.0/24, then Contrail VIP will be **192.168.200.1**.

View File

@ -51,13 +51,3 @@ Contrail features:
* Fine grained virtual network access policy control
Licensing information
---------------------
+----------------------+-----------------+
| Juniper Contrail | Commercial |
+----------------------+-----------------+
| OpenContrail | Apache 2.0 |
+----------------------+-----------------+
| Fuel Contrail Plugin | Apache 2.0 |
+----------------------+-----------------+

View File

@ -1,16 +1,23 @@
New features in plugin version 3.0.0
New features in plugin version 4.0.0
====================================
* Deployment is now role-based.
Following roles are provided: Contrail-Control, Contrail-Config, Contrail-DB.
This provides possibility to deploy these components on different servers.
This provides a possibility to deploy these components on different servers.
* VIPs for API and Web UI are now provided by Openstack Controllers and managed by Mirantis OpenStack HA.
This provides possibility to place Contrail components in different L2/L3 segments.
This provides a possibility to place Contrail components in different L2/L3 segments.
* Deployment tasks were rewritten to be more granular.
* Plugin supports custom network templates feature of Fuel 7.0.
* DPDK-based vRouter. :doc:`/dpdk`
* SR-IOV :doc:`/enable_sriov`
* Plugin supports custom network templates feature of Fuel 8.0.
Now it is possible to deploy a Contrail-enabled environment with reduced set of logical networks, e.g. Public, Management and Private nets can share the same interface.
This simplifies routing configuration for large environments distributed across different L2 segments. More detailed information here :doc:`/using_network_templates`
* HTTPS on public endpoints. If HTTPS is enabled in Fuel UI, the same certificate will be used for Contrail API and Contrail WebUI.
* Contrail specific Ceilometer meters now supported.

View File

@ -4,9 +4,9 @@ Requirements
The plugin has the following requirements for software and hardware:
+--------------------------------+-----------------------------------------------------------------+
| Fuel version | 7.0 |
| Fuel version | 8.0 |
+--------------------------------+-----------------------------------------------------------------+
| Juniper Contrail version | 3.0 |
| Juniper Contrail version | 3.0.1 |
+--------------------------------+-----------------------------------------------------------------+
| OpenContrail | not available yet |
+--------------------------------+-----------------------------------------------------------------+

21
doc/source/tuning.rst Normal file
View File

@ -0,0 +1,21 @@
Contrail Analytics Performance Tuning
=====================================
For large installations, the following changes are required to achieve better performance of contrail database.
By default, the analytics_ttl values are set to -1. We recommend changing the default number to ensure the best performance in highly scaled out environments. An example configuration is as follows:
#. /etc/cassandra/cassandra-env.sh
::
-JVM_OPTS="$JVM_OPTS -XX:MaxTenuringThreshold=1"
+JVM_OPTS="$JVM_OPTS -XX:MaxTenuringThreshold=30"
#. /etc/contrail/contrail-collector.conf
::
analytics_config_audit_ttl=2160
analytics_statistics_ttl=24
analytics_flow_ttl=2
Note: Please restart the supervisor services ( supervisor-database, supervisor-analytics) after making these changes.

View File

@ -1,22 +1,22 @@
Using network templates
=======================
Starting from Fuel 7.0 it is possible to reduce amount of logical networks.
This is implemented with function called network templates.
Starting from Fuel 7.0 it is possible to reduce the number of logical networks.
This is implemented with the function called network templates.
For detailed information on this feature, refer to
`Opeations guide <https://docs.mirantis.com/openstack/fuel/fuel-7.0/operations.html#using-networking-templates>`_
`Operations guide <https://docs.mirantis.com/openstack/fuel/fuel-7.0/operations.html#using-networking-templates>`_
This document provides sample configuration with network template.
It is designed to get customers up and running quickly.
The provided template utilizes 3 networks: Admin (PXE), Public and Private.
#. First do steps 5.1-5.7 from :doc:`/install_guide`
#. First do steps 5.3.1 - 5.3.7 from :doc:`/install_guide`
#. Configure interfaces as shown on figure:
.. image:: images/conf-interfaces2.png
#. Next we need to set gateway for private network.
#. Next, we need to set gateway for the private network.
Here is how to do it with Fuel CLI:
* Login with ssh to Fuel master node.
@ -29,12 +29,15 @@ The provided template utilizes 3 networks: Admin (PXE), Public and Private.
::
fuel network-group --delete --network 5
fuel network-group --create --name private --cidr 10.109.3.0/24 --gateway 10.109.3.1 --nodegroup 1
fuel network-group --create --name private \
--cidr 10.109.3.0/24 --gateway 10.109.3.1 --nodegroup 1
#. Set the ``render_addr_mask`` parameter to `internal` for this network by typing:
::
fuel network-group --set --network 6 --meta '{"name": "private", "notation": "cidr", "render_type": null, "map_priority": 2, "configurable": true, "use_gateway": true, "render_addr_mask": "internal", "vlan_start": null, "cidr": "10.109.3.0/24"}'
fuel network-group --set --network 6 --meta '{"name": "private", "notation": "cidr",\
"render_type": null, "map_priority": 2, "configurable": true, "use_gateway": true,\
"render_addr_mask": "internal", "vlan_start": null, "cidr": "10.109.3.0/24"}'
#. Save sample :download:`network template<examples/network_template_1.yaml>`

114
doc/source/verification.rst Normal file
View File

@ -0,0 +1,114 @@
Verification
============
After deploy finishes, you can verify your installation. First, proceed with basic checks described below.
Basic checks
------------
#. Check that Contrail services are running.
Login to Contrail controller node and run contrail-status command. All services should be in "active" state:
::
# contrail-status
== Contrail Control ==
supervisor-control: active
contrail-control active
contrail-control-nodemgr active
contrail-dns active
contrail-named active
== Contrail Analytics ==
supervisor-analytics: active
contrail-analytics-api active
contrail-analytics-nodemgr active
contrail-collector active
contrail-query-engine active
contrail-snmp-collector active
contrail-topology active
== Contrail Config ==
supervisor-config: active
contrail-api:0 active
contrail-config-nodemgr active
contrail-device-manager active
contrail-discovery:0 active
contrail-schema active
contrail-svc-monitor active
ifmap active
== Contrail Web UI ==
supervisor-webui: active
contrail-webui active
contrail-webui-middleware active
== Contrail Database ==
supervisor-database: active
contrail-database active
contrail-database-nodemgr active
kafka active
#. Check the list of peers and peering status
Login to Contrail WebUI, go to Monitor -> Control nodes, choose any and select a “Peers” tab. You should see your compute nodes(vRouters) and external router in a list of peers. Status should be “Established”
.. image:: images/check_list_of_peers.png
:width: 80%
#. Check that external router was provisioned correctly:
Login to Contrail WebUI, go to Configure -> Infrastructure -> BGP routers. Verify the IP address of router
.. image:: images/check_external_router.png
:width: 80%
After that you can use health checks in Fuel UI, also called OSTF tests.
OSTF tests
----------
- **Prerequisites for OSTF:**
#. OSTF tests require two pre-defined networks created - net04 and net04_ext. The networks are created by Fuel during deployment. This section includes instructions how to create them if they were accidentally deleted. Floating IP addresses from net04_ext should be accessible from Fuel master node.
#. 3 tests from “Functional tests” set require floating IP addresses. They should be configured on external router, routable from Fuel master node and populated in Contrail/Openstack environment.
#. HA tests require at least 3 Openstack controllers.
#. “Platform services functional tests.” require Ceilometer and Mongo.
- **OSTF networks and floating IPs configuration:**
To create networks go to Contrail WebUI -> Configure -> Networking -> Networks
#. Create network “net04”
.. image:: images/create_network_net04.png
:width: 80%
#. Create network “net04_ext”.
.. image:: images/create_network_net04_ext.png
:width: 80%
It should be marked as “shared” and “external”
.. image:: images/create_network_net04_ext2.png
:width: 80%
And have same route target as configured in external router
.. image:: images/create_network_net04_ext3.png
:width: 80%
#. Allocate floating IP addresses from net04_ext
Go to Contrail WebUI --> Configure -> Networking -> Manage Floating IPs
.. image:: images/allocate_floating_ip_addresses.png
:width: 80%
After checking networks and floating IP addresses, start OSTF tests. For more details, refer to `Fuel user-guide <https://docs.mirantis.com/openstack/fuel/fuel-7.0/user-guide.html#post-deployment-check>`_.
Troubleshooting
---------------
Start with checking output of contrail-status command. Then check the logs for corresponding serivice.
Contrail logs are located in /var/log/contrail/ directory, and log names match with contrail service name.
Cassandra logs are located in /var/log/cassandra/, zookeeper's is in /var/log/zookeeper/.