Add ceilometer messaging_url for each service...

Without specifying messaging_urls, ceilometer only listens on the vhost
specified in the rabbit configuration directives.
To align with the the default OSA architecture, which isolates each service
into it's own respective rabbitmq vhost, this patchset has added jinja code
in the ceilometer.conf.j2 template to specifiy a messaging_url for each service,
 and for each service, each rabbitmq host. This ensures ceilometer is spawning
the correct number of listeners on the correct vhost and consuming notifications
correctly.

In addition, a few small changes were made in the patch set:

* store_events is now True by default
* rabbitmq_userid and rabbitmq_vhost service variables have been moved to group_vars.

Change-Id: I2bd9cf0ac7ca0492f6b2c56897f77117d2ae730b
Depends-On: I98bcd17dac9a47cc19e0d9ec90176945a6d7e355
Closes-Bug: #1526457
This commit is contained in:
Miguel Alex Cantu 2016-01-05 15:24:09 +00:00 committed by Jesse Pretorius
parent 237590286f
commit 323061a1bd
1 changed files with 39 additions and 0 deletions

View File

@ -4,6 +4,7 @@
{% set workers = _workers if _workers > 0 else 1 %}
[DEFAULT]
debug = {{ debug }}
auth_strategy = keystone
notification_topics = notifications
rpc_backend = rabbit
@ -29,6 +30,44 @@ workers = {{ ceilometer_collector_workers | default(workers) }}
[notification]
workers = {{ ceilometer_notification_workers | default(workers) }}
store_events = True
# Configuring the notification queue listeners
# Ceilometer needs to connect to it's own rabbitmq vhost
{% for host in groups['rabbitmq_all'] %}
messaging_urls = rabbit://{{ ceilometer_rabbitmq_userid }}:{{ ceilometer_rabbitmq_password }}@{{ hostvars[host]['ansible_ssh_host'] }}:{{ rabbitmq_port }}/{{ ceilometer_rabbitmq_vhost }}
{% endfor %}
{% if glance_ceilometer_enabled %}
# Glance
{% for host in groups['rabbitmq_all'] %}
messaging_urls = rabbit://{{ glance_rabbitmq_userid }}:{{ glance_rabbitmq_password }}@{{ hostvars[host]['ansible_ssh_host'] }}:{{ rabbitmq_port }}/{{ glance_rabbitmq_vhost }}
{% endfor %}
{% endif %}
{% if nova_ceilometer_enabled %}
# Nova
{% for host in groups['rabbitmq_all'] %}
messaging_urls = rabbit://{{ nova_rabbitmq_userid }}:{{ nova_rabbitmq_password }}@{{ hostvars[host]['ansible_ssh_host'] }}:{{ rabbitmq_port }}/{{ nova_rabbitmq_vhost }}
{% endfor %}
{% endif %}
{% if cinder_ceilometer_enabled %}
# Cinder
{% for host in groups['rabbitmq_all'] %}
messaging_urls = rabbit://{{ cinder_rabbitmq_userid }}:{{ cinder_rabbitmq_password }}@{{ hostvars[host]['ansible_ssh_host'] }}:{{ rabbitmq_port }}/{{ cinder_rabbitmq_vhost }}
{% endfor %}
{% endif %}
{% if neutron_ceilometer_enabled %}
# Neutron
{% for host in groups['rabbitmq_all'] %}
messaging_urls = rabbit://{{ neutron_rabbitmq_userid }}:{{ neutron_rabbitmq_password }}@{{ hostvars[host]['ansible_ssh_host'] }}:{{ rabbitmq_port }}/{{ neutron_rabbitmq_vhost }}
{% endfor %}
{% endif %}
{% if heat_ceilometer_enabled %}
# Heat
{% for host in groups['rabbitmq_all'] %}
messaging_urls = rabbit://{{ heat_rabbitmq_userid }}:{{ heat_rabbitmq_password }}@{{ hostvars[host]['ansible_ssh_host'] }}:{{ rabbitmq_port }}/{{ heat_rabbitmq_vhost }}
{% endfor %}
{% endif %}
# TODO: Keystone
# TODO: Swift
[database]
metering_connection = {{ ceilometer_connection_string }}