From 19f8c69ecb6542d34695c50b422f5ed11294ebdc Mon Sep 17 00:00:00 2001 From: gordon chung Date: Tue, 24 Feb 2015 11:08:32 -0500 Subject: [PATCH] update ceilometer install guide and external service configuration - change notification_driver option to use messagingv2. *.openstack.common.* is pre-icehouse option. - update telemetry get_started guide: - generalise supported functions - fix notification agent and collector service purpose - removes references to ceilometermiddleware in swift guide since it is a Kilo feature - removes references to TELEMETRY_SECRET as it is a Kilo change Closes-Bug: #1425713 Co-Authored-By: Matt Kassawara backport: juno Change-Id: I90dff1b5c2a7dd2943cfa7ff25bb63c08eb7986d --- doc/common/section_getstart_telemetry.xml | 52 +++-- .../section_ceilometer-cinder.xml | 44 ++-- .../section_ceilometer-glance.xml | 16 +- doc/install-guide/section_ceilometer-nova.xml | 192 +++++++++--------- .../section_ceilometer-swift.xml | 94 +++++---- 5 files changed, 211 insertions(+), 187 deletions(-) diff --git a/doc/common/section_getstart_telemetry.xml b/doc/common/section_getstart_telemetry.xml index d7efb0c90c..d74bd2b9fa 100644 --- a/doc/common/section_getstart_telemetry.xml +++ b/doc/common/section_getstart_telemetry.xml @@ -9,25 +9,19 @@ - Efficiently collects the metering data about the CPU - and network costs. + Efficiently polls metering data related to OpenStack + services. - Collects data by monitoring notifications sent from - services or by polling the infrastructure. + Collects event and metering data by monitoring notifications + sent from services. - Configures the type of collected data to meet - various operating requirements. It accesses and inserts the - metering data through the REST API. + Publishes collected data to various targets including data + stores and message queues. - Expands the framework to collect custom usage data - by additional plug-ins. - - - Produces signed metering messages that cannot be - repudiated. + Creates alarms when collected data breaks defined rules. @@ -45,17 +39,27 @@ >ceilometer-agent-central) Runs on a central management server to poll for resource utilization statistics for resources not tied to instances - or compute nodes. + or compute nodes. Multiple agents can be started to scale service + horizontally. + + A notification agent (ceilometer-agent-notification) + Runs on a central management server(s) and consumes + messages from the message queue(s) to build event and metering data. + A collector (ceilometer-collector) - Runs on central management server(s) to monitor the - message queues (for notifications and for metering data coming from - the agent). Notification messages are processed and turned into - metering messages, which are sent to the message bus using the - appropriate topic. Telemetry messages are written to the data store - without modification. - + Runs on central management server(s) and dispatches + collected telemetry data to a data store or external consumer + without modification. + + + An alarm evaluator (ceilometer-alarm-evaluator) + Runs on one or more central management servers to + determine when alarms fire due to the associated statistic + trend crossing a threshold over a sliding time window. An alarm notifier (ceilometer-alarm-notifier) @@ -64,12 +68,6 @@ collection of samples. - A data store - A database capable of handling - concurrent writes (from one or more collector instances) - and reads (from the API server). - - An API server (ceilometer-api) Runs on one or more central management servers to diff --git a/doc/install-guide/section_ceilometer-cinder.xml b/doc/install-guide/section_ceilometer-cinder.xml index da54bba56f..641fcc58a4 100644 --- a/doc/install-guide/section_ceilometer-cinder.xml +++ b/doc/install-guide/section_ceilometer-cinder.xml @@ -3,23 +3,27 @@ xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" - xml:id="ceilometer-agent-cinder"> + xml:id="ceilometer-cinder"> - Add the Block Storage service agent for Telemetry + Configure the Block Storage service + To retrieve volume-oriented events and samples, you must + configure the Block Storage service to send notifications to the + message bus. Perform these steps on the controller and storage + nodes. + To configure prerequisites + Edit the /etc/cinder/cinder.conf file + and complete the following actions: - To retrieve volume samples, you must configure the Block - Storage service to send notifications to the bus. - Edit /etc/cinder/cinder.conf - and add in the [DEFAULT] section on the controller - and volume nodes: - control_exchange = cinder -notification_driver = cinder.openstack.common.notifier.rpc_notifier + In the [DEFAULT] section, configure + notifications: + [DEFAULT] +... +control_exchange = cinder +notification_driver = messagingv2 - Restart the Block Storage services with their new - settings. - On the controller node: + Restart the Block Storage services on the controller node: # service cinder-api restart # service cinder-scheduler restart # systemctl restart openstack-cinder-api.service openstack-cinder-scheduler.service @@ -28,7 +32,9 @@ notification_driver = cinder.openstack.common.notifier.rpc_notifier# service openstack-cinder-scheduler restart On openSUSE: # systemctl restart openstack-cinder-api.service openstack-cinder-scheduler.service - On the storage node: + + + Restart the Block Storage services on the storage nodes: # service cinder-volume restart # systemctl restart openstack-cinder-volume.service On SLES: @@ -36,11 +42,11 @@ notification_driver = cinder.openstack.common.notifier.rpc_notifierOn openSUSE: # systemctl restart openstack-cinder-volume.service - - If you want to collect OpenStack Block Storage notification on demand, - you can use cinder-volume-usage-audit from OpenStack Block Storage. - For more information, Block Storage audit script setup to get notifications. - + + Use the cinder-volume-usage-audit command to + retrieve metrics on demand. For more information, see + Block Storage audit script setup to get notifications. + diff --git a/doc/install-guide/section_ceilometer-glance.xml b/doc/install-guide/section_ceilometer-glance.xml index ba93794021..1ea2a3bebc 100644 --- a/doc/install-guide/section_ceilometer-glance.xml +++ b/doc/install-guide/section_ceilometer-glance.xml @@ -3,21 +3,21 @@ xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" - xml:id="ceilometer-agent-glance"> - Configure the Image Service for Telemetry + xml:id="ceilometer-glance"> + Configure the Image Service + To retrieve image-oriented events and samples, configure + the Image Service to send notifications to the message bus. + Perform these steps on the controller node. - To configure prerequisites - To retrieve image samples, you must configure the Image - Service to send notifications to the message broker. Edit the - /etc/glance/glance-api.conf and - /etc/glance/glance-registry.conf files and + Edit the /etc/glance/glance-api.conf + and /etc/glance/glance-registry.conf files and complete the following actions: In the [DEFAULT] section, configure notifications and RabbitMQ message broker access: [DEFAULT] ... -notification_driver = messaging +notification_driver = messagingv2 rpc_backend = rabbit rabbit_host = controller rabbit_password = RABBIT_PASS diff --git a/doc/install-guide/section_ceilometer-nova.xml b/doc/install-guide/section_ceilometer-nova.xml index cd164e5758..36f9bbe323 100644 --- a/doc/install-guide/section_ceilometer-nova.xml +++ b/doc/install-guide/section_ceilometer-nova.xml @@ -3,20 +3,91 @@ xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" - xml:id="ceilometer-agent-nova"> + xml:id="ceilometer-nova"> - Install the Compute agent for Telemetry - Telemetry is composed of an API service, a collector and a range - of disparate agents. This section explains how to install and configure - the agent that runs on the compute node. + Configure the Compute service + Telemetry uses a combination of notifications and an agent to + collect Compute metrics. Perform these steps on each compute node. - To configure prerequisites + To install and configure the agent - Install the package: + Install the packages: # apt-get install ceilometer-agent-compute # yum install openstack-ceilometer-compute python-ceilometerclient python-pecan # zypper install openstack-ceilometer-agent-compute + + Edit the /etc/ceilometer/ceilometer.conf + file and complete the following actions: + + + In the [publisher] section, configure the + metering secret: + [publisher] +... +metering_secret = METERING_SECRET + Replace METERING_SECRET with + the metering secret you chose for the Telemetry module. + + + In the [DEFAULT] section, configure + RabbitMQ message broker access: + [DEFAULT] +... +rabbit_host = controller +rabbit_password = RABBIT_PASS + Replace RABBIT_PASS with the password + you chose for the guest account in RabbitMQ. + + + In the [keystone_authtoken] section, + configure Identity service access: + [keystone_authtoken] +... +auth_uri = http://controller:5000/v2.0 +identity_uri = http://controller:35357 +admin_tenant_name = service +admin_user = ceilometer +admin_password = CEILOMETER_PASS + Replace CEILOMETER_PASS with the + password you chose for the Telemetry module database. + + Comment out any auth_host, + auth_port, and + auth_protocol options because the + identity_uri option replaces them. + + + + In the [service_credentials] section, + configure service credentials: + [service_credentials] +... +os_auth_url = http://controller:5000/v2.0 +os_username = ceilometer +os_tenant_name = service +os_password = CEILOMETER_PASS +os_endpoint_type = internalURL +os_region_name = regionOne + Replace CEILOMETER_PASS with the + password you chose for the ceilometer user in + the Identity service. + + + (Optional) To assist with troubleshooting, + enable verbose logging in the [DEFAULT] + section: + [DEFAULT] +... +verbose = True + + + + + + To configure notifications + Configure the Compute service to send notifications to the + message bus. Edit the /etc/nova/nova.conf file and configure notifications in the [DEFAULT] @@ -26,8 +97,26 @@ instance_usage_audit = True instance_usage_audit_period = hour notify_on_state_change = vm_and_task_state -notification_driver = nova.openstack.common.notifier.rpc_notifier -notification_driver = ceilometer.compute.nova_notifier +notification_driver = messagingv2 + + + + To finalize installation + + Restart the agent: + # service ceilometer-agent-compute restart + + + Start the Telemetry agent and configure it to start when the + system boots: + # systemctl enable openstack-ceilometer-compute.service +# systemctl start openstack-ceilometer-compute.service + On SLES: + # service openstack-ceilometer-agent-compute start +# chkconfig openstack-ceilometer-agent-compute on + On openSUSE: + # systemctl enable openstack-ceilometer-compute.service +# systemctl start openstack-ceilometer-compute.service Restart the Compute service: @@ -39,89 +128,4 @@ notification_driver = ceilometer.compute.nova_notifier # systemctl restart openstack-nova-compute.service - - To configure the Compute agent for Telemetry - Edit the /etc/ceilometer/ceilometer.conf - file and complete the following actions: - - In the [publisher] section, configure the - metering secret: - [publisher] -... -metering_secret = METERING_SECRET - Replace METERING_SECRET with - the metering secret you chose for the Telemetry module. - - - In the [DEFAULT] section, configure - RabbitMQ message broker access: - [DEFAULT] -... -rabbit_host = controller -rabbit_password = RABBIT_PASS - Replace RABBIT_PASS with the password - you chose for the guest account in RabbitMQ. - - - In the [keystone_authtoken] section, - configure Identity service access: - [keystone_authtoken] -... -auth_uri = http://controller:5000/v2.0 -identity_uri = http://controller:35357 -admin_tenant_name = service -admin_user = ceilometer -admin_password = CEILOMETER_PASS - Replace CEILOMETER_PASS with the - password you chose for the Telemetry module database. - - Comment out the auth_host, - auth_port, and auth_protocol - keys, since they are replaced by the identity_uri - and auth_uri keys. - - - - In the [service_credentials] section, - configure service credentials: - [service_credentials] -... -os_auth_url = http://controller:5000/v2.0 -os_username = ceilometer -os_tenant_name = service -os_password = CEILOMETER_PASS -os_endpoint_type = internalURL -os_region_name = regionOne - Replace CEILOMETER_PASS with the password - you chose for the ceilometer user in the Identity - service. - - - (Optional) To assist with troubleshooting, - enable verbose logging in the [DEFAULT] - section: - [DEFAULT] -... -verbose = True - - - - To finalize installation - - Restart the Telemetry service: - # service ceilometer-agent-compute restart - - - Start the Telemetry service and configure it to start when the - system boots: - # systemctl enable openstack-ceilometer-compute.service -# systemctl start openstack-ceilometer-compute.service - On SLES: - # service openstack-ceilometer-agent-compute start -# chkconfig openstack-ceilometer-agent-compute on - On openSUSE: - # systemctl enable openstack-ceilometer-compute.service -# systemctl start openstack-ceilometer-compute.service - - diff --git a/doc/install-guide/section_ceilometer-swift.xml b/doc/install-guide/section_ceilometer-swift.xml index abfaa6d2fd..d5594b45fe 100644 --- a/doc/install-guide/section_ceilometer-swift.xml +++ b/doc/install-guide/section_ceilometer-swift.xml @@ -3,61 +3,77 @@ xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" - xml:id="ceilometer-agent-swift"> - Configure the Object Storage service for Telemetry + xml:id="ceilometer-swift"> + Configure the Object Storage service + To retrieve storage-oriented events and samples, configure the + Object Storage service to send notifications to the message bus. + To configure prerequisites + The Telemetry service requires access to the Object Storage + service using the ResellerAdmin role. Perform + these steps on the controller node. - Install the python-ceilometerclient - package on your Object Storage proxy server: - # apt-get install python-ceilometerclient - # yum install python-ceilometerclient - # zypper install python-ceilometerclient + Source the admin credentials to gain + access to admin-only CLI commands. + $ source admin-openrc.sh - To retrieve object store statistics, the Telemetry service - needs access to Object Storage with the - ResellerAdmin role. Give this role to - your os_username user for the - os_tenant_name tenant: + Create the ResellerAdmin role: $ keystone role-create --name ResellerAdmin +----------+----------------------------------+ | Property | Value | +----------+----------------------------------+ | id | 462fa46c13fd4798a95a3bfbe27b5e54 | | name | ResellerAdmin | -+----------+----------------------------------+ - ++----------+----------------------------------+ + + + Add the ResellerAdmin role to the + service tenant and ceilometer + user: $ keystone user-role-add --tenant service --user ceilometer \ - --role 462fa46c13fd4798a95a3bfbe27b5e54 + --role 462fa46c13fd4798a95a3bfbe27b5e54 + + + + To configure notifications + Perform these steps on the controller and any other nodes that + run the Object Storage proxy service. + + Edit the /etc/swift/proxy-server.conf file + and complete the following actions: + + + In the [filter:keystoneauth] section, + add the ResellerAdmin role: + [filter:keystoneauth] +... +operator_roles = admin,_member_,ResellerAdmin + + + In the [pipeline:main] section, add + ceilometer: + [pipeline:main] +... +pipeline = authtoken cache healthcheck keystoneauth proxy-logging ceilometer proxy-server + + + In the [filter:ceilometer] section, configure + notifications: + [filter:ceilometer] +use = egg:ceilometer#swift +log_level = WARN + + - You must also add the Telemetry middleware to Object - Storage to handle incoming and outgoing traffic. Add - these lines to the - /etc/swift/proxy-server.conf - file: - [filter:ceilometer] -use = egg:ceilometer#swift - - - Add ceilometer to the - pipeline parameter of that same file: - [pipeline:main] -pipeline = healthcheck cache authtoken keystoneauth ceilometer proxy-server - - - Add the system user swift to the system group - ceilometer to give Object Storage access to the - ceilometer.conf file. + Add the swift system user to the + ceilometer system group to permit access to the + Telemetry configuration files by the Object Storage service: # usermod -a -G ceilometer swift - Add ResellerAdmin to the - operator_roles parameter of that same file: - operator_roles = Member,admin,swiftoperator,_member_,ResellerAdmin - - - Restart the service with its new settings: + Restart the Object Storage proxy service: # service swift-proxy restart # systemctl restart openstack-swift-proxy.service On SLES: