From 9326e4237f4d161f297dc4493ab4928ea6e2bf0f Mon Sep 17 00:00:00 2001 From: Feng Pan Date: Mon, 7 Nov 2016 19:22:21 -0500 Subject: Initial Commit. Change-Id: I212ec4be42357edddd931e9e479e33131ccd4bac Signed-off-by: Feng Pan --- manifests/honeycomb.pp | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 manifests/honeycomb.pp (limited to 'manifests/honeycomb.pp') diff --git a/manifests/honeycomb.pp b/manifests/honeycomb.pp new file mode 100644 index 0000000..3d28179 --- /dev/null +++ b/manifests/honeycomb.pp @@ -0,0 +1,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', + } + +} -- cgit 1.2.3-korg