Puppet module that installs and configures the OpenDaylight Software Defined Networking (SDN) controller.
Deploys OpenDaylight to various OSs either via an RPM or directly from the ODL tarball release artifact.
All OpenDaylight configuration should be handled through the ODL Puppet module's params. If you need a new knob, please raise an Issue.
The master branch installs OpenDaylight from the latest testing RPM repository by default. There are stable/ branches that install OpenDaylight releases and service releases, like Beryllium or Beryllium SR3.
- Installs Java, which is required by ODL.
- Creates
odl:odl
user:group if they don't already exist. - Installs OpenDaylight.
- Installs a systemd unitfile or Upstart config file for OpenDaylight.
- Manipulates OpenDaylight's configuration files according to the params
passed to the
::opendaylight
class. - Starts the
opendaylight
systemd or Upstart service.
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 CentOS 7, Fedora 22 and Fedora 23 Vagrant boxes.
[~/vagrant-opendaylight]$ vagrant status
Current machine states:
cent7 not created (libvirt)
cent7_rpm_he_sr4 not created (libvirt)
cent7_rpm_li_sr2 not created (libvirt)
cent7_rpm_be not created (libvirt)
cent7_ansible not created (libvirt)
cent7_ansible_be not created (libvirt)
cent7_ansible_path not created (libvirt)
cent7_pup_rpm not created (libvirt)
cent7_pup_custom_logs not created (libvirt)
cent7_pup_tb not created (libvirt)
f22_rpm_li not created (libvirt)
f22_ansible not created (libvirt)
f22_pup_rpm not created (libvirt)
f23_rpm_li not created (libvirt)
f23_rpm_li_sr1 not created (libvirt)
f23_rpm_li_sr2 not created (libvirt)
f23_rpm_li_sr3 not created (libvirt)
f23_rpm_be not created (libvirt)
f23_ansible not created (libvirt)
f23_pup_rpm not created (libvirt)
[~/vagrant-opendaylight]$ vagrant up cent7_pup_rpm
# A CentOS 7 VM is created and configured using the ODL Puppet mod's defaults
[~/vagrant-opendaylight]$ vagrant ssh cent7_pup_rpm
[vagrant@localhost ~]$ sudo systemctl is-active opendaylight
active
The most basic usage, passing no parameters to the OpenDaylight class, will install and start OpenDaylight with a default configuration.
class { 'opendaylight':
}
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-ovsdb-plugin', 'odl-ovsdb-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'],
}
The install_method
param, and the associated tarball_url
and unitfile_url
params, are intended for use by developers who need to install a custom-built
version of OpenDaylight, or for automated build processes that need to consume
a tarball build artifact.
It's recommended that most people use the default RPM-based install.
If you do need to install from a tarball, simply pass tarball
as the value
for install_method
and optionally pass the URL to your tarball via the
tarball_url
param. The default value for tarball_url
points at
OpenDaylight's latest release. The unitfile_url
param points at the
OpenDaylight systemd .service file used by the RPM and should (very likely)
not need to be overridden.
class { 'opendaylight':
install_method => 'tarball',
tarball_url => '<URL to your custom tarball>',
unitfile_url => '<URL to your custom unitfile>',
}
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][18] 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][19].
This is only read when install_method
is rpm
.
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',
}
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' },
}
To enable ODL OVSDB 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 OVSDB 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,
}
::opendaylight
: Main entry point to the module. All ODL knobs should be managed through its params.
::opendaylight::params
: Contains defaultopendaylight
class param values.::opendaylight::install
: Installs ODL from an RPM or tarball.::opendaylight::config
: Manages ODL config, including Karaf features and REST port.::opendaylight::service
: Starts the OpenDaylight service.
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.
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.
Specifies the install method by which to install OpenDaylight.
The RPM install method is less complex, more frequently consumed and recommended.
Default: 'rpm'
Valid options: The strings 'tarball'
or 'rpm'
.
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.
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 or disable ODL OVSDB High Availablity.
Default: false
Valid options: The boolean values true
and false
.
Requires: ha_node_ips
, ha_node_index
The ODL OVSDB Clustering and Jolokia XML for HA are configured and enabled.
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
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
Specifies the ODL tarball to use when installing via the tarball install method.
Default: 'https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.3.2-Lithium-SR2/distribution-karaf-0.3.2-Lithium-SR2.tar.gz'
Valid options: A valid URL to an ODL tarball as a string.
Specifies the ODL systemd .service file to use when installing via the tarball install method.
It's very unlikely that you'll need to override this.
Default: 'https://github.com/dfarrell07/opendaylight-systemd/archive/master/opendaylight-unitfile.tar.gz'
Valid options: A valid URL to an ODL systemd .service file (archived in a tarball) as a string.
Specifies the mode to use for security groups.
Default: stateful
Valid options: transparent
, learn
, statless
- Tested on Fedora 22, 23, CentOS 7 and Ubuntu 14.04.
- CentOS 7 is currently the most stable OS option.
- The RPM install method is likely more reliable than the tarball install method.
We welcome contributions and work to make them easy!
See CONTRIBUTING.markdown for details about how to contribute to the OpenDaylight Puppet module.
See the CHANGELOG or our git tags for information about releases. See our git commit history for contributor information.
[18]: http://cbs.centos.org/repos/nfv7-opendaylight-40-release/x86_64/os/Packages/ OpenDaylight Beryllium CentOS CBS repo [19]: https://wiki.opendaylight.org/view/Deployment#RPM OpenDaylight RPMs and their repos