Puppet Module for MidoNet project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OpenDev Sysadmins a8cec1dc12 OpenDev Migration Patch 2 months ago
data Remove references to non existant zookeeper and cassandra classes 3 years ago
files Configure static uplink ifaces on startup in RHEL7 2 years ago
lib/puppet Add new cidr2ip function 2 years ago
manifests Enable everything so Insights work when deployed 2 years ago
spec Replace openstack.org git:// URLs with https:// 3 months ago
templates Enable everything so Insights work when deployed 2 years ago
.fixtures.yml Rely `puppet-cassandra` for backwards compatibility 4 years ago
.gitignore Moving puppet-midonet to OpenStack gerrit 3 years ago
.gitreview OpenDev Migration Patch 2 months ago
CONTRIBUTING.md Improve documentation for real 3 years ago
Gemfile Pin version of beaker rspecgit add Gemfile 2 years ago
Puppetfile Pin all puppet dependencies in Puppetfile 2 years ago
README.md Makes README.md beautiful and up to date 2 years ago
Rakefile Replace openstack.org git:// URLs with https:// 3 months ago
metadata.json Make sure LB and FWAAS are installed 2 years ago



Table of Contents

  1. Overview - What is the midonet module?
  2. Module Description - What does the module do?
  3. Setup - The basics of getting started with midonet
  4. Implementation - An under-the-hood peek at what the module is doing
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module
  7. Contributors - Those with commits


This Puppet module is maintained by Midokura and is used to flexibly configure and manage all MidoNet components.

To understand all MidoNet components and how they relate to each other, check out the MidoNet Reference Architecture.

Module Description

The midonet module is a thorough attempt to make Puppet capable of managing the entirety of MidoNet. This includes manifests to provision both open source and enterprise components:

  • MidoNet Cluster (formerly known as the MidoNet API)
  • MidoNet CLI
  • MidoNet Agent (also known as Midolman)
  • MEM
  • MEM Insights

Uplink configuration for gateway nodes is also set up through the use of this module. Currently both static and BGP uplinks are supported.

This module is tested in combination with other modules needed to build and leverage a MidoNet installation.


What the neutron module affects:

  • MidoNet, which replaces the default plugin for Neutron.


To use this module correctly, the following dependencies have to be met:

  • Have the gems faraday and multipart-post installed correctly (if using Puppet 4.x use the gem executable from Puppet’s main path)
  • Have a working Zookeeper & Cassandra setup

Installing midonet

puppet module install midonet-midonet

Beginning with midonet

A very basic installation of MidoNet on a controller node looks like the following:

include ::midonet::repository

class { '::midonet::cluster':
  zookeeper_hosts      => [ { 'ip' => '' } ],
  cassandra_servers    => [ { 'ip' => '' } ],
  cassandra_rep_factor => '1',
  keystone_admin_token => 'token',
  keystone_host        => '',
} ->
class { '::midonet::cli':
  username => 'admin',
  password => 'safe_password',
} ->
class { '::midonet::agent':
  controller_host => '',
  metadata_port   => '8775',
  shared_secret   => 'shared_secret',
  zookeeper_hosts => [ { 'ip' => '' } ],

And on compute nodes:

include ::midonet::repository

class { '::midonet::agent':
  controller_host => '',
  metadata_port   => '8775',
  shared_secret   => 'shared_secret',
  zookeeper_hosts => [ { 'ip' => '' } ],

Afterwards on every controller/compute, the midonet_host_registry custom type should be used to register the node in MidoNet.

On gateway nodes one should install Midolman (see above) and configure the uplink:

  • Use the ::midonet::gateway::static class to configure a fake static uplink
  • Use the midonet_gateway_bgp custom type to configure the BGP uplink

For examples on how to use all the classes see the manifests in the roles folder at midonet/puppet-midonet_openstack.



midonet is a combination of Puppet manifest and ruby code to deliver configuration and extra functionality through types and providers.



The midonet_gateway_bgp provider allows to configure a BGP uplink in the gateway node.

midonet_gateway_bgp { 'edge-router':
  ensure                  => present,
  bgp_local_as_number     => '65520',
  bgp_advertised_networks => [ '' ],
  bgp_neighbors           => [
      'ip_address' => '',
      'remote_asn' => '65506',
      'remote_net' => ''
  midonet_api_url         => '',
  username                => 'admin',
  password                => 'safe_password',
  tenant_name             => 'admin',

The local AS number that this gateway will use.


An array listing all the floating IP networks that will be advertised.


An array of BGP peers. Each on the elements needs to have the following attributes:

  • ip_address: IP address of the BGP peer
  • remote_asn: Remote AS number
  • remote_net: Network on which the BGP peer is

URL of the MidoNet API in the format http://<HOST>:<PORT>.


Username for the admin user. Defaults to admin.


Password for this user. Defaults to admin.


Tenant name on which we want to apply the changes. Defaults to admin.


The midonet_host_registry registers a MidoNet node through the MidoNet API. It is necessary to use this type on every node that runs Midolman.

midonet_host_registry { 'myhost':
  ensure              => present,
  midonet_api_url     => '',
  tunnelzone_name     => 'tzone0'
  tunnelzone_type     => 'gre',
  username            => 'admin',
  password            => 'admin',
  tenant_name         => 'admin',
  underlay_ip_address => $::ipaddress,

URL for the MidoNet API in the form of http://<HOST>:<PORT>.


Name of the tunnel zone where the host will be registered. Defaults to tzone0.


The type of tunnel zone. Can be set to gre or vxlan. Defaults to gre.


Username of the admin user in Keystone. Defaults to admin.


Password of the admin user in Keystone. Defaults to admin.


Tenant name of the admin user. Defaults to admin.


IP address that will be used to as the underlay layer to create the tunnels. It will take the fact $::ipaddress by default.


This type is used to manage the configuration at /root/.midonetrc.

midonet_client_conf {
  'cli/username': value => 'admin';

This would set the username setting inside the cli section to admin.


The following platforms are supported:

  • Ubuntu 14.04 (Trusty)
  • Ubuntu 16.04 (Xenial)
  • CentOS 7

The module has been tested in both Puppet versions 3.x and 4.x.

Please note that if there is a dedicated analytics node provisioned with ::midonet::analytics you will need to place a virtualhost file manually on the controller for the midonet manager to be able to reach the analytics endpoints (using ProxyPass is enough).


This module has beaker-rspec tests

To run:

bundle install
bundle exec rspec spec/acceptance


The project follows for the most part the OpenStack development model. Developer documentation for the entire puppet-openstack project is at:

Check out current bugs or open new ones on JIRA project:


Feel free to assign an empty one to yourself!


The github contributor graph.