From 9cb3b161c083e4988c9297fd1731acfc4cb43b70 Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Thu, 16 Jan 2014 20:40:53 +0100 Subject: [PATCH] Fix ceilometer installation on compute node The ceilometer agent running on the compute node must be configured to access other services (keystone and AMQP). Add the missing information. Also explicitly define log_dir for ubuntu (don't use a note). Remove ... in program listings. Change-Id: I3a339c5c8ccabf7c7d307357834eb8dada71271c backport: havana --- .../section_ceilometer-install.xml | 38 ++++---- doc/install-guide/section_ceilometer-nova.xml | 86 ++++++++++++++++--- 2 files changed, 89 insertions(+), 35 deletions(-) diff --git a/doc/install-guide/section_ceilometer-install.xml b/doc/install-guide/section_ceilometer-install.xml index c57a303eb2..b41a30546e 100644 --- a/doc/install-guide/section_ceilometer-install.xml +++ b/doc/install-guide/section_ceilometer-install.xml @@ -71,13 +71,10 @@ Edit the /etc/ceilometer/ceilometer.conf file and change the [database] section: - ... -[database] -... + [database] # The SQLAlchemy connection string used to connect to the # database (string value) -connection = mongodb://ceilometer:CEILOMETER_DBPASS@controller:27017/ceilometer -... +connection = mongodb://ceilometer:CEILOMETER_DBPASS@controller:27017/ceilometer @@ -97,29 +94,34 @@ connection = mongodb://ceilometer:CEILOMETER_DBPASS@< and change the [publisher_rpc] section. Replace CEILOMETER_TOKEN with the results of the openssl command: - ... -[publisher_rpc] -... + [publisher_rpc] # Secret value for signing metering messages (string value) -metering_secret = CEILOMETER_TOKEN -... +metering_secret = CEILOMETER_TOKEN Configure the RabbitMQ access: - # openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT rabbit_host controller + # openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT rabbit_host controller # openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT rabbit_password RABBIT_PASS - Edit the /etc/ceilometer/ceilometer.conf file and update the [DEFAULT] section. + Edit the /etc/ceilometer/ceilometer.conf file and update the [DEFAULT] section: rabbit_host = controller rabbit_password = RABBIT_PASS - Configure collector dispatcher + Configure collector dispatcher: # openstack-config --set /etc/ceilometer/ceilometer.conf \ collector dispatcher database + + Configure the log directory. + Edit the /etc/ceilometer/ceilometer.conf file + and update the [DEFAULT] section: + [DEFAULT] +log_dir = /var/log/ceilometer + + Create a ceilometer user that the Telemetry service uses to authenticate with the Identity @@ -187,16 +189,6 @@ os_password = CEILOMETER_PASS # service ceilometer-agent-central restart # service ceilometer-api restart # service ceilometer-collector restart - - - If log files are not generated for each service automatically, you - should edit the /etc/ceilometer/ceilometer.conf - and change the [DEFAULT] section: - - [DEFAULT] -... -log_dir = /var/log/ceilometer - Start the [DEFAULT] ... -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 - [DEFAULT] +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 + [DEFAULT] ... -notification_driver=nova.openstack.common.notifier.rpc_notifier -notification_driver=ceilometer.compute.nova_notifier +notification_driver = nova.openstack.common.notifier.rpc_notifier +notification_driver = ceilometer.compute.nova_notifier Restart the Compute service: @@ -64,12 +64,74 @@ notification_driver=ceilometer.compute.nova_notifier and change these lines in the [DEFAULT] section. Replace CEILOMETER_TOKEN with the ceilometer token that you created previously: - ... -[publisher_rpc] + [publisher_rpc] # Secret value for signing metering messages (string value) -metering_secret = CEILOMETER_TOKEN -... +metering_secret = CEILOMETER_TOKEN + + + Configure the RabbitMQ access: + # openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT rabbit_host controller +# openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT rabbit_password RABBIT_PASS + Edit the /etc/ceilometer/ceilometer.conf file and update the [DEFAULT] section: + [DEFAULT] +rabbit_host = controller +rabbit_password = RABBIT_PASS + + + + Configure the QPid access: + # openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT qpid_hostname controller + + + + Add the Identity service credentials: + # openstack-config --set /etc/ceilometer/ceilometer.conf \ + keystone_authtoken auth_host controller +# openstack-config --set /etc/ceilometer/ceilometer.conf \ + keystone_authtoken admin_user ceilometer +# openstack-config --set /etc/ceilometer/ceilometer.conf \ + keystone_authtoken admin_tenant_name service +# openstack-config --set /etc/ceilometer/ceilometer.conf \ + keystone_authtoken auth_protocol http +# openstack-config --set /etc/ceilometer/ceilometer.conf \ + keystone_authtoken admin_password CEILOMETER_PASS +# openstack-config --set /etc/ceilometer/ceilometer.conf \ + service_credentials os_username ceilometer +# openstack-config --set /etc/ceilometer/ceilometer.conf \ + service_credentials os_tenant_name service +# openstack-config --set /etc/ceilometer/ceilometer.conf \ + service_credentials os_password CEILOMETER_PASS +# openstack-config --set /etc/ceilometer/ceilometer.conf \ + service_credentials os_auth_url http://controller:5000/v2.0 + Edit the + /etc/ceilometer/ceilometer.conf file + and change the [keystone_authtoken] + section: + [keystone_authtoken] +auth_host = controller +auth_port = 35357 +auth_protocol = http +admin_tenant_name = service +admin_user = ceilometer +admin_password = CEILOMETER_PASS + Also set the + [service_credentials] section: + [service_credentials] +os_auth_url = http://controller:5000/v2.0 +os_username = ceilometer +os_tenant_name = service +os_password = CEILOMETER_PASS + + + + Configure the log directory. + Edit the /etc/ceilometer/ceilometer.conf file + and update the [DEFAULT] section: + [DEFAULT] +log_dir = /var/log/ceilometer + + Restart the service with its new settings: # service ceilometer-agent-compute restart