aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/honeycomb.pp
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2017-10-06 00:54:44 -0400
committerFeng Pan <fpan@redhat.com>2017-10-06 00:54:44 -0400
commit51d315eed319df4e325aed4ed6ae585004273533 (patch)
tree70f69660fdb747405c69756952d9a083386a494f /manifests/honeycomb.pp
parentf7af7a686b888828808786a219dbed45c932d130 (diff)
Update honeycomb config for 17.10
In 17.10, honeycomb configuration files are split to multiple json files. Change honeycomb config to write to the new files, also change from using template to augeas. Change-Id: Ie4a1289de261b54f8f8cd71779c58361b9e0f7d3 Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'manifests/honeycomb.pp')
-rw-r--r--manifests/honeycomb.pp33
1 files changed, 24 insertions, 9 deletions
diff --git a/manifests/honeycomb.pp b/manifests/honeycomb.pp
index 619f98e..78ef7ee 100644
--- a/manifests/honeycomb.pp
+++ b/manifests/honeycomb.pp
@@ -67,17 +67,32 @@ class fdio::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'),
+ augeas { 'credential.json':
+ lens => 'Json.lns',
+ incl => '/opt/honeycomb/config/credentials.json',
+ changes => [
+ "set /files/opt/honeycomb/config/credentials.json/dict/entry[. = 'username']/string ${user}",
+ "set /files/opt/honeycomb/config/credentials.json/dict/entry[. = 'password']/string ${password}",
+ ],
+ require => Package['honeycomb'],
+ before => Service['honeycomb'],
+ }
+ augeas { 'restconf.json':
+ lens => 'Json.lns',
+ incl => '/opt/honeycomb/config/restconf.json',
+ changes => [
+ "set /files/opt/honeycomb/config/restconf.json/dict/entry[. = 'restconf-binding-address']/string ${bind_ip}",
+ "set /files/opt/honeycomb/config/restconf.json/dict/entry[. = 'restconf-https-binding-address']/string ${bind_ip}",
+ "set /files/opt/honeycomb/config/restconf.json/dict/entry[. = 'restconf-port']/number ${rest_port}",
+ "set /files/opt/honeycomb/config/restconf.json/dict/entry[. = 'restconf-websocket-port']/number ${websocket_rest_port}",
+ ],
+ require => Package['honeycomb'],
+ before => Service['honeycomb'],
}
- ~> service { 'honeycomb':
+
+ service { 'honeycomb':
ensure => running,
enable => true,
hasstatus => true,