From 089e4f973fd8535c18ebd028293f928269f57e2c Mon Sep 17 00:00:00 2001 From: Miguel Alex Cantu Date: Mon, 14 Dec 2015 19:41:15 +0000 Subject: [PATCH] Added notification options for keystone So keystone will emit notifications to the messaging queue in a way supported by ceilometer Change-Id: Ibf6bbd50d58e67b0bf5abbfb1b111a9ed92a18ac Closes-Bug: #1523932 --- doc/source/install-guide/configure-ceilometer.rst | 3 +++ etc/openstack_deploy/user_variables.yml | 1 + playbooks/roles/os_ceilometer/defaults/main.yml | 1 + playbooks/roles/os_ceilometer/templates/ceilometer.conf.j2 | 7 ++++++- playbooks/roles/os_keystone/defaults/main.yml | 3 +++ playbooks/roles/os_keystone/templates/keystone.conf.j2 | 5 ++++- .../bootstrap-host/templates/user_variables.aio.yml.j2 | 1 + 7 files changed, 19 insertions(+), 2 deletions(-) diff --git a/doc/source/install-guide/configure-ceilometer.rst b/doc/source/install-guide/configure-ceilometer.rst index d2f507bbe8..df7fadd14f 100644 --- a/doc/source/install-guide/configure-ceilometer.rst +++ b/doc/source/install-guide/configure-ceilometer.rst @@ -181,6 +181,9 @@ This configures nova to send notifications to the message bus: This configures neutron to send notifications to the message bus: ``neutron_ceilometer_enabled: False`` +This configures keystone to send notifications to the message bus: +``keystone_ceilometer_enabled: False`` + Once all of these steps are complete, you are ready to run the os-ceilometer-install.yml playbook! Or, if deploying a new stack, simply run setup-openstack.yml. The ceilometer playbooks will run as part of this playbook diff --git a/etc/openstack_deploy/user_variables.yml b/etc/openstack_deploy/user_variables.yml index 047ce10b84..31430adb21 100644 --- a/etc/openstack_deploy/user_variables.yml +++ b/etc/openstack_deploy/user_variables.yml @@ -24,6 +24,7 @@ cinder_ceilometer_enabled: False glance_ceilometer_enabled: False nova_ceilometer_enabled: False neutron_ceilometer_enabled: False +keystone_ceilometer_enabled: False ## Aodh Options aodh_db_type: mongodb diff --git a/playbooks/roles/os_ceilometer/defaults/main.yml b/playbooks/roles/os_ceilometer/defaults/main.yml index f631b1dda4..cc327bb8d6 100644 --- a/playbooks/roles/os_ceilometer/defaults/main.yml +++ b/playbooks/roles/os_ceilometer/defaults/main.yml @@ -95,6 +95,7 @@ nova_ceilometer_enabled: false cinder_ceilometer_enabled: false neutron_ceilometer_enabled: false heat_ceilometer_enabled: false +keystone_ceilometer_enabled: false ## Keystone authentication middleware ceilometer_keystone_auth_plugin: password diff --git a/playbooks/roles/os_ceilometer/templates/ceilometer.conf.j2 b/playbooks/roles/os_ceilometer/templates/ceilometer.conf.j2 index 3bfd5b9e88..04a0695b10 100644 --- a/playbooks/roles/os_ceilometer/templates/ceilometer.conf.j2 +++ b/playbooks/roles/os_ceilometer/templates/ceilometer.conf.j2 @@ -66,7 +66,12 @@ messaging_urls = rabbit://{{ neutron_rabbitmq_userid }}:{{ neutron_rabbitmq_pass messaging_urls = rabbit://{{ heat_rabbitmq_userid }}:{{ heat_rabbitmq_password }}@{{ hostvars[host]['ansible_ssh_host'] }}:{{ rabbitmq_port }}/{{ heat_rabbitmq_vhost }} {% endfor %} {% endif %} -# TODO: Keystone +{% if keystone_ceilometer_enabled %} +# Keystone +{% for host in groups['rabbitmq_all'] %} +messaging_urls = rabbit://{{ keystone_rabbitmq_userid }}:{{ keystone_rabbitmq_password }}@{{ hostvars[host]['ansible_ssh_host'] }}:{{ rabbitmq_port }}/{{ keystone_rabbitmq_vhost }} +{% endfor %} +{% endif %} # TODO: Swift [database] diff --git a/playbooks/roles/os_keystone/defaults/main.yml b/playbooks/roles/os_keystone/defaults/main.yml index 3a2554bcf1..82dcb50063 100644 --- a/playbooks/roles/os_keystone/defaults/main.yml +++ b/playbooks/roles/os_keystone/defaults/main.yml @@ -330,6 +330,9 @@ keystone_service_in_ldap: false keystone_sp_apt_packages: - libapache2-mod-shib2 +# Keystone notification settings +keystone_ceilometer_enabled: false + # Common apt packages keystone_apt_packages: - apache2 diff --git a/playbooks/roles/os_keystone/templates/keystone.conf.j2 b/playbooks/roles/os_keystone/templates/keystone.conf.j2 index 0599a7f02b..1318256813 100644 --- a/playbooks/roles/os_keystone/templates/keystone.conf.j2 +++ b/playbooks/roles/os_keystone/templates/keystone.conf.j2 @@ -19,6 +19,10 @@ log_file = keystone.log log_dir = /var/log/keystone rpc_backend = {{ keystone_rpc_backend }} +{% if keystone_ceilometer_enabled %} +notification_driver = messagingv2 +{% endif %} + {% if 'memcache' in keystone_token_driver and 'fernet' not in keystone_token_provider %} [memcache] servers = {{ keystone_memcached_servers }} @@ -159,4 +163,3 @@ trusted_dashboard = {{ item }} {% endfor %} {% endif %} {% endif %} - diff --git a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 index 06c4618a78..ef627f2ee6 100644 --- a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 @@ -26,6 +26,7 @@ heat_ceilometer_enabled: True neutron_ceilometer_enabled: True nova_ceilometer_enabled: True swift_ceilometer_enabled: True +keystone_ceilometer_enabled: True ## Aodh Options aodh_db_type: mongodb