1 # == Class: opendaylight
3 # OpenDaylight SDN Controller
7 # Features that should normally be installed by default, but can be
10 # List of features to install in addition to the default ones.
12 # Port for ODL northbound REST interface to listen on.
14 # IP for ODL northbound REST interface to bind to.
16 # How to install OpenDaylight. Current options are "rpm" and "tarball",
19 # OpenDaylight CentOS CBS repo to install RPM from (opendaylight-4-testing,
20 # opendaylight-40-release, ...).
22 # If installing from a tarball, use this one. Defaults to latest ODL.
24 # OpenDaylight .service file to use for tarball installs. Defaults to one
27 # Enable or disable ODL OVSDB ML2 L3 forwarding. Valid: true, false, 'yes'
30 # Custom OpenDaylight logger verbosity configuration (TRACE, DEBUG, INFO, WARN, ERROR).
32 # Enable or disable ODL OVSDB HA Clustering. Valid: true or false.
35 # Array of IPs for each node in the HA cluster.
37 # Index of ha_node_ips for this node.
38 # [*security_group_mode*]
39 # Sets the mode to use for security groups (stateful, learn, stateless, transparent)
42 $default_features = $::opendaylight::params::default_features,
43 $extra_features = $::opendaylight::params::extra_features,
44 $odl_rest_port = $::opendaylight::params::odl_rest_port,
45 $odl_bind_ip = $::opendaylight::params::odl_bind_ip,
46 $install_method = $::opendaylight::params::install_method,
47 $rpm_repo = $::opendaylight::params::rpm_repo,
48 $tarball_url = $::opendaylight::params::tarball_url,
49 $unitfile_url = $::opendaylight::params::unitfile_url,
50 $enable_l3 = $::opendaylight::params::enable_l3,
51 $log_levels = $::opendaylight::params::log_levels,
52 $enable_ha = $::opendaylight::params::enable_ha,
53 $ha_node_ips = $::opendaylight::params::ha_node_ips,
54 $ha_node_index = $::opendaylight::params::ha_node_index,
55 $security_group_mode = $::opendaylight::params::security_group_mode,
56 ) inherits ::opendaylight::params {
62 warning('Debian has limited support, is less stable, less tested.')
65 fail("Unsupported OS family: ${::osfamily}")
70 case $::operatingsystem {
72 if $::operatingsystemmajrelease != '7' {
73 # RHEL/CentOS versions < 7 not supported as they lack systemd
74 fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}")
75 } elsif defined('::operatingsystemrelease') {
76 if (versioncmp($::operatingsystemrelease, '7.3') < 0) {
77 # Versions < 7.3 do not support stateful security groups
78 $stateful_unsupported = true
83 # Fedora distros < 22 are EOL as of 2015-12-01
84 # https://fedoraproject.org/wiki/End_of_life
85 if $::operatingsystemmajrelease < '22' {
86 fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}")
90 if $::operatingsystemmajrelease != '14.04' {
91 # Only tested on 14.04
92 fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}")
96 fail("Unsupported OS: ${::operatingsystem}")
99 # Build full list of features to install
100 $features = union($default_features, $extra_features)
102 class { '::opendaylight::install': } ->
103 class { '::opendaylight::config': } ~>
104 class { '::opendaylight::service': } ->
105 Class['::opendaylight']