Merge "update ceilometer install guide and external service configuration"

This commit is contained in:
Jenkins 2015-03-13 04:04:53 +00:00 committed by Gerrit Code Review
commit 25cbf1e7fc
6 changed files with 219 additions and 199 deletions

View File

@ -9,25 +9,19 @@
<para>
<itemizedlist>
<listitem>
<para>Efficiently collects the metering data about the CPU
and network costs.</para>
<para>Efficiently polls metering data related to OpenStack
services.</para>
</listitem>
<listitem>
<para>Collects data by monitoring notifications sent from
services or by polling the infrastructure.</para>
<para>Collects event and metering data by monitoring notifications
sent from services.</para>
</listitem>
<listitem>
<para>Configures the type of collected data to meet
various operating requirements. It accesses and inserts the
metering data through the REST API.</para>
<para>Publishes collected data to various targets including data
stores and message queues.</para>
</listitem>
<listitem>
<para>Expands the framework to collect custom usage data
by additional plug-ins.</para>
</listitem>
<listitem>
<para>Produces signed metering messages that cannot be
repudiated.</para>
<para>Creates alarms when collected data breaks defined rules.</para>
</listitem>
</itemizedlist>
</para>
@ -45,21 +39,19 @@
>ceilometer-agent-central</systemitem>)</term>
<listitem><para>Runs on a central management server to poll for
resource utilization statistics for resources not tied to instances
or compute nodes.</para></listitem>
or compute nodes. Multiple agents can be started to scale service
horizontally.</para></listitem>
</varlistentry>
<varlistentry><term>A notification agent (<systemitem class="service"
>ceilometer-agent-notification</systemitem>)</term>
<listitem><para>Runs on a central management server to initiate
alarm actions, such as calling out to a webhook with a description
of the alarm state transition.</para></listitem>
<listitem><para>Runs on a central management server(s) and consumes
messages from the message queue(s) to build event and metering data.
</para></listitem>
</varlistentry>
<varlistentry><term>A collector (<systemitem class="service"
>ceilometer-collector</systemitem>)</term>
<listitem><para>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
<listitem><para>Runs on central management server(s) and dispatches
collected telemetry data to a data store or external consumer
without modification.</para>
</listitem>
</varlistentry>
@ -75,12 +67,6 @@
allow alarms to be set based on the threshold evaluation for a
collection of samples.</para></listitem>
</varlistentry>
<varlistentry>
<term>A data store</term>
<listitem><para>A database capable of handling
concurrent writes (from one or more collector instances)
and reads (from the API server).</para></listitem>
</varlistentry>
<varlistentry>
<term>An API server (<systemitem
class="service">ceilometer-api</systemitem>)</term>

View File

@ -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">
<?dbhtml stop-chunking?>
<title>Add the Block Storage service agent for Telemetry</title>
<title>Configure the Block Storage service</title>
<para>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.</para>
<procedure>
<title>To configure prerequisites</title>
<para>Edit the <filename>/etc/cinder/cinder.conf</filename> file
and complete the following actions:</para>
<step>
<para>To retrieve volume samples, you must configure the Block
Storage service to send notifications to the bus.</para>
<para>Edit <filename>/etc/cinder/cinder.conf</filename>
and add in the <literal>[DEFAULT]</literal> section on the controller
and volume nodes:</para>
<programlisting language="ini">control_exchange = cinder
notification_driver = cinder.openstack.common.notifier.rpc_notifier</programlisting>
<para>In the <literal>[DEFAULT]</literal> section, configure
notifications:</para>
<programlisting language="ini">[DEFAULT]
...
control_exchange = cinder
notification_driver = messagingv2</programlisting>
</step>
<step>
<para>Restart the Block Storage services with their new
settings.</para>
<para>On the controller node:</para>
<para>Restart the Block Storage services on the controller node:</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>service cinder-api restart</userinput>
<prompt>#</prompt> <userinput>service cinder-scheduler restart</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>systemctl restart openstack-cinder-api.service openstack-cinder-scheduler.service</userinput></screen>
@ -28,7 +32,9 @@ notification_driver = cinder.openstack.common.notifier.rpc_notifier</programlist
<prompt>#</prompt> <userinput>service openstack-cinder-scheduler restart</userinput></screen>
<para os="opensuse">On openSUSE:</para>
<screen os="opensuse"><prompt>#</prompt> <userinput>systemctl restart openstack-cinder-api.service openstack-cinder-scheduler.service</userinput></screen>
<para>On the storage node:</para>
</step>
<step>
<para>Restart the Block Storage services on the storage nodes:</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>service cinder-volume restart</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>systemctl restart openstack-cinder-volume.service</userinput></screen>
<para os="sles">On SLES:</para>
@ -37,9 +43,9 @@ notification_driver = cinder.openstack.common.notifier.rpc_notifier</programlist
<screen os="opensuse"><prompt>#</prompt> <userinput>systemctl restart openstack-cinder-volume.service</userinput></screen>
</step>
<step>
<para>If you want to collect OpenStack Block Storage notification on demand,
you can use <command>cinder-volume-usage-audit</command> from OpenStack Block Storage.
For more information, <link xlink:href="http://docs.openstack.org/admin-guide-cloud/content/section_telemetry-cinder-audit-script.html"
<para>Use the <command>cinder-volume-usage-audit</command> command to
retrieve metrics on demand. For more information, see
<link xlink:href="http://docs.openstack.org/admin-guide-cloud/content/section_telemetry-cinder-audit-script.html"
><citetitle>Block Storage audit script setup to get notifications</citetitle></link>.</para>
</step>
</procedure>

View File

@ -203,7 +203,7 @@ connecting to: controller:27017/test
openstack-ceilometer-alarm-evaluator openstack-ceilometer-alarm-notifier</userinput></screen>
</step>
<step>
<para>Generate a random value to use as the metering secret:</para>
<para>Generate a random value to use as the telemetry secret:</para>
<screen os="ubuntu;rhel;centos;fedora"><prompt>$</prompt> <userinput>openssl rand -hex 10</userinput></screen>
<screen os="sles;opensuse"><prompt>$</prompt> <userinput>openssl rand 10 | hexdump -e '1/1 "%.2x"'</userinput></screen>
</step>
@ -274,12 +274,12 @@ os_password = <replaceable>CEILOMETER_PASS</replaceable></programlisting>
</step>
<step>
<para>In the <literal>[publisher]</literal> section, configure
the metering secret:</para>
the telemetry secret:</para>
<programlisting language="ini">[publisher]
...
metering_secret = <replaceable>METERING_SECRET</replaceable></programlisting>
<para>Replace <replaceable>METERING_SECRET</replaceable> with the
metering secret that you generated in a previous step.</para>
telemetry_secret = <replaceable>TELEMETRY_SECRET</replaceable></programlisting>
<para>Replace <replaceable>TELEMETRY_SECRET</replaceable> with the
telemetry secret that you generated in a previous step.</para>
</step>
<step os="opensuse;sles">
<para>In the <literal>[collector]</literal> section, configure the
@ -320,7 +320,7 @@ verbose = True</programlisting>
credentials</link>.</para>
</step>
<step>
<para>Generate a random value to use as the metering secret:</para>
<para>Generate a random value to use as the telemetry secret:</para>
<screen><prompt>$</prompt> <userinput>openssl rand -hex 10</userinput></screen>
</step>
<step>
@ -329,12 +329,12 @@ verbose = True</programlisting>
<substeps>
<step>
<para>In the <literal>[publisher]</literal> section, configure
the metering secret:</para>
the telemetry secret:</para>
<programlisting language="ini">[publisher]
...
metering_secret = <replaceable>METERING_SECRET</replaceable></programlisting>
<para>Replace <replaceable>METERING_SECRET</replaceable> with the
metering secret that you generated in a previous step.</para>
telemetry_secret = <replaceable>TELEMETRY_SECRET</replaceable></programlisting>
<para>Replace <replaceable>TELEMETRY_SECRET</replaceable> with the
telemetry secret that you generated in a previous step.</para>
</step>
<step>
<para>In the <literal>[service_credentials]</literal>

View File

@ -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">
<title>Configure the Image Service for Telemetry</title>
xml:id="ceilometer-glance">
<title>Configure the Image Service</title>
<para>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.</para>
<procedure>
<title>To configure prerequisites</title>
<para>To retrieve image samples, you must configure the Image
Service to send notifications to the message broker. Edit the
<filename>/etc/glance/glance-api.conf</filename> and
<filename>/etc/glance/glance-registry.conf</filename> files and
<para>Edit the <filename>/etc/glance/glance-api.conf</filename>
and <filename>/etc/glance/glance-registry.conf</filename> files and
complete the following actions:</para>
<step>
<para>In the <literal>[DEFAULT]</literal> section, configure
notifications and RabbitMQ message broker access:</para>
<programlisting language="ini">[DEFAULT]
...
notification_driver = messaging
notification_driver = messagingv2
rpc_backend = rabbit
rabbit_host = <replaceable>controller</replaceable>
rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>

View File

@ -3,54 +3,31 @@
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">
<?dbhtml stop-chunking?>
<title>Install the Compute agent for Telemetry</title>
<para>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.</para>
<title>Configure the Compute service</title>
<para>Telemetry uses a combination of notifications and an agent to
collect Compute metrics. Perform these steps on each compute node.</para>
<procedure>
<title>To configure prerequisites</title>
<title>To install and configure the agent</title>
<step>
<para>Install the package:</para>
<para>Install the packages:</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install ceilometer-agent-compute</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install openstack-ceilometer-compute python-ceilometerclient python-pecan</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-ceilometer-agent-compute</userinput></screen>
</step>
<step>
<para>Edit the <filename>/etc/nova/nova.conf</filename> file and
configure notifications in the <literal>[DEFAULT]</literal>
section:</para>
<programlisting language="ini">[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</programlisting>
</step>
<step>
<para>Restart the Compute service:</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>service nova-compute restart</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>systemctl restart openstack-nova-compute.service</userinput></screen>
<para os="sles">On SLES:</para>
<screen os="sles"><prompt>#</prompt> <userinput>service openstack-nova-compute restart</userinput></screen>
<para os="opensuse">On openSUSE:</para>
<screen os="opensuse"><prompt>#</prompt> <userinput>systemctl restart openstack-nova-compute.service</userinput></screen>
</step>
</procedure>
<procedure>
<title>To configure the Compute agent for Telemetry</title>
<para>Edit the <filename>/etc/ceilometer/ceilometer.conf</filename>
file and complete the following actions:</para>
<substeps>
<step>
<para>In the <literal>[publisher]</literal> section, configure the
metering secret:</para>
telemetry secret:</para>
<programlisting language="ini">[publisher]
...
metering_secret = <replaceable>METERING_SECRET</replaceable></programlisting>
<para>Replace <replaceable>METERING_SECRET</replaceable> with
the metering secret you chose for the Telemetry module.</para>
telemetry_secret = <replaceable>TELEMETRY_SECRET</replaceable></programlisting>
<para>Replace <replaceable>TELEMETRY_SECRET</replaceable> with
the telemetry secret you chose for the Telemetry module.</para>
</step>
<step os="centos;fedora;opensuse;rhel;sles;ubuntu">
<para>In the <literal>[DEFAULT]</literal> section, configure
@ -75,10 +52,10 @@ admin_password = <replaceable>CEILOMETER_PASS</replaceable></programlisting>
<para>Replace <replaceable>CEILOMETER_PASS</replaceable> with the
password you chose for the Telemetry module database.</para>
<note>
<para>Comment out the <literal>auth_host</literal>,
<literal>auth_port</literal>, and <literal>auth_protocol</literal>
keys, since they are replaced by the <literal>identity_uri</literal>
and <literal>auth_uri</literal> keys.</para>
<para>Comment out any <literal>auth_host</literal>,
<literal>auth_port</literal>, and
<literal>auth_protocol</literal> options because the
<literal>identity_uri</literal> option replaces them.</para>
</note>
</step>
<step>
@ -92,9 +69,9 @@ os_tenant_name = service
os_password = <replaceable>CEILOMETER_PASS</replaceable>
os_endpoint_type = internalURL
os_region_name = regionOne</programlisting>
<para>Replace <replaceable>CEILOMETER_PASS</replaceable> with the password
you chose for the <literal>ceilometer</literal> user in the Identity
service.</para>
<para>Replace <replaceable>CEILOMETER_PASS</replaceable> with the
password you chose for the <literal>ceilometer</literal> user in
the Identity service.</para>
</step>
<step>
<para>(Optional) To assist with troubleshooting,
@ -104,15 +81,33 @@ os_region_name = regionOne</programlisting>
...
verbose = True</programlisting>
</step>
</substeps>
</step>
</procedure>
<procedure>
<title>To configure notifications</title>
<para>Configure the Compute service to send notifications to the
message bus.</para>
<step>
<para>Edit the <filename>/etc/nova/nova.conf</filename> file and
configure notifications in the <literal>[DEFAULT]</literal>
section:</para>
<programlisting language="ini">[DEFAULT]
...
instance_usage_audit = True
instance_usage_audit_period = hour
notify_on_state_change = vm_and_task_state
notification_driver = messagingv2</programlisting>
</step>
</procedure>
<procedure>
<title>To finalize installation</title>
<step os="ubuntu;debian">
<para>Restart the Telemetry service:</para>
<para>Restart the agent:</para>
<screen><prompt>#</prompt> <userinput>service ceilometer-agent-compute restart</userinput></screen>
</step>
<step os="rhel;centos;fedora;sles;opensuse">
<para>Start the Telemetry service and configure it to start when the
<para>Start the Telemetry agent and configure it to start when the
system boots:</para>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>systemctl enable openstack-ceilometer-compute.service</userinput>
<prompt>#</prompt> <userinput>systemctl start openstack-ceilometer-compute.service</userinput></screen>
@ -123,5 +118,14 @@ verbose = True</programlisting>
<screen os="opensuse"><prompt>#</prompt> <userinput>systemctl enable openstack-ceilometer-compute.service</userinput>
<prompt>#</prompt> <userinput>systemctl start openstack-ceilometer-compute.service</userinput></screen>
</step>
<step>
<para>Restart the Compute service:</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>service nova-compute restart</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>systemctl restart openstack-nova-compute.service</userinput></screen>
<para os="sles">On SLES:</para>
<screen os="sles"><prompt>#</prompt> <userinput>service openstack-nova-compute restart</userinput></screen>
<para os="opensuse">On openSUSE:</para>
<screen os="opensuse"><prompt>#</prompt> <userinput>systemctl restart openstack-nova-compute.service</userinput></screen>
</step>
</procedure>
</section>

View File

@ -3,61 +3,85 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0"
xml:id="ceilometer-agent-swift">
<title>Configure the Object Storage service for Telemetry</title>
xml:id="ceilometer-swift">
<title>Configure the Object Storage service</title>
<para>To retrieve storage-oriented events and samples, configure the
Object Storage service to send notifications to the message bus.</para>
<procedure>
<title>To configure prerequisites</title>
<para>The Telemetry service requires access to the Object Storage
service using the <literal>ResellerAdmin</literal> role. Perform
these steps on the controller node.</para>
<step>
<para>Install the <package>python-ceilometerclient</package>
package on your Object Storage proxy server:</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install python-ceilometerclient</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install python-ceilometerclient</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install python-ceilometerclient</userinput></screen>
<para>Source the <literal>admin</literal> credentials to gain
access to admin-only CLI commands.</para>
<screen><prompt>$</prompt> <userinput>source admin-openrc.sh</userinput></screen>
</step>
<step>
<para>To retrieve object store statistics, the Telemetry service
needs access to Object Storage with the
<literal>ResellerAdmin</literal> role. Give this role to
your <literal>os_username</literal> user for the
<literal>os_tenant_name</literal> tenant:</para>
<para>Create the <literal>ResellerAdmin</literal> role:</para>
<screen><prompt>$</prompt> <userinput>keystone role-create --name ResellerAdmin</userinput>
<computeroutput>+----------+----------------------------------+
| Property | Value |
+----------+----------------------------------+
| id | 462fa46c13fd4798a95a3bfbe27b5e54 |
| name | ResellerAdmin |
+----------+----------------------------------+
</computeroutput></screen>
+----------+----------------------------------+</computeroutput></screen>
</step>
<step>
<para>Add the <literal>ResellerAdmin</literal> role to the
<literal>service</literal> tenant and <literal>ceilometer</literal>
user:</para>
<screen><prompt>$</prompt> <userinput>keystone user-role-add --tenant service --user ceilometer \
--role <replaceable>462fa46c13fd4798a95a3bfbe27b5e54</replaceable></userinput></screen>
--role 462fa46c13fd4798a95a3bfbe27b5e54</userinput></screen>
</step>
</procedure>
<procedure>
<title>To configure notifications</title>
<para>Perform these steps on the controller and any other nodes that
run the Object Storage proxy service.</para>
<step>
<para>Edit the <filename>/etc/swift/proxy-server.conf</filename> file
and complete the following actions:</para>
<substeps>
<step>
<para>In the <literal>[filter:keystoneauth]</literal> section,
add the <literal>ResellerAdmin</literal> role:</para>
<programlisting language="ini">[filter:keystoneauth]
...
operator_roles = admin,_member_,ResellerAdmin</programlisting>
</step>
<step>
<para>You must also add the Telemetry middleware to Object
Storage to handle incoming and outgoing traffic. Add
these lines to the
<filename>/etc/swift/proxy-server.conf</filename>
file:</para>
<programlisting language="ini">[filter:ceilometer]
use = egg:ceilometer#swift</programlisting>
</step>
<step>
<para>Add <literal>ceilometer</literal> to the
<literal>pipeline</literal> parameter of that same file:</para>
<para>In the <literal>[pipeline:main]</literal> section, add
<literal>ceilometer</literal>:</para>
<programlisting language="ini">[pipeline:main]
pipeline = healthcheck cache authtoken keystoneauth ceilometer proxy-server</programlisting>
...
pipeline = authtoken cache healthcheck keystoneauth proxy-logging ceilometer proxy-server</programlisting>
</step>
<step>
<para>Add <literal>ResellerAdmin</literal> to the
<literal>operator_roles</literal> parameter of that same file:</para>
<programlisting language="ini">operator_roles = Member,admin,swiftoperator,_member_,ResellerAdmin</programlisting>
<para>In the <literal>[filter:ceilometer]</literal> section, configure
notifications:</para>
<programlisting language="ini">[filter:ceilometer]
...
paste.filter_factory = ceilometermiddleware.swift:filter_factory
control_exchange = swift
url = rabbit://guest:<replaceable>RABBIT_PASS</replaceable>@<replaceable>controller></replaceable>:5672/
driver = messagingv2
topic = notifications
log_level = WARN</programlisting>
<para>Replace <replaceable>RABBIT_PASS</replaceable> with the
password you chose for the <literal>guest</literal> account in
<application>RabbitMQ</application>.</para>
</step>
</substeps>
</step>
<step>
<para>Add the system user <literal>swift</literal> to the system group
<literal>ceilometer</literal> to give Object Storage access to the
<filename>ceilometer.conf</filename> file.</para>
<para>Add the <literal>swift</literal> system user to the
<literal>ceilometer</literal> system group to permit access to the
Telemetry configuration files by the Object Storage service:</para>
<screen><prompt>#</prompt> <userinput>usermod -a -G ceilometer swift</userinput></screen>
</step>
<step>
<para>Restart the service with its new settings:</para>
<para>Restart the Object Storage proxy service:</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>service swift-proxy restart</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>systemctl restart openstack-swift-proxy.service</userinput></screen>
<para os="sles">On SLES:</para>