opendaylight
Version information
This version is compatible with:
- Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >=4.0.0 <5.0.0
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'opendaylight-opendaylight', '6.1.0'
Learn more about managing modules with a PuppetfileDocumentation
OpenDaylight
Table of Contents
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.
By default, the master branch installs OpenDaylight from the latest testing RPM repository or from the latest stable Deb repository depending on the OS. The stable/ branches install corresponding older ODL versions.
Setup
What opendaylight
affects
- Installs Java, which is required by ODL.
- Creates
odl:odl
user:group if they don't already exist. - Installs OpenDaylight, including a systemd unit file.
- 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.
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 Repository
The rpm_repo
param can be used to configure which RPM repository
OpenDaylight is installed from.
class { 'opendaylight':
rpm_repo => 'https://nexus.opendaylight.org/content/repositories/opendaylight-oxygen-epel-7-$basearch-devel',
}
The URL should be formatted like a baseurl in RPM .repo config files. In particular, note the $basearch variable, which should be left form the package manager (yum, dnf) to populate.
For additional information about ODL RPM repos, see the Integration/Packaging RPM repositories documentation.
This is only read for Red Hat-family operating systems.
Deb Repository
The deb_repo
param can be used to configure which Deb repository
OpenDaylight is installed from.
class { 'opendaylight':
deb_repo => 'ppa:odl-team/carbon',
}
The naming convention is same as the naming convention of Launchpad PPA's,
which is where ODL .debs are hosted. The ppa:odl-team/carbon
example above
would install OpenDaylight Carbon from the boron launchpad repo.
This is only read for Debian-family operating systems.
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
odl_bind_ip
should be set with the IP address from ha_node_ips
configured
for the particular node that puppet is configuring as part of the
HA cluster.
By default a single ODL instance will become the leader for the entire
datastore. In order to distribute the datastore over multiple ODL instances,
ha_db_modules
parameter may be specified which will include the modules
desired to separate out from the default shard, along with the Yang namespace
for that module.
class { 'opendaylight':
enable_ha => true,
ha_node_ips => ['10.10.10.1', '10.10.10.1', '10.10.10.3'],
odl_bind_ip => 0,
ha_db_modules => {'default' => false, 'topology' => 'urn:opendaylight:topology'}
}
Configuring websocket address
Websocket address can be configured to the IP of ODL rather than default 0.0.0.0. This IP will
be defined by odl_bind_ip
.
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 defaultopendaylight
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
Repo URL to install ODL RPM from, in .repo baseurl format.
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
.
log_max_size
Maximum size of OpenDaylight's log file, /opt/opendaylight/data/log/karaf.log
.
Once this size is reached, the log will be rolled over, with up to
log_max_rollover
log rollovers preserved in total.
Default: 10GB
Valid options: A valid size as a string with unit specified.
log_max_rollover
Maximum number of OpenDaylight karaf.log rollovers to keep.
Note that if this is set to 1, log rollovers will result in loosing newly logged data. It's recommended to use values greater than one to prune from the end of the log.
Default: 2
Valid options: An integer greater than 0.
enable_ha
Enable or disable ODL High Availablity.
Default: false
Valid options: The boolean values true
and false
.
Requires: ha_node_ips
, odl_bind_ip
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_db_modules
Specifies the modules to use for distributing and sharding the ODL datastore.
Default: {'default'=> false}
Valid options: A hash of module and Yang namespace for the module (default has no namespace).
Requires: 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
.
This parameter is now deprecated and is no longer used.
snat_mechanism
Specifies the mechanism to be used for SNAT.
Default: controller
Valid options: conntrack
, controller
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
See the CHANGELOG for information about releases.
Types in this module release
2015-02-05 Release 0.1.0
- Initial versioned release 2015-04-26 Release 1.0.0
- Initial stable release 2016-02-05 Release 3.2.2
- Update ODL to Beryllium ERP RC2 2016-02-08 Release 3.2.3
- Bump Puppet mod version 2016-02-09 Release 3.2.4
- Update ODL to Beryllium ERP RC2.1 2016-02-12 Release 3.2.5
- Update ODL to Beryllium ERP RC2.2 2016-02-12 Release 3.2.6
- Update ODL to Beryllium ERP RC2.3 2016-02-15 Release 3.2.7
- Update ODL to Beryllium ERP RC3 2016-02-16 Release 3.2.8
- Update ODL to Beryllium ERP RC3.1 2016-02-16 Release 3.2.9
- Update ODL to Beryllium 2016-03-03 Release 3.3.0
- Add ODL HA config, fix ARP-yes when L3 2016-03-04 Release 3.3.1
- Bugfix in ODL cluster path config 2016-03-04 Release 3.3.2
- Bugfix in ODL HA jolokia.xml file content 2016-03-11 Release 3.4.0
- Add param to config ODL's bind IP addr 2016-03-23 Release 3.5.0
- Update ODL to Beryllium SR1 2016-06-01 Release 3.6.0
- Update ODL to Beryllium SR2 2016-06-01 Release 3.6.1
- Minor bump due to Puppetforge issue 2016-06-02 Release 3.7.0
- Add param to configure ODL RPM repo 2016-08-08 Release 3.7.1
- Install ODL RPM from latest Beryllium SR repo 2016-08-08 Release 3.7.2
- Install ODL RPM from Boron testing repo 2017-03-30 Release 4.0.0
- New params, ODL version bump, deb support, more tests 2017-05-23 Release 4.0.1
- Move to ODL-managed repo 2017-07-20 Release 4.1.0
- Add log size/rotate config params 2017-08-14 Release 4.2.0
- Add param to config SNAT mechanism 2017-10-11 Release 5.0.0
- Only support stateful security mode. Remove all related configs 2017-11-15 Release 6.0.0
- Allow full customization of ODL RPM repo 2017-11-17 Release 6.1.0
- Configure websocket address
Dependencies
- puppetlabs-stdlib (4.x)
Copyright (c) 2015, Daniel Farrell 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. 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 HOLDER 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.