X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=manifests%2Finit.pp;h=f485edda64f605fbf0b99beffabc7e5e31e751f2;hb=b0306984f8aa2580d05b414e6c0881cc136afc8d;hp=34d42bd264f9db330febb364602242780c7d15ef;hpb=378c9453b90dc09963d4673ec31448fe3bb6067d;p=integration%2Fpackaging%2Fpuppet-opendaylight.git diff --git a/manifests/init.pp b/manifests/init.pp index 34d42bd..f485edd 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -11,13 +11,12 @@ # [*odl_rest_port *] # Port for ODL northbound REST interface to listen on. # [*odl_bind_ip *] -# IP for ODL northbound REST interface to bind to. +# IP for ODL northbound REST interface and southbound OVSDB/OpenFlow to bind to. # [*rpm_repo*] -# OpenDaylight CentOS CBS repo to install RPM from (opendaylight-4-testing, -# opendaylight-40-release, ...). +# Repo URL to install ODL RPM from, in .repo baseurl format. # [*deb_repo*] -# OpenDaylight Launchpad PPA repo to install .deb from (ppa:odl-team/boron, -# ppa:odl-team/carbon, ...). +# OpenDaylight Launchpad PPA repo to install .deb from (ppa:odl-team/carbon, +# ppa:odl-team/nitrogen, ...). # [*log_levels*] # Custom OpenDaylight logger verbosity configuration (TRACE, DEBUG, INFO, WARN, ERROR). # [*enable_ha*] @@ -25,36 +24,90 @@ # 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) +# [*ha_db_modules*] +# Hash of modules and Yang namespaces to create database shards. Defaults to +# { 'default' => false }. "default" module does not need a namespace. # [*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'. +# Sets Java options for ODL in a string format. Defaults to ''. # [*manage_repositories*] # (Boolean) Should this module manage the apt or yum repositories for the # package installation. # Defaults to true +# [*log_max_size*] +# Maxium size of OpenDaylight's log file. +# [*log_max_rollover*] +# Maxium number of OpenDaylight log rollovers to keep. +# [*log_rollover_fileindex*] +# File index to use for OpenDaylight log rollovers +# Defaults to 'min'. +# Other possible values: 'max', 'nomax' +# see https://logging.apache.org/log4j/2.x/manual/appenders.html#FileAppender for more info +# [*snat_mechanism*] +# Sets the mechanism to be used for SNAT (conntrack, controller) +# [*enable_tls*] +# (Boolean) Enables TLS for REST and OpenFlow/OVSDB with OpenDaylight. +# Defaults to false +# [*tls_keystore_password*] +# TLS keystore password. Required when enabling TLS. +# [*tls_trusted_certs*] +# An array of cert files to be added to OpenDaylight's trusted keystore. +# Optional. Defaults to None. +# [*tls_key_file*] +# Full path to a private key file to be used for OpenDaylight. +# Optional. Defaults to undef. Requires setting tls_cert_file. +# [*tls_cert_file*] +# Full path to a public certificate file to be used for OpenDaylight. +# Optional. Defaults to undef. Requires setting tls_key_file. +# [*tls_ca_cert_file*] +# Full path to a public CA authority certificate file which signed +# OpenDaylight's certificate. Not needed if ODL certificate is self-signed. +# Optional. Defaults to undef. +# [*log_mechanism*] +# Sets logging mechanism for karaf logs +# [*inherit_dscp_marking*] +# Sets tos option to enable QoS DSCP marking +# Defaults to false +# [*stats_polling_enabled*] +# Enables statistics polling of OpenFlow entities like table, groups. +# Defaults to false +# +# === Deprecated Parameters +# +# [*ha_node_index*] +# Index of ha_node_ips for this node. # class opendaylight ( - $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, + $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, + $java_opts = $::opendaylight::params::java_opts, + $ha_db_modules = $::opendaylight::params::ha_db_modules, + $vpp_routing_node = $::opendaylight::params::vpp_routing_node, + $manage_repositories = $::opendaylight::params::manage_repositories, + $username = $::opendaylight::params::username, + $password = $::opendaylight::params::password, + $log_max_size = $::opendaylight::params::log_max_size, + $log_max_rollover = $::opendaylight::params::log_max_rollover, + $log_rollover_fileindex = $::opendaylight::params::log_rollover_fileindex, + $snat_mechanism = $::opendaylight::params::snat_mechanism, + $enable_tls = $::opendaylight::params::enable_tls, + $tls_keystore_password = $::opendaylight::params::tls_keystore_password, + $tls_trusted_certs = $::opendaylight::params::tls_trusted_certs, + $tls_key_file = $::opendaylight::params::tls_key_file, + $tls_cert_file = $::opendaylight::params::tls_cert_file, + $tls_ca_cert_file = $::opendaylight::params::tls_ca_cert_file, + $log_mechanism = $::opendaylight::params::log_mechanism, + $inherit_dscp_marking = $::opendaylight::params::inherit_dscp_marking, + $stats_polling_enabled = $::opendaylight::params::stats_polling_enabled, ) inherits ::opendaylight::params { # Validate OS family @@ -74,12 +127,7 @@ class opendaylight ( 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 < 24 are EOL as of 2016-12-20 @@ -103,8 +151,18 @@ class opendaylight ( # Build full list of features to install $features = union($default_features, $extra_features) + if $opendaylight::odl_bind_ip =~ Stdlib::Compat::Ipv6 { + $enable_ipv6 = true + $java_options = join(union(['-Djava.net.preferIPv6Addresses=true'], any2array($opendaylight::java_opts)), ' ') + } + else { + $enable_ipv6 = false + $java_options = join(union(['-Djava.net.preferIPv4Stack=true'], any2array($opendaylight::java_opts)), ' ') + } + class { '::opendaylight::install': } -> class { '::opendaylight::config': } ~> class { '::opendaylight::service': } + -> class { '::opendaylight::post_config': } -> Class['::opendaylight'] }