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 and southbound OVSDB/OpenFlow 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/carbon,
19 # ppa:odl-team/nitrogen, ...).
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 ''.
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.
42 # [*log_rollover_fileindex*]
43 # File index to use for OpenDaylight log rollovers
45 # Other possible values: 'max', 'nomax'
46 # see https://logging.apache.org/log4j/2.x/manual/appenders.html#FileAppender for more info
48 # Pattern to use for logging
50 # Sets the mechanism to be used for SNAT (conntrack, controller)
52 # (Boolean) Enables TLS for REST and OpenFlow/OVSDB with OpenDaylight.
54 # [*tls_keystore_password*]
55 # TLS keystore password. Required when enabling TLS.
56 # [*tls_trusted_certs*]
57 # An array of cert files to be added to OpenDaylight's trusted keystore.
58 # Optional. Defaults to None.
60 # Full path to a private key file to be used for OpenDaylight.
61 # Optional. Defaults to undef. Requires setting tls_cert_file.
63 # Full path to a public certificate file to be used for OpenDaylight.
64 # Optional. Defaults to undef. Requires setting tls_key_file.
65 # [*tls_ca_cert_file*]
66 # Full path to a public CA authority certificate file which signed
67 # OpenDaylight's certificate. Not needed if ODL certificate is self-signed.
68 # Optional. Defaults to undef.
70 # Sets logging mechanism for karaf logs
71 # [*inherit_dscp_marking*]
72 # Sets tos option to enable QoS DSCP marking
74 # [*stats_polling_enabled*]
75 # Enables statistics polling of OpenFlow entities like table, groups.
77 # [*inactivity_probe*]
78 # Time in millseconds before an inactivity probe is sent via OVSDB
79 # to OVS. Defaults to undef.
81 # === Deprecated Parameters
84 # Index of ha_node_ips for this node.
87 $default_features = $::opendaylight::params::default_features,
88 $extra_features = $::opendaylight::params::extra_features,
89 $odl_rest_port = $::opendaylight::params::odl_rest_port,
90 $odl_bind_ip = $::opendaylight::params::odl_bind_ip,
91 $rpm_repo = $::opendaylight::params::rpm_repo,
92 $deb_repo = $::opendaylight::params::deb_repo,
93 $log_levels = $::opendaylight::params::log_levels,
94 $enable_ha = $::opendaylight::params::enable_ha,
95 $ha_node_ips = $::opendaylight::params::ha_node_ips,
96 $ha_node_index = $::opendaylight::params::ha_node_index,
97 $java_opts = $::opendaylight::params::java_opts,
98 $ha_db_modules = $::opendaylight::params::ha_db_modules,
99 $vpp_routing_node = $::opendaylight::params::vpp_routing_node,
100 $manage_repositories = $::opendaylight::params::manage_repositories,
101 $username = $::opendaylight::params::username,
102 $password = $::opendaylight::params::password,
103 $log_max_size = $::opendaylight::params::log_max_size,
104 $log_max_rollover = $::opendaylight::params::log_max_rollover,
105 $log_rollover_fileindex = $::opendaylight::params::log_rollover_fileindex,
106 $log_pattern = $::opendaylight::params::log_pattern,
107 $snat_mechanism = $::opendaylight::params::snat_mechanism,
108 $enable_tls = $::opendaylight::params::enable_tls,
109 $tls_keystore_password = $::opendaylight::params::tls_keystore_password,
110 $tls_trusted_certs = $::opendaylight::params::tls_trusted_certs,
111 $tls_key_file = $::opendaylight::params::tls_key_file,
112 $tls_cert_file = $::opendaylight::params::tls_cert_file,
113 $tls_ca_cert_file = $::opendaylight::params::tls_ca_cert_file,
114 $log_mechanism = $::opendaylight::params::log_mechanism,
115 $inherit_dscp_marking = $::opendaylight::params::inherit_dscp_marking,
116 $stats_polling_enabled = $::opendaylight::params::stats_polling_enabled,
117 $inactivity_probe = $::opendaylight::params::inactivity_probe,
118 ) inherits ::opendaylight::params {
124 warning('Debian has limited support, is less stable, less tested.')
127 fail("Unsupported OS family: ${::osfamily}")
132 case $::operatingsystem {
134 if $::operatingsystemmajrelease != '7' {
135 # RHEL/CentOS versions < 7 not supported as they lack systemd
136 fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}")
140 # Fedora distros < 24 are EOL as of 2016-12-20
141 # https://fedoraproject.org/wiki/End_of_life
142 if $::operatingsystemmajrelease < '24' {
143 fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}")
145 warning('Fedora is not as well tested as CentOS.')
149 if $::operatingsystemrelease < '16.04' {
150 # Only tested on 16.04
151 fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemrelease}")
155 fail("Unsupported OS: ${::operatingsystem}")
158 # Build full list of features to install
159 $features = union($default_features, $extra_features)
161 if $opendaylight::odl_bind_ip =~ Stdlib::Compat::Ipv6 {
163 $java_options = strip(join(union(['-Djava.net.preferIPv6Addresses=true'], any2array($opendaylight::java_opts)), ' '))
167 $java_options = strip(join(union(['-Djava.net.preferIPv4Stack=true'], any2array($opendaylight::java_opts)), ' '))
170 class { '::opendaylight::install': }
171 -> class { '::opendaylight::config': }
172 ~> class { '::opendaylight::service': }
173 -> class { '::opendaylight::post_config': }
174 -> Class['::opendaylight']