--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<features name="jolokia-1.1.5" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
+ <feature name='feature-jolokia' version='1.1.5' install="auto">
+ <bundle>mvn:org.jolokia/jolokia-osgi/1.1.5</bundle>
+ </feature>
+</features>
# Use a template to populate the content
content => template('opendaylight/org.ops4j.pax.logging.cfg.erb'),
}
+
+ # Configure ODL HA if enabled
+ $ha_node_count = count($::opendaylight::ha_node_ips)
+ if $::opendaylight::enable_ha {
+ if $ha_node_count >= 2 {
+ # Configuration Jolokia XML for HA
+ file { 'opendaylight/jolokia.xml':
+ ensure => file,
+ path => '/opt/opendaylight/deploy/jolokia.xml',
+ # Set user:group owners
+ owner => 'odl',
+ group => 'odl',
+ }
+
+ # Configure ODL OSVDB Clustering
+ $ha_node_ip_str = join($::opendaylight::ha_node_ips, ' ')
+ exec { 'Configure ODL OVSDB Clustering':
+ command => "configure_cluster.sh ${::opendaylight::ha_node_index} ${ha_node_ip_str}",
+ path => '/opt/opendaylight/bin/',
+ }
+ } else {
+ fail("Number of HA nodes less than 2: ${ha_node_count} and HA Enabled")
+ }
+ }
}
# Enable or disable ODL OVSDB ML2 L3 forwarding. Valid: true, false, 'yes' and 'no'.
# [*log_levels*]
# Custom OpenDaylight logger verbosity configuration (TRACE, DEBUG, INFO, WARN, ERROR).
+# [*enable_ha*]
+# Enable or disable ODL OVSDB HA Clustering. Valid: true or false. 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.
#
class opendaylight (
$default_features = $::opendaylight::params::default_features,
$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,
+ $ha_node_ips = $::opendaylight::params::ha_node_ips,
+ $ha_node_index = $::opendaylight::params::ha_node_index,
) inherits ::opendaylight::params {
# Validate OS family
$odl_rest_port = '8080'
$enable_l3 = 'no'
$log_levels = {}
+ $enable_ha = false
+ $ha_node_ips = []
+ $ha_node_index = ''
}