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

View File

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

View File

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

View File

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

View File

@ -3,20 +3,91 @@
xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0" version="5.0"
xml:id="ceilometer-agent-nova"> xml:id="ceilometer-nova">
<?dbhtml stop-chunking?> <?dbhtml stop-chunking?>
<title>Install the Compute agent for Telemetry</title> <title>Configure the Compute service</title>
<para>Telemetry is composed of an API service, a collector and a range <para>Telemetry uses a combination of notifications and an agent to
of disparate agents. This section explains how to install and configure collect Compute metrics. Perform these steps on each compute node.</para>
the agent that runs on the compute node.</para>
<procedure> <procedure>
<title>To configure prerequisites</title> <title>To install and configure the agent</title>
<step> <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="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="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> <screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-ceilometer-agent-compute</userinput></screen>
</step> </step>
<step>
<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
telemetry secret:</para>
<programlisting language="ini">[publisher]
...
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
<application>RabbitMQ</application> message broker access:</para>
<programlisting language="ini">[DEFAULT]
...
rabbit_host = <replaceable>controller</replaceable>
rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>
<para>Replace <replaceable>RABBIT_PASS</replaceable> with the password
you chose for the guest account in RabbitMQ.</para>
</step>
<step>
<para>In the <literal>[keystone_authtoken]</literal> section,
configure Identity service access:</para>
<programlisting language="ini">[keystone_authtoken]
...
auth_uri = http://<replaceable>controller</replaceable>:5000/v2.0
identity_uri = http://<replaceable>controller</replaceable>:35357
admin_tenant_name = service
admin_user = ceilometer
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 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>
<para>In the <literal>[service_credentials]</literal> section,
configure service credentials:</para>
<programlisting language="ini">[service_credentials]
...
os_auth_url = http://<replaceable>controller</replaceable>:5000/v2.0
os_username = ceilometer
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>
</step>
<step>
<para>(Optional) To assist with troubleshooting,
enable verbose logging in the <literal>[DEFAULT]</literal>
section:</para>
<programlisting language="ini">[DEFAULT]
...
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> <step>
<para>Edit the <filename>/etc/nova/nova.conf</filename> file and <para>Edit the <filename>/etc/nova/nova.conf</filename> file and
configure notifications in the <literal>[DEFAULT]</literal> configure notifications in the <literal>[DEFAULT]</literal>
@ -26,8 +97,26 @@
instance_usage_audit = True instance_usage_audit = True
instance_usage_audit_period = hour instance_usage_audit_period = hour
notify_on_state_change = vm_and_task_state notify_on_state_change = vm_and_task_state
notification_driver = nova.openstack.common.notifier.rpc_notifier notification_driver = messagingv2</programlisting>
notification_driver = ceilometer.compute.nova_notifier</programlisting> </step>
</procedure>
<procedure>
<title>To finalize installation</title>
<step os="ubuntu;debian">
<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 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>
<para os="sles">On SLES:</para>
<screen os="sles"><prompt>#</prompt> <userinput>service openstack-ceilometer-agent-compute start</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-agent-compute on</userinput></screen>
<para os="opensuse">On openSUSE:</para>
<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>
<step> <step>
<para>Restart the Compute service:</para> <para>Restart the Compute service:</para>
@ -39,89 +128,4 @@ notification_driver = ceilometer.compute.nova_notifier</programlisting>
<screen os="opensuse"><prompt>#</prompt> <userinput>systemctl restart openstack-nova-compute.service</userinput></screen> <screen os="opensuse"><prompt>#</prompt> <userinput>systemctl restart openstack-nova-compute.service</userinput></screen>
</step> </step>
</procedure> </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>
<step>
<para>In the <literal>[publisher]</literal> section, configure the
metering 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>
</step>
<step os="centos;fedora;opensuse;rhel;sles;ubuntu">
<para>In the <literal>[DEFAULT]</literal> section, configure
<application>RabbitMQ</application> message broker access:</para>
<programlisting language="ini">[DEFAULT]
...
rabbit_host = <replaceable>controller</replaceable>
rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>
<para>Replace <replaceable>RABBIT_PASS</replaceable> with the password
you chose for the guest account in RabbitMQ.</para>
</step>
<step>
<para>In the <literal>[keystone_authtoken]</literal> section,
configure Identity service access:</para>
<programlisting language="ini">[keystone_authtoken]
...
auth_uri = http://<replaceable>controller</replaceable>:5000/v2.0
identity_uri = http://<replaceable>controller</replaceable>:35357
admin_tenant_name = service
admin_user = ceilometer
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>
</note>
</step>
<step>
<para>In the <literal>[service_credentials]</literal> section,
configure service credentials:</para>
<programlisting language="ini">[service_credentials]
...
os_auth_url = http://<replaceable>controller</replaceable>:5000/v2.0
os_username = ceilometer
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>
</step>
<step>
<para>(Optional) To assist with troubleshooting,
enable verbose logging in the <literal>[DEFAULT]</literal>
section:</para>
<programlisting language="ini">[DEFAULT]
...
verbose = True</programlisting>
</step>
</procedure>
<procedure>
<title>To finalize installation</title>
<step os="ubuntu;debian">
<para>Restart the Telemetry service:</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
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>
<para os="sles">On SLES:</para>
<screen os="sles"><prompt>#</prompt> <userinput>service openstack-ceilometer-agent-compute start</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-agent-compute on</userinput></screen>
<para os="opensuse">On openSUSE:</para>
<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>
</procedure>
</section> </section>

View File

@ -3,61 +3,85 @@
xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0" version="5.0"
xml:id="ceilometer-agent-swift"> xml:id="ceilometer-swift">
<title>Configure the Object Storage service for Telemetry</title> <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> <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> <step>
<para>Install the <package>python-ceilometerclient</package> <para>Source the <literal>admin</literal> credentials to gain
package on your Object Storage proxy server:</para> access to admin-only CLI commands.</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install python-ceilometerclient</userinput></screen> <screen><prompt>$</prompt> <userinput>source admin-openrc.sh</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>
</step> </step>
<step> <step>
<para>To retrieve object store statistics, the Telemetry service <para>Create the <literal>ResellerAdmin</literal> role:</para>
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>
<screen><prompt>$</prompt> <userinput>keystone role-create --name ResellerAdmin</userinput> <screen><prompt>$</prompt> <userinput>keystone role-create --name ResellerAdmin</userinput>
<computeroutput>+----------+----------------------------------+ <computeroutput>+----------+----------------------------------+
| Property | Value | | Property | Value |
+----------+----------------------------------+ +----------+----------------------------------+
| id | 462fa46c13fd4798a95a3bfbe27b5e54 | | id | 462fa46c13fd4798a95a3bfbe27b5e54 |
| name | ResellerAdmin | | 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 \ <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>In the <literal>[pipeline:main]</literal> section, add
<literal>ceilometer</literal>:</para>
<programlisting language="ini">[pipeline:main]
...
pipeline = authtoken cache healthcheck keystoneauth proxy-logging ceilometer proxy-server</programlisting>
</step>
<step>
<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>
<step> <step>
<para>You must also add the Telemetry middleware to Object <para>Add the <literal>swift</literal> system user to the
Storage to handle incoming and outgoing traffic. Add <literal>ceilometer</literal> system group to permit access to the
these lines to the Telemetry configuration files by the Object Storage service:</para>
<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>
<programlisting language="ini">[pipeline:main]
pipeline = healthcheck cache authtoken keystoneauth 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>
</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>
<screen><prompt>#</prompt> <userinput>usermod -a -G ceilometer swift</userinput></screen> <screen><prompt>#</prompt> <userinput>usermod -a -G ceilometer swift</userinput></screen>
</step> </step>
<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="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> <screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>systemctl restart openstack-swift-proxy.service</userinput></screen>
<para os="sles">On SLES:</para> <para os="sles">On SLES:</para>