midonet gateway #11

Supports: trusty

Add to new model

Description

This charm will deploy MidoNet Gateway Nodes, which will connect the
OpenStack deployment to the external network. Currently, it supports only
static routing setup (refer to respective section on README.md) .


MidoNet Gateway

Overview

MidoNet is a distributed, de-centralized, software-defined virtual network
platform for Infrastructure as a Service (IaaS). MidoNet fully virtualizes the
network functionality for IaaS products, such as OpenStack, providing
functionally advanced, robust, scalable, and secure networks. MidoNet is an
overlay network that runs software on standard x86 servers, and sits on top of
any scalable network underlay (for example, physical servers and switches),
pushing the intelligent network functions to the edge of the network, in
software. MidoNet sends virtual network traffic over tunnels created between
the edges. The tunnels encapsulate the packets coming from virtual machines
(VMs) and exterior ports, and decouple the virtual network traffic from the physical network. With this model, changes in the virtual network, for
example, creating new virtual machines, don't affect the state of the underlay
network. In addition, this clear separation between the virtual and physical
networks allows the administrator to more easily maintain the IaaS platform.

For more information, please refer to MidoNet documentation website.

Open source users: MidoNet Documentation

Enterprise users: Midokura Enterprise MidoNet (MEM) Documentation

This charm in particular, will configure MidoNet so that midonet-gateway nodes
will act as a gateway between the underlay network (physical network) and the
overlay network (virtual network).

Editions

Currently, following combinations of versions are supported.

| distribution | openstack-release | midonet-flavor | midonet-release | | ------------ | ----------------- | -------------- | --------------- | | trusty | kilo | opensource | 2015.06 | | trusty | kilo | enterprise | 1.9 |

Configuration

This charm supports two types of uplink setup, static routing uplink setup and
BGP routing uplink setup. Please refer to Operations Guide in respective
MidoNet documentation website for details about those setups.

Known Limitations

One midonet-gateway unit in static routing uplink setup

In static routing uplink setup, maximum number of midonet-gateway unit is one.
In case there are more than two units of midonet-gateway deployed in one
environment, redundant unit(s) will stay in a blocked state.

Some configurations are not modifiable

Some service configurations are not meant to be changed once the installation
starts. If these configurations are modified, it may not yield the desired
result, it may setup an erroneous or non-used configuration in the system, or
it may break the deployment.

Modifying following service configurations are not implemented nor supported:

  • openstack-release
  • midonet-flavor
  • midonet-release
  • midonet-enterprise-username
  • midonet-enterprise-password
  • external-network-name
  • port-group-name

Modifying following service configuration are not supported:

  • uplink-type

Changing any configurations will temporarily remove the uplink

Changing any service configurations will result in removing all uplinks
currently configured before re-creating uplinks with new configurations.

Removing midonet-gateway service will leave the configuration behind

Removing the midonet-gateway service will leave the configuration data in the
NSDB (ZooKeeper and Cassandra) behind. To actually remove those configuration
data:

  1. Manually delete those configuration data using midonet-api service
  2. (Or for an ultimate measure) destroy the entire environment

Special consideration with some releases

python-midonetclient package provided by some MidoNet releases has a bug that may stop the configuration process. To work around this problem, this
charm will directly patch the python-midonetclient files on the file system.
Therefore, do not attempt to update or reinstall python-midonetclient package
or it will reintroduce the bug. This bug affects all 2015.06 releases and 1.9
release version 1.9.8 and prior.

Deployment

Manual deployment

For midonet-gateway service to set itself up, it requires some information
about the environment. midonet-gateway service will gather those information
from Juju relationships. Therefore, related services have to be deployed and
relationship needs to be set up between them.

First, deploy midonet-gateway service and midonet-agent service. Default
service configurations are aligned to MidoNet documentation, please refer to
config.yaml file for more information on what service configuration value changes what.

juju deploy midonet-gateway
juju deploy midonet-agent

Next, setup necessary relationships midonet-gateway service requires.

juju add-relation midonet-gateway keystone
juju add-relation midonet-gateway neutron-api
juju add-relation midonet-gateway midonet-api
juju add-relation midonet-gateway midonet-agent

Automated deployment

Alternatively, bundles are available to quickly setup a working environment.

Following conditions have to be met to successfully deploy bundles:

  • Configure Juju environment to use MaaS as a provider
  • Prepare following nodes in MaaS
  • 1 node with:
    • More than 8 cores visible
    • More than 12GiB RAM visible
    • More than 32GiB storage visible
    • Without tag midonet-gateway
  • 1 node with:
    • More than 4 cores visible
    • More than 8GiB RAM visible
    • More than 16GiB storage visible
    • Without tag midonet-gateway
  • 1 node with:
    • More than 3 cores visible
    • More than 6GiB RAM visible
    • More than 8GiB storage visible
    • Without tag midonet-gateway
  • 1 node (static routing uplink) or 3 nodes (BGP routing uplink) with:
    • More than 3 cores visible
    • More than 6GiB RAM visible
    • More than 8GiB storage visible
    • With tag midonet-gateway

To deploy bundle with static routing uplink setup:

juju-deployer --config bundles/trusty_kilo_opensource_201506_static_masq.yaml --timeout 3600 --bootstrap

To deploy bundle with BGP routing uplink setup (modification to the bundle file
will be required to match the environment):

juju-deployer --config bundles/trusty_kilo_opensource_201506_bgp.yaml --timeout 3600 --bootstrap

Configuration

bgp-advertised-networks
(string) Networks advertised to the remote BGP autonomous system. This usually should be the same as floating IP networks defined in neutron. It should be a YAML serialized list of strings, each of which should be a network addresses in either "IP/Prefix_Length" notation ("192.0.2.0/24") or "IP/Subnet_Mask" nonation("192.0.2.0/255.255.255.0"). Only applicable when uplink-type=='bgp'. A more elaborate example will be: --- - '192.0.2.128/25' - '198.51.100.128/25' - '203.0.113.128/25'
- '192.0.2.0/24'
bgp-local-as-number
(int) AS number of the local BGP autonomous system. If you have an RIR registered AS number, use it. If you don't have an RIR registered AS number, use any of the RFC 1930's reserved AS number. It should be an integer. Only applicable when uplink-type=='bgp'.
64512
bgp-peer-as-number
(int) AS number of the remote BGP autonomous system. Get information from your upstream router administrator. It should be an integer. Only applicable when uplink-type=='bgp'.
64513
bgp-topology
(string) Network topology between local BGP autonomous system and remote BGP autonomous system. It should be a YAML serialized list of dictionaries. Each dictionary should contain three keys, local_ip_address, local_mac_address and peer_ip_addresses. local_ip_address should be the IP address that will be assigned to virtual port of MidoNet Provider Router that will be connected to the remote autonomous system. local_mac_address should be the MAC address of physical ethernet device that will be bound to the virtual port of MidoNet Provider Router that will be connected to the remote autonomous system. peer_ip_addresses should be a list of strings, each of which should be an IP address of the BGP peers. Only applicable when uplink-type=='bgp'. A more elaborate example will be: --- - local_ip_address: '192.0.2.6/29' local_mac_address: '00:00:5E:00:53:01' peer_ip_addresses: - '192.0.2.1' - '192.0.2.2' - '192.0.2.3' - local_ip_address: '198.51.100.6/29' local_mac_address: '00:00:5E:00:53:02' peer_ip_addresses: - '198.51.100.1' - '198.51.100.2' - '198.51.100.3' - local_ip_address: '203.0.113.6/29' local_mac_address: '00:00:5E:00:53:03' peer_ip_addresses: - '203.0.113.1' - '203.0.113.2' - '203.0.113.3'
- local_ip_address: '198.51.100.2/30' local_mac_address: '01:02:03:04:05:06' peer_ip_addresses: - '192.51.100.1' - local_ip_address: '203.0.113.2/30' local_mac_address: '06:05:04:03:02:01' peer_ip_addresses: - '203.0.113.1'
external-network-name
(string) Name of the external network created in neutron. Please refer to 'External network' section of OpenStack Installation Guide and 'Initial Network Configuration' section of MidoNet Quick Start Guide for details.
ext-net
midonet-enterprise-password
(string) Password used to access MidoNet apt repository. Only applicable when midonet_flavor=='enterprise'.
midonet-enterprise-username
(string) Username used to access MidoNet apt repository. Only applicable when midonet_flavor=='enterprise'.
midonet-flavor
(string) Flavor of MidoNet. Valid values are: 'opensource' and 'enterprise'. Not every combination of [midonet_flavor, midonet_release, openstack_release] are supported. Please refer to README.md for details.
opensource
midonet-release
(string) Version of MidoNet. Valid values are: '1.9' and '2015.06'. Not every combination of [midonet_flavor, midonet_release, openstack_release] are supported. Please refer to README.md for details.
2015.06
openstack-release
(string) Release name of OpenStack. Valid value is: 'kilo'. Not every combination of [midonet_flavor, midonet_release, openstack_release] are supported. Please refer to README.md for details.
kilo
port-group-name
(string) Name of the stateful port group which the uplink port should belong. Only applicable when uplink-type=='bgp'.
uplink-spg
static-forwarding-network
(string) Network forwarded by linux routing table. This usually should be the same as the floating IP network defined in neutron. It should be in either "IP/Prefix_Length" notation ("192.0.2.0/24") or "IP/Subnet_Mask" nonation("192.0.2.0/255.255.255.0"). Only applicable when uplink-type=='static'.
200.200.200.0/24
static-linux-bridge-address
(string) IP address assigned to the virtual ethernet interface connected to the fake uplink linux bridge. It should be in either "IP/Prefix_Length" notation ("192.0.2.1/24") or "IP/Subnet_Mask" nonation ("192.0.2.1/255.255.255.0"). Only applicable when uplink-type=='static'.
172.19.0.1/30
static-outgoing-interface-name
(string) Name of an interface via which a packet from MidoNet Provider Router is going to be sent in the underlay. Usually this interface is the interface that handles the default route traffic in the underlay. Only applicable when uplink-type=='static' and static-outgoing-masquerade=='True'.
eth0
static-outgoing-masquerade
(boolean) Whether to enable masquerading or not. Enable when you don't have an upstream router routing floating IP network to the gateway node. Disable when you do have an upstream router routing floating IP network to the gateway node. Only applicable when uplink-type=='static'.
True
static-provider-router-address
(string) IP address assigned to the virtual ethernet interface connected to the MidoNet Provider Router. It should be in either "IP/Prefix_Length" notation ("192.0.2.1/24") or "IP/Subnet_Mask" nonation ("192.0.2.1/255.255.255.0"). Only applicable when uplink-type=='static'.
172.19.0.2/30
(string) Type of the MidoNet Provider Router uplink setup. Valid values are: 'static' and 'bgp'.
static