# List of features to install in addition to the default ones.
# [*odl_rest_port *]
# Port for ODL northbound REST interface to listen on.
+# [*odl_bind_ip *]
+# IP for ODL northbound REST interface to bind to.
# [*install_method *]
# How to install OpenDaylight. Current options are "rpm" and "tarball", default is RPM.
# [*tarball_url*]
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,
$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,
$enable_l3 = $::opendaylight::params::enable_l3,
$log_levels = $::opendaylight::params::log_levels,
$enable_ha = $::opendaylight::params::enable_ha,
ensure => present,
require => Yumrepo['opendaylight-40-release'],
}
+ ->
+ # Configure the systemd file to force ipv4 binds (instead of ipv6)
+ file_line { 'odl_start_ipv4 ':
+ ensure => present,
+ path => '/usr/lib/systemd/system/opendaylight.service',
+ line => 'Environment=_JAVA_OPTIONS=\'-Djava.net.preferIPv4Stack=true\'',
+ after => 'ExecStart=/opt/opendaylight/bin/start',
+ }
+ ->
+ exec {'reload_systemd_units':
+ command => 'systemctl daemon-reload',
+ path => '/bin'
+ }
}
elsif $opendaylight::install_method == 'tarball' {
# Install Java 7
$default_features = ['config', 'standard', 'region', 'package', 'kar', 'ssh', 'management']
$extra_features = []
$odl_rest_port = '8080'
+ $odl_bind_ip = '0.0.0.0'
$install_method = 'rpm'
$tarball_url = 'https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.4.0-Beryllium/distribution-karaf-0.4.0-Beryllium.tar.gz'
$unitfile_url = 'https://github.com/dfarrell07/opendaylight-systemd/archive/master/opendaylight-unitfile.tar.gz'
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
- <Set name="host">
+ <Set name="host"><%= scope.lookupvar('opendaylight::odl_bind_ip') %>
<Property name="jetty.host" />
</Set>
<Set name="port">
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
- <Set name="host">
+ <Set name="host"><%= scope.lookupvar('opendaylight::odl_bind_ip') %>
<Property name="jetty.host" />
</Set>
<Set name="port">