1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# == Class: honeycomb
#
# OpenDaylight Honeycomb Agent
#
# === Parameters:
# [*rest_port*]
# Port for Honeycomb REST interface to listen on.
#
# [*websocket_rest_port*]
# Port for Honeycomb REST interface to listen on for websocket connections.
#
# [*user*]
# Username to configure in honeycomb.
#
# [*password*]
# Password to configure in honeycomb.
#
class fdio::honeycomb (
$rest_port = '8181',
$websocket_rest_port = '7779',
$user = 'admin',
$password = 'admin',
) {
include ::fdio
package { 'honeycomb':
ensure => present,
require => Package['vpp'],
}
->
# Configuration of Honeycomb
file { 'honeycomb.json':
ensure => file,
path => '/opt/honeycomb/config/honeycomb.json',
# Set user:group owners
owner => 'honeycomb',
group => 'honeycomb',
# Use a template to populate the content
content => template('fdio/honeycomb.json.erb'),
}
~>
service { 'honeycomb':
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
require => [ Vpp_service['vpp'], Package['honeycomb'] ],
restart => 'systemctl stop vpp;systemctl stop honeycomb;rm -rf /var/lib/honeycomb/persist/*;systemctl start vpp; sleep 5;systemctl start honeycomb',
}
}
|