Ask Your Question
1

Developing simple Puppet Module for Havana ceilometer

asked 2014-06-27 12:37:14 -0600

RedCricket gravatar image

updated 2014-06-27 16:23:25 -0600

smaffulli gravatar image

I was hoping to get some help in writing a Puppet module for ceilometer. I need to understand what services need to be restarted when config files change. I am very new to openstack and know a little puppet.

For my ceilometer::controller I have this puppet code:

I have File resources for these files ...

file { 'ceilometer.conf': ... }
file { 'pipeline.yaml': ...}
file { 'policy.json': ...}
file { 'sources.json': ...}

... and I have these Service resources ...

 service { "openstack-ceilometer-alarm-evaluator":
   ensure  => running,
   enable => true,
 } ->

 service { "openstack-ceilometer-alarm-notifier":
   ensure  => running,
   enable => true,
 } ->

 service { "openstack-ceilometer-api":
   ensure  => running,
   enable => true,
 } ->

 service { "openstack-ceilometer-central":
   ensure  => running,
   enable => true,
 } ->

 service { "openstack-ceilometer-collector":
   ensure  => running,
   enable => true,
 }

So my question is, "Do I need to add this line ...

subscribe => File[ 'ceilometer.conf', 'pipeline.yaml', 'policy.json', 'sources.json'],

... to all my Service resource types or is there some other combination I need to use for one Service and not another? "

What services need to be restarted when the ceilometer.conf changes? What services need to be restarted when the pipeline.yaml changes? What services need to be restarted when the policy.json changes? What services need to be restarted when the sources.json changes?

In my ceilometer::compute is simpler. I think I need to define my service resource like this ...

 service { "openstack-ceilometer-compute":
   ensure  => running,
   enable => true,
   subscribe => File[ 'ceilometer.conf', 'pipeline.yaml', 'policy.json', 'sources.json' ],
 }

... right?

Thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-06-28 07:04:21 -0600

tim-bell gravatar image

Have you had a look at the puppetlabs modules ? The openstack ones are pretty good.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Get to know Ask OpenStack

Resources for moderators

Question Tools

Follow
1 follower

Stats

Asked: 2014-06-27 12:37:14 -0600

Seen: 254 times

Last updated: Jun 28 '14