openstack-manuals/doc/install-guide/section_ceilometer-nova.xml
Gauvain Pocentek 9cb3b161c0 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
2014-01-19 12:18:08 +01:00

149 lines
8.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<section xml:id="ceilometer-install-nova"
xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<?dbhtml-stop-chunking?>
<title>Install the Compute agent for the Telemetry service</title>
<procedure>
<para>OpenStack Telemetry is an API service that provides a
collector and a range of disparate agents. This procedure
details how to install the agent that runs on the compute
node.</para>
<step>
<para>Install the Telemetry service on the Compute node:</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</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-ceilometer-agent-compute</userinput></screen>
</step>
<step>
<para os="fedora;rhel;centos;opensuse;sles">Set the following
options in the <filename>/etc/nova/nova.conf</filename>
file:</para>
<screen os="fedora;rhel;centos;opensuse;sles"><prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT \
instance_usage_audit True</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT \
instance_usage_audit_period hour</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT \
notify_on_state_change vm_and_task_state</userinput></screen>
<note os="fedora;rhel;centos;opensuse;sles">
<para>The <option>notification_driver</option> option is a multi
valued option, which
<application>openstack-config</application> cannot set
properly. See <xref linkend="basics-packages"/>.
</para>
</note>
<para>Edit the
<filename>/etc/nova/nova.conf</filename> file and add the
following lines to the <literal>[DEFAULT]</literal>
section:</para>
<programlisting os="ubuntu;debian" 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>
<programlisting os = "fedora;rhel;centos;opensuse;sles" language="ini">[DEFAULT]
...
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="fedora;rhel;centos;opensuse;sles"><prompt>#</prompt> <userinput>service openstack-nova-compute restart</userinput></screen>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>service nova-compute restart</userinput></screen>
</step>
<step>
<para>You must set the secret key that you defined previously.
The Telemetry service nodes share this key as a shared
secret:</para>
<screen os="fedora;rhel;centos;opensuse;sles"><prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf publisher_rpc metering_secret $CEILOMETER_TOKEN</userinput></screen>
<para os="ubuntu;debian">Edit the
<filename>/etc/ceilometer/ceilometer.conf</filename> file
and change these lines in the <literal>[DEFAULT]</literal>
section. Replace <replaceable>CEILOMETER_TOKEN</replaceable> with
the ceilometer token that you created previously:</para>
<programlisting os="ubuntu;debian" language="ini">[publisher_rpc]
# Secret value for signing metering messages (string value)
metering_secret = <replaceable>CEILOMETER_TOKEN</replaceable></programlisting>
</step>
<step os="opensuse;sles;ubuntu">
<para>Configure the RabbitMQ access:</para>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT rabbit_host controller</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT rabbit_password <replaceable>RABBIT_PASS</replaceable></userinput></screen>
<para os="ubuntu">Edit the <filename>/etc/ceilometer/ceilometer.conf</filename> file and update the <literal>[DEFAULT]</literal> section:</para>
<programlisting os="ubuntu" language="ini">[DEFAULT]
rabbit_host = <replaceable>controller</replaceable>
rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>
</step>
<step os="rhel;centos;fedora">
<para>Configure the QPid access:</para>
<screen><prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT qpid_hostname <replaceable>controller</replaceable></userinput></screen>
</step>
<step>
<para>Add the Identity service credentials:</para>
<screen os="centos;rhel;fedora;opensuse;sles"><prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf \
keystone_authtoken auth_host <replaceable>controller</replaceable></userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf \
keystone_authtoken admin_user ceilometer</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf \
keystone_authtoken admin_tenant_name service</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf \
keystone_authtoken auth_protocol http</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf \
keystone_authtoken admin_password <replaceable>CEILOMETER_PASS</replaceable></userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf \
service_credentials os_username ceilometer</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf \
service_credentials os_tenant_name service</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf \
service_credentials os_password <replaceable>CEILOMETER_PASS</replaceable></userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf \
service_credentials os_auth_url http://<replaceable>controller</replaceable>:5000/v2.0</userinput></screen>
<para os="ubuntu;debian">Edit the
<filename>/etc/ceilometer/ceilometer.conf</filename> file
and change the <literal>[keystone_authtoken]</literal>
section:</para>
<programlisting os="ubuntu;debian" language="ini">[keystone_authtoken]
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = ceilometer
admin_password = <replaceable>CEILOMETER_PASS</replaceable></programlisting>
<para os="ubuntu;debian">Also set the
<literal>[service_credentials]</literal> section:</para>
<programlisting os="ubuntu;debian" 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></programlisting>
</step>
<step os="ubuntu">
<para>Configure the log directory.</para>
<para>Edit the <filename>/etc/ceilometer/ceilometer.conf</filename> file
and update the <literal>[DEFAULT]</literal> section:</para>
<programlisting os="ubuntu" language="ini">[DEFAULT]
log_dir = /var/log/ceilometer</programlisting>
</step>
<step os="ubuntu;debian">
<para>Restart the service with its new settings:</para>
<screen><prompt>#</prompt> <userinput>service ceilometer-agent-compute restart</userinput></screen>
</step>
<step os="rhel;fedora;centos;opensuse;sles">
<para>Start the service and configure it to start when the
system boots:</para>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>service openstack-ceilometer-agent-compute start</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-agent-compute on</userinput></screen>
<screen os="rhel;fedora;centos"><prompt>#</prompt> <userinput>service openstack-ceilometer-compute start</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-compute on</userinput></screen>
</step>
</procedure>
</section>