Skip to content

Commit 265bd7f

Browse files
committed
Merge pull request #1 from dfarrell07/master
fast forward to puppet-opendaylight master
2 parents bbc048b + 1d1cee6 commit 265bd7f

File tree

5 files changed

+43
-0
lines changed

5 files changed

+43
-0
lines changed

files/jolokia.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<features name="jolokia-1.1.5" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
3+
<feature name='feature-jolokia' version='1.1.5' install="auto">
4+
<bundle>mvn:org.jolokia/jolokia-osgi/1.1.5</bundle>
5+
</feature>
6+
</features>

manifests/config.pp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,28 @@
5151
# Use a template to populate the content
5252
content => template('opendaylight/org.ops4j.pax.logging.cfg.erb'),
5353
}
54+
55+
# Configure ODL HA if enabled
56+
$ha_node_count = count($::opendaylight::ha_node_ips)
57+
if $::opendaylight::enable_ha {
58+
if $ha_node_count >= 2 {
59+
# Configuration Jolokia XML for HA
60+
file { 'opendaylight/jolokia.xml':
61+
ensure => file,
62+
path => '/opt/opendaylight/deploy/jolokia.xml',
63+
# Set user:group owners
64+
owner => 'odl',
65+
group => 'odl',
66+
}
67+
68+
# Configure ODL OSVDB Clustering
69+
$ha_node_ip_str = join($::opendaylight::ha_node_ips, ' ')
70+
exec { 'Configure ODL OVSDB Clustering':
71+
command => "configure_cluster.sh ${::opendaylight::ha_node_index} ${ha_node_ip_str}",
72+
path => '/opt/opendaylight/bin/',
73+
}
74+
} else {
75+
fail("Number of HA nodes less than 2: ${ha_node_count} and HA Enabled")
76+
}
77+
}
5478
}

manifests/init.pp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
# Enable or disable ODL OVSDB ML2 L3 forwarding. Valid: true, false, 'yes' and 'no'.
2020
# [*log_levels*]
2121
# Custom OpenDaylight logger verbosity configuration (TRACE, DEBUG, INFO, WARN, ERROR).
22+
# [*enable_ha*]
23+
# Enable or disable ODL OVSDB HA Clustering. Valid: true or false. Default: false.
24+
# [*ha_node_ips*]
25+
# Array of IPs for each node in the HA cluster.
26+
# [*ha_node_index*]
27+
# Index of ha_node_ips for this node.
2228
#
2329
class opendaylight (
2430
$default_features = $::opendaylight::params::default_features,
@@ -29,6 +35,9 @@
2935
$unitfile_url = $::opendaylight::params::unitfile_url,
3036
$enable_l3 = $::opendaylight::params::enable_l3,
3137
$log_levels = $::opendaylight::params::log_levels,
38+
$enable_ha = $::opendaylight::params::enable_ha,
39+
$ha_node_ips = $::opendaylight::params::ha_node_ips,
40+
$ha_node_index = $::opendaylight::params::ha_node_index,
3241
) inherits ::opendaylight::params {
3342

3443
# Validate OS family

manifests/params.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@
1616
$unitfile_url = 'https://github.com/dfarrell07/opendaylight-systemd/archive/master/opendaylight-unitfile.tar.gz'
1717
$enable_l3 = 'no'
1818
$log_levels = {}
19+
$enable_ha = false
20+
$ha_node_ips = []
21+
$ha_node_index = ''
1922
}

templates/custom.properties.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ ovsdb.listenPort=6640
8585
# disabled by default.
8686
<% if [true, 'yes'].include? scope.lookupvar('opendaylight::enable_l3') -%>
8787
ovsdb.l3.fwd.enabled=yes
88+
ovsdb.l3.arp.responder.disabled=no
8889
<% elsif [false, 'no'].include? scope.lookupvar('opendaylight::enable_l3') -%>
8990
ovsdb.l3.fwd.enabled=no
9091
<% else -%>

0 commit comments

Comments
 (0)