Forge Home

opendaylight

Puppet module that installs and configures the OpenDaylight SDN controller

9,805 downloads

6,395 latest version

3.1 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 6.1.0 (latest)
  • 4.0.1
  • 4.0.0
  • 3.7.0
released Jun 15th 2017
This version is compatible with:
  • Puppet >=3.4.0 <4.4.0
  • , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'opendaylight-opendaylight', '4.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add opendaylight-opendaylight
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install opendaylight-opendaylight --version 4.0.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

opendaylight/opendaylight — version 4.0.1 Jun 15th 2017

OpenDaylight

Table of Contents

  1. Overview
  2. Module Description
  3. Setup
  1. Usage
  1. Reference
  2. Limitations
  3. Development
  4. Release Notes/Contributors

Overview

Puppet module that installs and configures the OpenDaylight Software Defined Networking (SDN) controller.

Module Description

Deploys OpenDaylight to various OSs either via an RPM or a Deb.

All OpenDaylight configuration should be handled through the ODL Puppet module's params. If you need a new knob, please raise an Issue.

By default, the master branch installs OpenDaylight from the latest testing RPM repository or from the latest stable Deb repository depending on the OS. There are stable/ branches that install OpenDaylight releases and service releases, like Beryllium or Beryllium SR3.

Setup

What opendaylight affects

  • Installs Java, which is required by ODL.
  • Creates odl:odl user:group if they don't already exist.
  • Installs OpenDaylight.
  • Installs a systemd unitfile for OpenDaylight.
  • Manipulates OpenDaylight's configuration files according to the params passed to the ::opendaylight class.
  • Starts the opendaylight systemd service.

Beginning with opendaylight

Getting started with the OpenDaylight Puppet module is as simple as declaring the ::opendaylight class.

The vagrant-opendaylight project provides an easy way to experiment with applying the ODL Puppet module to VMs.

# Provision a CentOS VM using puppet-opendaylight
$ vagrant up cent7_pup_rpm
$ vagrant ssh cent7_pup_rpm
$ sudo systemctl is-active opendaylight
active

Usage

The most basic usage, passing no parameters to the OpenDaylight class, will install and start OpenDaylight with a default configuration.

class { 'opendaylight':
}

Karaf Features

To set extra Karaf features to be installed at OpenDaylight start time, pass them in a list to the extra_features param. The extra features you pass will typically be driven by the requirements of your ODL install. You'll almost certainly need to pass some.

class { 'opendaylight':
  extra_features => ['odl-netvirt-openstack'],
}

OpenDaylight normally installs a default set of Karaf features at boot. They are recommended, so the ODL Puppet mod defaults to installing them. This can be customized by overriding the default_features param. You shouldn't normally need to do so.

class { 'opendaylight':
  default_features => ['config', 'standard', 'region', 'package', 'kar', 'ssh', 'management'],
}

RPM Repo

The rpm_repo param can be used to configure which RPM repository OpenDaylight is installed from.

class { 'opendaylight':
  rpm_repo => 'opendaylight-40-release',
}

The naming convention follows the naming convention of the CentOS Community Build System, which is where upstream ODL hosts its RPMs. The opendaylight-40-release example above would install OpenDaylight Beryllium 4.0.0 from the nfv7-opendaylight-40-release repo. Repo names ending in -release will always contain well-tested, officially released versions of OpenDaylight. Repos ending in -testing contain frequent, but unstable and unofficial, releases. The ODL version given in repo names shows which major and minor version it is pinned to. The opendaylight-40-release repo will always provide OpenDaylight Beryllium 4.0, whereas opendaylight-4-release will provide the latest release with major version 4 (which could include Service Releases, like SR2 4.2).

For a full list of OpenDaylight releases and their CBS repos, see the OpenDaylight Deployment wiki.

This is only read for RedHat based operating systems. For Debian based OSs, this values is none.

Deb Repo

The deb_repo param can be used to configure which Deb repository OpenDaylight is installed from.

class { 'opendaylight':
  deb_repo => 'ppa:odl-team/boron',
}

The naming convention is same as the naming convention of Launchpad PPA's, which is where ODL .debs are hosted. The ppa:odl-team/boron example above would install OpenDaylight Boron realease from the odl-team's boron repo.

This is only read for Debian based operating systems. For RedHat based OSs, this values is none.

Ports

To change the port on which OpenDaylight's northbound listens for REST API calls, use the odl_rest_port param.

class { 'opendaylight':
  odl_rest_port => '8080',
}

Log Verbosity

It's possible to define custom logger verbosity levels via the log_levels param.

class { 'opendaylight':
  log_levels => { 'org.opendaylight.ovsdb' => 'TRACE', 'org.opendaylight.ovsdb.lib' => 'INFO' },
}

Enabling ODL HA

To enable ODL HA, use the enable_ha flag. It's disabled by default.

When enable_ha is set to true the ha_node_ips should be populated with the IP addresses that ODL will listen on for each node in the HA cluster and ha_node_index should be set with the index of the IP address from ha_node_ips for the particular node that puppet is configuring as part of the HA cluster.

class { 'opendaylight':
  enable_ha     => true,
  ha_node_ips   => ['10.10.10.1', '10.10.10.1', '10.10.10.3'],
  ha_node_index => 0,
}

Reference

Classes

Public classes

  • ::opendaylight: Main entry point to the module. All ODL knobs should be managed through its params.

Private classes

  • ::opendaylight::params: Contains default opendaylight class param values.
  • ::opendaylight::install: Installs ODL from an RPM or a Deb.
  • ::opendaylight::config: Manages ODL config, including Karaf features and REST port.
  • ::opendaylight::service: Starts the OpenDaylight service.

::opendaylight

Parameters

default_features

Sets the Karaf features to install by default. These should not normally need to be overridden.

Default: ['config', 'standard', 'region', 'package', 'kar', 'ssh', 'management']

Valid options: A list of Karaf feature names as strings.

extra_features

Specifies Karaf features to install in addition to the defaults listed in default_features.

You will likely need to customize this to your use-case.

Default: []

Valid options: A list of Karaf feature names as strings.

odl_rest_port

Specifies the port for the ODL northbound REST interface to listen on.

Default: '8080'

Valid options: A valid port number as a string or integer.

rpm_repo

OpenDaylight CentOS CBS repo to install RPM from (opendaylight-4-testing, opendaylight-40-release, ...).

deb_repo

OpenDaylight Launchpad PPA repo to install .deb from (ppa:odl-team/boron, ppa:odl-team/carbon, ...).

log_levels

Custom OpenDaylight logger verbosity configuration.

Default: {}

Valid options: A hash of loggers to log levels.

{ 'org.opendaylight.ovsdb' => 'TRACE', 'org.opendaylight.ovsdb.lib' => 'INFO' }

Valid log levels are TRACE, DEBUG, INFO, WARN, and ERROR.

The above example would add the following logging configuration to /opt/opendaylight/etc/org.ops4j.pax.logging.cfg.

# Log level config added by puppet-opendaylight
log4j.logger.org.opendaylight.ovsdb = TRACE

# Log level config added by puppet-opendaylight
log4j.logger.org.opendaylight.ovsdb.lib = INFO

To view loggers and their verbosity levels, use log:list at the ODL Karaf shell.

opendaylight-user@root>log:list
Logger                     | Level
----------------------------------
ROOT                       | INFO
org.opendaylight.ovsdb     | TRACE
org.opendaylight.ovsdb.lib | INFO

The main log output file is /opt/opendaylight/data/log/karaf.log.

enable_ha

Enable or disable ODL High Availablity.

Default: false

Valid options: The boolean values true and false.

Requires: ha_node_ips, ha_node_index

The ODL Clustering XML for HA are configured and enabled.

ha_node_ips

Specifies the IPs that are part of the HA cluster enabled by enable_ha.

Default: []

Valid options: An array of IP addresses ['10.10.10.1', '10.10.10.1', '10.10.10.3'].

Required by: enable_ha

ha_node_index

Specifies the index of the IP for the node being configured from the array ha_node_ips.

Default: ''

Valid options: Index of a member of the array ha_node_ips: 0.

Required by: enable_ha, ha_node_ips

security_group_mode

Specifies the mode to use for security groups.

Default: stateful

Valid options: transparent, learn, stateless

vpp_routing_node

Specifies the routing node for VPP deployment. A non-empty string will create config file org.opendaylight.groupbasedpolicy.neutron.vpp.mapper.startup.cfg with routing-node set.

Default: ''

Valid options: A valid host name to a VPP node handling routing.

java_opts

Specifies the Java options to run ODL with as a string.

Default: '-Djava.net.preferIPv4Stack=true'

Valid options: A string of valid Java options.

username

Specifies the username to set for admin role in ODL.

Default: 'admin'

Valid options: A username string.

password

Specifies the password to set for admin role in ODL.

Default: 'admin'

Valid options: A password string.

Limitations

  • Tested on CentOS 7 and Ubuntu 16.04.
  • Fedora is allowed but not well-tested, no Beaker coverage.

Development

We welcome contributions and work to make them easy!

See CONTRIBUTING.markdown for details about how to contribute to the OpenDaylight Puppet module.

Release Notes/Contributors

See the CHANGELOG or our git tags for information about releases. See our git commit history for contributor information.