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 # Repo URL to install ODL RPM from, in .repo baseurl format.
18 # OpenDaylight Launchpad PPA repo to install .deb from (ppa:odl-team/boron,
19 # ppa:odl-team/carbon, ...).
21 # Custom OpenDaylight logger verbosity configuration (TRACE, DEBUG, INFO, WARN, ERROR).
23 # Enable or disable ODL OVSDB HA Clustering. Valid: true or false.
26 # Array of IPs for each node in the HA cluster.
28 # Hash of modules and Yang namespaces to create database shards. Defaults to
29 # { 'default' => false }. "default" module does not need a namespace.
30 # [*vpp_routing_node*]
31 # Sets routing node for VPP deployments. Defaults to ''.
33 # Sets Java options for ODL in a string format. Defaults to '-Djava.net.preferIPv4Stack=true'.
34 # [*manage_repositories*]
35 # (Boolean) Should this module manage the apt or yum repositories for the
36 # package installation.
39 # Maxium size of OpenDaylight's log file.
40 # [*log_max_rollover*]
41 # Maxium number of OpenDaylight log rollovers to keep.
43 # Sets the mechanism to be used for SNAT (conntrack, controller)
45 # === Deprecated Parameters
48 # Index of ha_node_ips for this node.
51 $default_features = $::opendaylight::params::default_features,
52 $extra_features = $::opendaylight::params::extra_features,
53 $odl_rest_port = $::opendaylight::params::odl_rest_port,
54 $odl_bind_ip = $::opendaylight::params::odl_bind_ip,
55 $rpm_repo = $::opendaylight::params::rpm_repo,
56 $deb_repo = $::opendaylight::params::deb_repo,
57 $log_levels = $::opendaylight::params::log_levels,
58 $enable_ha = $::opendaylight::params::enable_ha,
59 $ha_node_ips = $::opendaylight::params::ha_node_ips,
60 $ha_node_index = $::opendaylight::params::ha_node_index,
61 $ha_db_modules = $::opendaylight::params::ha_db_modules,
62 $vpp_routing_node = $::opendaylight::params::vpp_routing_node,
63 $java_opts = $::opendaylight::params::java_opts,
64 $manage_repositories = $::opendaylight::params::manage_repositories,
65 $username = $::opendaylight::params::username,
66 $password = $::opendaylight::params::password,
67 $log_max_size = $::opendaylight::params::log_max_size,
68 $log_max_rollover = $::opendaylight::params::log_max_rollover,
69 $snat_mechanism = $::opendaylight::params::snat_mechanism
70 ) inherits ::opendaylight::params {
76 warning('Debian has limited support, is less stable, less tested.')
79 fail("Unsupported OS family: ${::osfamily}")
84 case $::operatingsystem {
86 if $::operatingsystemmajrelease != '7' {
87 # RHEL/CentOS versions < 7 not supported as they lack systemd
88 fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}")
92 # Fedora distros < 24 are EOL as of 2016-12-20
93 # https://fedoraproject.org/wiki/End_of_life
94 if $::operatingsystemmajrelease < '24' {
95 fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}")
97 warning('Fedora is not as well tested as CentOS.')
101 if $::operatingsystemrelease < '16.04' {
102 # Only tested on 16.04
103 fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemrelease}")
107 fail("Unsupported OS: ${::operatingsystem}")
110 # Build full list of features to install
111 $features = union($default_features, $extra_features)
113 class { '::opendaylight::install': }
114 -> class { '::opendaylight::config': }
115 ~> class { '::opendaylight::service': }
116 -> Class['::opendaylight']