#
# === Parameters
# [*default_features*]
-# Features that should normally be installed by default, but can be overridden.
+# Features that should normally be installed by default, but can be
+# overridden.
# [*extra_features*]
# List of features to install in addition to the default ones.
# [*odl_rest_port *]
# Port for ODL northbound REST interface to listen on.
-# [*install_method *]
-# How to install OpenDaylight. Current options are "rpm" and "tarball", default is RPM.
-# [*tarball_url*]
-# If installing from a tarball, use this one. Defaults to latest ODL.
-# [*unitfile_url*]
-# OpenDaylight .service file to use for tarball installs. Defaults to one used by ODL RPM.
+# [*odl_bind_ip *]
+# IP for ODL northbound REST interface to bind to.
+# [*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 (TRACE, DEBUG, INFO, WARN, ERROR).
+# [*enable_ha*]
+# Enable or disable ODL OVSDB HA Clustering. Valid: true or false.
+# Default: false.
+# [*ha_node_ips*]
+# Array of IPs for each node in the HA cluster.
+# [*ha_node_index*]
+# Index of ha_node_ips for this node.
+# [*security_group_mode*]
+# Sets the mode to use for security groups (stateful, learn, stateless, transparent)
+# [*vpp_routing_node*]
+# Sets routing node for VPP deployments. Defaults to ''.
+# [*java_opts*]
+# Sets Java options for ODL in a string format. Defaults to '-Djava.net.preferIPv4Stack=true'.
+# [*manage_repositories*]
+# (Boolean) Should this module manage the apt or yum repositories for the
+# package installation.
+# Defaults to true
#
class opendaylight (
- $default_features = $::opendaylight::params::default_features,
- $extra_features = $::opendaylight::params::extra_features,
- $install_method = $::opendaylight::params::install_method,
- $tarball_url = $::opendaylight::params::tarball_url,
- $unitfile_url = $::opendaylight::params::unitfile_url,
- $odl_rest_port = $::opendaylight::params::odl_rest_port,
+ $default_features = $::opendaylight::params::default_features,
+ $extra_features = $::opendaylight::params::extra_features,
+ $odl_rest_port = $::opendaylight::params::odl_rest_port,
+ $odl_bind_ip = $::opendaylight::params::odl_bind_ip,
+ $rpm_repo = $::opendaylight::params::rpm_repo,
+ $deb_repo = $::opendaylight::params::deb_repo,
+ $log_levels = $::opendaylight::params::log_levels,
+ $enable_ha = $::opendaylight::params::enable_ha,
+ $ha_node_ips = $::opendaylight::params::ha_node_ips,
+ $ha_node_index = $::opendaylight::params::ha_node_index,
+ $security_group_mode = $::opendaylight::params::security_group_mode,
+ $vpp_routing_node = $::opendaylight::params::vpp_routing_node,
+ $java_opts = $::opendaylight::params::java_opts,
+ $manage_repositories = $::opendaylight::params::manage_repositories,
+ $username = $::opendaylight::params::username,
+ $password = $::opendaylight::params::password,
) inherits ::opendaylight::params {
# Validate OS family
case $::osfamily {
- RedHat: {}
- Debian: {
+ 'RedHat': {}
+ 'Debian': {
warning('Debian has limited support, is less stable, less tested.')
}
default: {
# Validate OS
case $::operatingsystem {
centos, redhat: {
- if $::operatingsystemmajrelease != 7 {
+ if $::operatingsystemmajrelease != '7' {
# RHEL/CentOS versions < 7 not supported as they lack systemd
fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}")
- }
+ } elsif defined('$::operatingsystemrelease') {
+ if (versioncmp($::operatingsystemrelease, '7.3') < 0) {
+ # Versions < 7.3 do not support stateful security groups
+ $stateful_unsupported = true
+ }
+ }
}
fedora: {
- # Fedora distros < 20 are EOL as of Jan 6th 2015
- if ! ($::operatingsystemmajrelease in [20, 21]) {
+ # Fedora distros < 24 are EOL as of 2016-12-20
+ # https://fedoraproject.org/wiki/End_of_life
+ if $::operatingsystemmajrelease < '24' {
fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}")
+ } else {
+ warning('Fedora is not as well tested as CentOS.')
}
}
ubuntu: {
- if $::operatingsystemmajrelease != '14.04' {
- # Only tested on 14.04
- fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}")
+ if $::operatingsystemrelease < '16.04' {
+ # Only tested on 16.04
+ fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemrelease}")
}
}
default: {
# Build full list of features to install
$features = union($default_features, $extra_features)
- class { '::opendaylight::install': } ->
- class { '::opendaylight::config': odl_rest_port => $odl_rest_port} ~>
- class { '::opendaylight::service': } ->
- Class['::opendaylight']
+ class { '::opendaylight::install': }
+ -> class { '::opendaylight::config': }
+ ~> class { '::opendaylight::service': }
+ -> Class['::opendaylight']
}