Dynamically determine whether ceilometer should be enabled

Currently each service requires a var to be set to enable the
configuration of ceilometer for the service.

This patch makes this setting dynamic based on whether there
are any hosts in the ceilometer_all host group.

This reduces the amount of configuration required for an
environment, making OSA simpler to use.

The 'rabbitmq_servers' group_var was previously a list of
'host:port' combinations. It is now only a set of hosts.

The new 'transport_url' configuration option for oslo_messaging
is not working with SSL enabled, so SSL transport for RabbitMQ
has been temporarily disabled.

Change-Id: Ia5ba4e26b9adcfd923a93c6ea5077cbec0c4478d
This commit is contained in:
Jesse Pretorius 2016-07-22 13:18:21 +01:00
parent 9184b74fbd
commit 30dacdf8af
11 changed files with 33 additions and 20 deletions

View File

@ -26,16 +26,6 @@ debug: false
# ceilometer_db_ip: localhost
# ceilometer_db_port: 27017
## Common Override to enable Ceilometer for each service.
## By default all service are *not* enabled.
# swift_ceilometer_enabled: True
# heat_ceilometer_enabled: True
# cinder_ceilometer_enabled: True
# glance_ceilometer_enabled: True
# nova_ceilometer_enabled: True
# neutron_ceilometer_enabled: True
# keystone_ceilometer_enabled: True
## Common Glance Overrides
# Set glance_default_store to "swift" if using Cloud Files or swift backend
# or "rbd" if using ceph backend; the latter will trigger ceph to get

View File

@ -55,8 +55,10 @@ galera_root_user: "root"
## RabbitMQ
rabbitmq_port: "{{ (rabbitmq_use_ssl | bool) | ternary(5671, 5672) }}"
rabbitmq_servers: "{% for host in groups['rabbitmq_all'] %}{{ hostvars[host]['ansible_ssh_host'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}"
rabbitmq_use_ssl: true
rabbitmq_servers: "{% for host in groups['rabbitmq_all'] %}{{ hostvars[host]['ansible_ssh_host'] }}{% if not loop.last %},{% endif %}{% endfor %}"
# TODO(odyssey4me)
# The new transport_url configuration option is not working with SSL enabled. Revisit this ASAP.
rabbitmq_use_ssl: false
## Enable external SSL handling for general OpenStack services
openstack_external_ssl: true

View File

@ -19,3 +19,6 @@ cinder_service_region: "{{ service_region }}"
cinder_service_in_ldap: "{{ service_ldap_backend_enabled }}"
cinder_glance_api_servers: "{{ glance_api_servers }}"
cinder_glance_api_version: "{{ (cinder_backends_rbd_inuse|bool and glance_default_store == 'rbd') | ternary('2','1') }}"
# If there are any Ceilometer hosts in the environment, then enable its usage
cinder_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"

View File

@ -15,3 +15,6 @@
glance_service_region: "{{ service_region }}"
glance_service_in_ldap: "{{ service_ldap_backend_enabled }}"
# If there are any Ceilometer hosts in the environment, then enable its usage
glance_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"

View File

@ -15,3 +15,6 @@
heat_service_region: "{{ service_region }}"
heat_service_in_ldap: "{{ service_ldap_backend_enabled }}"
# If there are any Ceilometer hosts in the environment, then enable its usage
heat_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"

View File

@ -18,3 +18,6 @@ keystone_external_ssl: "{{ openstack_external_ssl }}"
keystone_cache_backend_argument: "url:{% for host in groups['memcached'] %}{{ hostvars[host]['container_address'] }}{% if not loop.last %},{% endif %}{% endfor %}:{{ memcached_port }}"
keystone_memcached_servers: "{% for host in groups['keystone_all'] %}{{ hostvars[host]['container_address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %}"
keystone_service_in_ldap: "{{ service_ldap_backend_enabled }}"
# If there are any Ceilometer hosts in the environment, then enable its usage
keystone_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"

View File

@ -24,4 +24,7 @@ neutron_rabbitmq_userid: neutron
neutron_rabbitmq_vhost: /neutron
neutron_rabbitmq_port: "{{ rabbitmq_port }}"
neutron_rabbitmq_servers: "{{ rabbitmq_servers }}"
neutron_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"
neutron_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"
# If there are any Ceilometer hosts in the environment, then enable its usage
neutron_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"

View File

@ -18,3 +18,6 @@ nova_ceph_client_uuid: '{{ cinder_ceph_client_uuid | default() }}'
nova_dhcp_domain: "{{ dhcp_domain }}"
nova_service_in_ldap: "{{ service_ldap_backend_enabled }}"
nova_glance_api_servers: "{{ glance_api_servers }}"
# If there are any Ceilometer hosts in the environment, then enable its usage
nova_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"

View File

@ -15,3 +15,6 @@
swift_service_region: "{{ service_region }}"
swift_service_in_ldap: "{{ service_ldap_backend_enabled }}"
# If there are any Ceilometer hosts in the environment, then enable its usage
swift_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"

View File

@ -0,0 +1,7 @@
---
features:
- Whether ceilometer should be enabled by default for each service
is now dynamically determined based on whether there are any
ceilometer hosts/containers deployed. This behaviour can still
be overridden by toggling ``<service>_ceilometer_enabled`` in
``/etc/openstack_deploy/user_variables.yml``.

View File

@ -20,13 +20,6 @@ debug: True
ceilometer_db_type: mongodb
ceilometer_db_ip: {{ bootstrap_host_mongodb_address }}
ceilometer_db_port: 27017
cinder_ceilometer_enabled: True
glance_ceilometer_enabled: True
heat_ceilometer_enabled: True
neutron_ceilometer_enabled: True
nova_ceilometer_enabled: True
swift_ceilometer_enabled: False
keystone_ceilometer_enabled: True
## Aodh Options
aodh_db_type: mongodb