kolla-ansible/ansible/roles/ceilometer/templates/ceilometer.conf.j2
Javier Castillo Alcíbar b13c40f586 Make sure ceilometer/service_credentials wotks with internalURL
When configuring kolla with

 - kolla_enable_tls_external: "yes"

ceilometer service credential defaults to publicURL.

Ceilometer should work with the internal interface (v3 API Identity syntax):

.....
[service_credentials]
interface = internal
.....

Change-Id: I898ffb2b901f08b810756d80dbb988d8c9298219
Closes-Bug: #1643860
2016-11-22 16:21:48 +01:00

63 lines
2.7 KiB
Django/Jinja

[DEFAULT]
debug = {{ ceilometer_logging_debug }}
log_dir = /var/log/kolla/ceilometer
transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
{% if ceilometer_database_type == 'gnocchi' %}
meter_dispatchers = gnocchi
event_dispatchers = gnocchi
{% endif %}
[api]
port = {{ ceilometer_api_port }}
host = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
[collector]
[database]
{% if ceilometer_database_type == "mongodb" %}
event_connection = mongodb://{{ ceilometer_database_user }}:{{ ceilometer_database_password }}@{{ ceilometer_database_mongodb_address }}/{{ ceilometer_database_name }}
metering_connection = mongodb://{{ ceilometer_database_user }}:{{ ceilometer_database_password }}@{{ ceilometer_database_mongodb_address }}/{{ ceilometer_database_name }}
{% elif ceilometer_database_type == "mysql" %}
event_connection = mysql+pymysql://{{ ceilometer_database_user }}:{{ ceilometer_database_password }}@{{ ceilometer_database_mysql_address }}:{{ ceilometer_database_port }}/{{ ceilometer_database_name }}
metering_connection = mysql+pymysql://{{ ceilometer_database_user }}:{{ ceilometer_database_password }}@{{ ceilometer_database_mysql_address }}:{{ ceilometer_database_port }}/{{ ceilometer_database_name }}
{% endif %}
[keystone_authtoken]
auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}
project_domain_name = Default
project_name = service
user_domain_name = Default
username = {{ ceilometer_keystone_user }}
password = {{ ceilometer_keystone_password }}
auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }}
auth_type = password
memcache_security_strategy = ENCRYPT
memcache_secret_key = {{ memcache_secret_key }}
memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %}
[notification]
store_events = true
[service_credentials]
auth_url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}/v3
region_name = {{ openstack_region_name }}
password = {{ ceilometer_keystone_password }}
username = {{ ceilometer_keystone_user }}
project_name = service
project_domain_id = default
user_domain_id = default
auth_type = password
interface = internal
{% if ceilometer_database_type == 'gnocchi' %}
[dispatcher_gnocchi]
filter_service_activity = False
url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ gnocchi_api_port }}
archive_policy = low
{% endif %}