Improve install guide ceilometer controller

I improved the ceilometer controller section in the installation
guide as follows:

1) Renamed file and XML IDs to agree with similar content.
2) Reordered instructions.

Implements: blueprint installation-guide-improvements
Co-Authored-By: Matt Kassawara <mkassawara@gmail.com>

Change-Id: I13644b0d4f244be3018d13f3fb5544287277770c
This commit is contained in:
darrenchan 2014-09-03 16:53:09 +10:00 committed by Matthew Kassawara
parent 304e8f39c2
commit 0ed6255be0
3 changed files with 355 additions and 288 deletions

View File

@ -9,7 +9,7 @@
the OpenStack cloud. It is also known as the ceilometer
project.</para>
<xi:include href="../common/section_getstart_telemetry.xml"/>
<xi:include href="section_ceilometer-install.xml"/>
<xi:include href="section_ceilometer-controller.xml"/>
<xi:include href="section_ceilometer-nova.xml"/>
<xi:include href="section_ceilometer-glance.xml"/>
<xi:include href="section_ceilometer-cinder.xml"/>

View File

@ -0,0 +1,354 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter [
<!ENTITY % openstack SYSTEM "../common/entities/openstack.ent">
%openstack;
]>
<section 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"
xml:id="ceilometer-controller-install">
<title>Install and configure controller node</title>
<para>This section describes how to install and configure the Telemetry
module, code-named ceilometer, on the controller node. The Telemetry
module uses separate agents to collect measurements from each OpenStack
service in your environment.</para>
<procedure os="ubuntu;rhel;centos;fedora;sles;opensuse">
<title>To configure prerequisites</title>
<para>Before you install and configure Telemetry, you must install
<application>MongoDB</application>, create a MongoDB database, and
create Identity service credentials including endpoints.</para>
<step>
<para>Install the MongoDB package:</para>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install mongodb-server mongodb</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install mongodb</userinput></screen>
<screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install mongodb-server</userinput></screen>
</step>
<step>
<para>Edit the <filename>/etc/mongodb.conf</filename> file and
complete the following actions:</para>
<substeps>
<step>
<para>Configure the <literal>bind_ip</literal> key to use the
management interface IP address of the controller node.</para>
<programlisting language="ini">bind_ip = 10.0.0.11</programlisting>
</step>
<step>
<para>By default, MongoDB creates several 1&nbsp;GB journal files
in the <filename>/var/lib/mongodb/journal</filename>
directory. If you want to reduce the size of each journal file
to 128&nbsp;MB and limit total journal space consumption to
512&nbsp;MB, assert the <literal>smallfiles</literal> key:</para>
<programlisting language="ini">smallfiles = true</programlisting>
<para os="ubuntu">If you change the journaling configuration,
stop the MongoDB service, remove the initial journal files, and
start the service:</para>
<screen os="ubuntu"><prompt>#</prompt> <userinput>service mongodb stop</userinput>
<prompt>#</prompt> <userinput>rm /var/lib/mongodb/journal/prealloc.*</userinput>
<prompt>#</prompt> <userinput>service mongodb start</userinput></screen>
<para>You can also disable journaling. For more information, see
the <link xlink:href="http://docs.mongodb.org/manual/"
>MongoDB manual</link>.</para>
</step>
<step os="ubuntu">
<para>Restart the MongoDB service:</para>
<screen><prompt>#</prompt> <userinput>service mongodb restart</userinput></screen>
</step>
<step os="centos;fedora;opensuse;rhel;sles">
<para>Start the MongoDB services and configure them to start when
the system boots:</para>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>service mongodb start</userinput>
<prompt>#</prompt> <userinput>chkconfig mongodb on</userinput></screen>
<!-- NB: The use of mongod, and not mongodb, in the below screen is
intentional. -->
<screen os="centos;fedora;rhel"><prompt>#</prompt> <userinput>service mongod start</userinput>
<prompt>#</prompt> <userinput>chkconfig mongod on</userinput></screen>
</step>
</substeps>
</step>
<step>
<para>Create the <literal>ceilometer</literal> database:</para>
<screen><prompt>#</prompt> <userinput>mongo --host <replaceable>controller</replaceable> --eval '
db = db.getSiblingDB("ceilometer");
db.addUser({user: "ceilometer",
pwd: "<replaceable>CEILOMETER_DBPASS</replaceable>",
roles: [ "readWrite", "dbAdmin" ]})'</userinput></screen>
<para>Replace <replaceable>CEILOMETER_DBPASS</replaceable> with a
suitable password.</para>
</step>
<step>
<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 create the Identity service credentials:</para>
<substeps>
<step>
<para>Create the <literal>ceilometer</literal> user:</para>
<screen><prompt>$</prompt> <userinput>keystone user-create --name ceilometer --pass <replaceable>CEILOMETER_PASS</replaceable> --email <replaceable>EMAIL_ADDRESS</replaceable></userinput></screen>
<para>Replace <replaceable>CEILOMETER_PASS</replaceable> with a
suitable password and <replaceable>EMAIL_ADDRESS</replaceable> with
a suitable e-mail address.</para>
</step>
<step>
<para>Link the <literal>ceilometer</literal> user to the
<literal>service</literal> tenant and <literal>admin</literal>
role:</para>
<screen><prompt>$</prompt> <userinput>keystone user-role-add --user ceilometer --tenant service --role admin</userinput></screen>
</step>
<step>
<para>Create the <literal>ceilometer</literal> service:</para>
<screen><prompt>$</prompt> <userinput>keystone service-create --name ceilometer --type metering \
--description "Telemetry"</userinput></screen>
</step>
<step>
<para>Create the Identity service endpoints:</para>
<screen><prompt>$</prompt> <userinput>keystone endpoint-create \
--service-id $(keystone service-list | awk '/ metering / {print $2}') \
--publicurl http://<replaceable>controller</replaceable>:8777 \
--internalurl http://<replaceable>controller</replaceable>:8777 \
--adminurl http://<replaceable>controller</replaceable>:8777</userinput></screen>
</step>
</substeps>
</step>
</procedure>
<procedure os="debian">
<title>To configure prerequisites</title>
<para>Before you install and configure Telemetry, you must install
<application>MongoDB</application>.</para>
<step>
<para>Install the MongoDB package:</para>
<screen><prompt>#</prompt> <userinput>apt-get install mongodb-server</userinput></screen>
</step>
<step>
<para>Edit the <filename>/etc/mongodb.conf</filename> file and
complete the following actions:</para>
<substeps>
<step>
<para>Configure the <literal>bind_ip</literal> key to use the
management interface IP address of the controller node.</para>
<programlisting language="ini">bind_ip = 10.0.0.11</programlisting>
</step>
<step>
<para>By default, MongoDB creates several 1&nbsp;GB journal files
in the <filename>/var/lib/mongodb/journal</filename>
directory. If you want to reduce the size of each journal file
to 128&nbsp;MB and limit total journal space consumption to
512&nbsp;MB, assert the <literal>smallfiles</literal> key:</para>
<programlisting language="ini">smallfiles = true</programlisting>
<para>If you change the journaling configuration, stop the MongoDB
service, remove the initial journal files, and start the
service:</para>
<screen><prompt>#</prompt> <userinput>service mongodb stop</userinput>
<prompt>#</prompt> <userinput>rm /var/lib/mongodb/journal/prealloc.*</userinput>
<prompt>#</prompt> <userinput>service mongodb start</userinput></screen>
<para>You can also disable journaling. For more information, see
the <link xlink:href="http://docs.mongodb.org/manual/"
>MongoDB manual</link>.</para>
</step>
<step>
<para>Restart the MongoDB service:</para>
<screen><prompt>#</prompt> <userinput>service mongodb restart</userinput></screen>
</step>
</substeps>
</step>
</procedure>
<procedure os="ubuntu;rhel;centos;fedora;sles;opensuse">
<title>To install and configure the Telemetry module components</title>
<step>
<para>Install the packages:</para>
<screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install ceilometer-api ceilometer-collector ceilometer-agent-central \
ceilometer-agent-notification ceilometer-alarm-evaluator ceilometer-alarm-notifier \
python-ceilometerclient</userinput></screen>
<screen os="centos;fedora;rhel"><prompt>#</prompt> <userinput>yum install openstack-ceilometer-api openstack-ceilometer-collector \
openstack-ceilometer-notification openstack-ceilometer-central openstack-ceilometer-alarm \
python-ceilometerclient</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-ceilometer-api openstack-ceilometer-collector \
openstack-ceilometer-agent-notification openstack-ceilometer-agent-central python-ceilometerclient \
openstack-ceilometer-alarm-evaluator openstack-ceilometer-alarm-notifier</userinput></screen>
</step>
<step>
<para>Generate a random value to use as the metering 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>
<step>
<para>Edit the <filename>/etc/ceilometer/ceilometer.conf</filename> file
and complete the following actions:</para>
<substeps>
<step>
<para>In the <literal>[database]</literal> section,
configure database access:</para>
<programlisting language="ini">[database]
...
connection = mongodb://ceilometer:<replaceable>CEILOMETER_DBPASS</replaceable>@<replaceable>controller</replaceable>:27017/ceilometer</programlisting>
<para>Replace <replaceable>CEILOMETER_DBPASS</replaceable> with
the password you chose for the Telemetry module database.</para>
</step>
<step>
<para>In the <literal>[DEFAULT]</literal> section, configure
<application>RabbitMQ</application> message broker access:</para>
<programlisting language="ini">[DEFAULT]
...
rpc_backend = rabbit
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 <literal>guest</literal> account in
<application>RabbitMQ</application>.</para>
</step>
<step>
<para>In the <literal>[DEFAULT]</literal> and
<literal>[keystone_authtoken]</literal> sections, configure
Identity service access:</para>
<programlisting language="ini">[DEFAULT]
...
auth_strategy = keystone
[keystone_authtoken]
...
auth_uri = http://<replaceable>controller</replaceable>:5000/v2.0
auth_host = <replaceable>controller</replaceable>
auth_port = 35357
auth_protocol = http
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 <literal>celiometer</literal>
user in the Identity service.</para>
</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></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>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
random value that you generated in a previous step.</para>
</step>
<step os="ubuntu">
<para>In the <literal>[DEFAULT]</literal> section, configure the log
directory:</para>
<programlisting language="ini">[DEFAULT]
...
log_dir = /var/log/ceilometer</programlisting>
</step>
<step os="opensuse;sles">
<para>In the <literal>[collector]</literal> section, configure the
dispatcher:</para>
<!-- should this be 'dispatcher = database' ? -->
<programlisting language="ini">[collector]
...
dispatcher = database</programlisting>
</step>
</substeps>
</step>
</procedure>
<procedure os="debian">
<title>To install and configure the Telemetry module components</title>
<step>
<para>Install the packages:</para>
<screen><prompt>#</prompt> <userinput>apt-get install ceilometer-api ceilometer-collector ceilometer-agent-central \
ceilometer-agent-notification ceilometer-alarm-evaluator ceilometer-alarm-notifier \
python-ceilometerclient</userinput></screen>
</step>
<step>
<para>Respond to prompts for
<link linkend="debconf-dbconfig-common">database management</link>,
<link linkend="debconf-keystone_authtoken">Identity service
credentials</link>,
<link linkend="debconf-api-endpoints">service endpoint
registration</link>, and
<link linkend="debconf-rabbitmq">message broker
credentials</link>.</para>
</step>
<step>
<para>Generate a random value to use as the metering secret:</para>
<screen><prompt>#</prompt> <userinput>openssl rand -hex 10</userinput></screen>
</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 metering secret:</para>
<programlisting language="ini">[publisher]
...
metering_secret = <replaceable>METERING_SECRET</replaceable></programlisting>
<para>Replace <replaceable>METERING_SECRET</replaceable> with the
random value that you generated in a previous step.</para>
</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></programlisting>
<para>Replace <replaceable>CEILOMETER_PASS</replaceable> with
the password you chose for the <literal>ceilometer</literal>
user in the Identity service.</para>
</step>
</substeps>
</step>
</procedure>
<procedure>
<title>To finalize installation</title>
<step os="ubuntu;debian">
<para>Restart the Telemetry services:</para>
<screen><prompt>#</prompt> <userinput>service ceilometer-agent-central restart</userinput>
<prompt>#</prompt> <userinput>service ceilometer-agent-notification restart</userinput>
<prompt>#</prompt> <userinput>service ceilometer-api restart</userinput>
<prompt>#</prompt> <userinput>service ceilometer-collector restart</userinput>
<prompt>#</prompt> <userinput>service ceilometer-alarm-evaluator restart</userinput>
<prompt>#</prompt> <userinput>service ceilometer-alarm-notifier restart</userinput></screen>
</step>
<step os="rhel;centos;fedora;sles;opensuse">
<para>Start the Telemetry services and configure them to start when the
system boots:</para>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>service openstack-ceilometer-api start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-notification start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-central start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-collector start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-alarm-evaluator start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-alarm-notifier start</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-api on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-notification on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-central on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-collector on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-alarm-evaluator on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-alarm-notifier on</userinput></screen>
<screen os="sles;opensuse"><prompt>#</prompt> <userinput>service openstack-ceilometer-api start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-agent-notification start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-agent-central start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-collector start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-alarm-evaluator start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-alarm-notifier start</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-api on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-agent-notification on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-agent-central on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-collector on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-alarm-evaluator on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-alarm-notifier on</userinput></screen>
</step>
</procedure>
</section>

View File

@ -1,287 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter [
<!ENTITY % openstack SYSTEM "../common/entities/openstack.ent">
%openstack;
]>
<section 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"
xml:id="ceilometer-install">
<title>Install the Telemetry module</title>
<procedure>
<para>Telemetry provides an API service that
provides a collector and a range of disparate agents. Before
you can install these agents on nodes such as the compute
node, you must use this procedure to install the core
components on the controller node.</para>
<step>
<para>Install the Telemetry service on the controller
node:</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install ceilometer-api ceilometer-collector ceilometer-agent-central \
ceilometer-agent-notification ceilometer-alarm-evaluator ceilometer-alarm-notifier python-ceilometerclient</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install openstack-ceilometer-api openstack-ceilometer-collector \
openstack-ceilometer-notification openstack-ceilometer-central openstack-ceilometer-alarm \
python-ceilometerclient</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-ceilometer-api openstack-ceilometer-collector \
openstack-ceilometer-agent-notification openstack-ceilometer-agent-central python-ceilometerclient \
openstack-ceilometer-alarm-evaluator openstack-ceilometer-alarm-notifier</userinput></screen>
</step>
<step os="debian">
<para>Respond to the prompts for <link
linkend="debconf-keystone_authtoken"
><literal>[keystone_authtoken]</literal> settings</link>,
<link linkend="debconf-rabbitmq">RabbitMQ credentials</link>
and <link linkend="debconf-api-endpoints">API endpoint</link>
registration.</para>
</step>
<step>
<para>The Telemetry service uses a database to store information.
Specify the location of the database in the configuration
file. The examples use a MongoDB database on the controller
node:</para>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install mongodb-server mongodb</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install mongodb</userinput></screen>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install mongodb-server</userinput></screen>
<note>
<para>
By default MongoDB is configured to create several 1&nbsp;GB files
in the <filename>/var/lib/mongodb/journal/</filename> directory
to support database journaling.
</para>
<para>
If you need to minimize the space allocated to support
database journaling then set the <option>smallfiles</option>
configuration key to <literal>true</literal> in the
<filename>/etc/mongodb.conf</filename> configuration
file. This configuration reduces the size of each journaling
file to 512&nbsp;MB.
</para>
<para os="ubuntu;debian">
As the files are created the first time the MongoDB service starts
you must stop the service and remove the files for this change to
take effect:
</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>service mongodb stop</userinput>
<prompt>#</prompt> <userinput>rm /var/lib/mongodb/journal/prealloc.*</userinput>
<prompt>#</prompt> <userinput>service mongodb start</userinput></screen>
<para>
For more information on the <option>smallfiles</option>
configuration key refer to the MongoDB documentation at
<link xlink:href="http://docs.mongodb.org/manual/reference/configuration-options/#smallfiles"/>.
</para>
<para>
For instructions detailing the steps to disable database journaling
entirely refer to
<link xlink:href="http://docs.mongodb.org/manual/tutorial/manage-journaling/"/>.
</para>
</note>
</step>
<step>
<para>Configure MongoDB to make it listen on the controller management IP
address. Edit the <filename>/etc/mongodb.conf</filename> file and modify the
<literal>bind_ip</literal> key:</para>
<programlisting language="ini">bind_ip = 10.0.0.11</programlisting>
</step>
<step os="debian;ubuntu">
<para>Restart the MongoDB service to apply the configuration change:</para>
<screen><prompt>#</prompt> <userinput>service mongodb restart</userinput></screen>
</step>
<step os="rhel;centos;fedora;opensuse;sles">
<para>Start the MongoDB server and configure it to start when
the system boots:</para>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>service mongodb start</userinput>
<prompt>#</prompt> <userinput>chkconfig mongodb on</userinput></screen>
<!-- NB: The use of mongod, and not mongodb, in the below screen is
intentional. -->
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>service mongod start</userinput>
<prompt>#</prompt> <userinput>chkconfig mongod on</userinput></screen>
</step>
<step>
<para>Create the database and a <literal>ceilometer</literal>
database user:</para>
<screen><prompt>#</prompt> <userinput>mongo --host <replaceable>controller</replaceable> --eval '
db = db.getSiblingDB("ceilometer");
db.addUser({user: "ceilometer",
pwd: "<replaceable>CEILOMETER_DBPASS</replaceable>",
roles: [ "readWrite", "dbAdmin" ]})'</userinput></screen>
</step>
<step>
<para>Configure the Telemetry service to use the database:</para>
<screen os="rhel;centos;fedora;opensuse;sles"><prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf \
database connection mongodb://ceilometer:<replaceable>CEILOMETER_DBPASS</replaceable>@<replaceable>controller</replaceable>:27017/ceilometer</userinput></screen>
<para os="ubuntu;debian">Edit the
<filename>/etc/ceilometer/ceilometer.conf</filename> file
and change the <literal>[database]</literal> section:</para>
<programlisting os="ubuntu;debian" language="ini">[database]
# The SQLAlchemy connection string used to connect to the
# database (string value)
connection = mongodb://ceilometer:<replaceable>CEILOMETER_DBPASS</replaceable>@<replaceable>controller</replaceable>:27017/ceilometer</programlisting>
</step>
<step>
<para>You must define a secret key that is used as a shared
secret among Telemetry service nodes. Use
<command>openssl</command> to generate a random token and
store it in the configuration file:</para>
<screen os="rhel;centos;fedora;opensuse;sles"><prompt>#</prompt> <userinput>CEILOMETER_TOKEN=$(openssl rand -hex 10)</userinput>
<prompt>#</prompt> <userinput>echo $CEILOMETER_TOKEN</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf publisher metering_secret $CEILOMETER_TOKEN</userinput></screen>
<para os="sles;opensuse">For SUSE Linux Enterprise, run the
following command:</para>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>CEILOMETER_TOKEN=$(openssl rand 10|hexdump -e '1/1 "%.2x"')</userinput></screen>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>openssl rand -hex 10</userinput></screen>
<para os="ubuntu;debian">Edit the
<filename>/etc/ceilometer/ceilometer.conf</filename> file
and change the <literal>[publisher]</literal> section. Replace
<replaceable>CEILOMETER_TOKEN</replaceable> with the results of
the <literal>openssl</literal> command:</para>
<programlisting os="ubuntu;debian" language="ini">[publisher]
# Secret value for signing metering messages (string value)
metering_secret = <replaceable>CEILOMETER_TOKEN</replaceable></programlisting>
</step>
<step os="opensuse;sles;ubuntu;rhel;centos;fedora">
<para>Configure the RabbitMQ access:</para>
<screen os="opensuse;sles;rhel;centos;fedora"><prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT rabbit_host <replaceable>controller</replaceable></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">rabbit_host = <replaceable>controller</replaceable>
rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>
</step>
<step os="opensuse;sles">
<para>Configure the collector dispatcher:</para>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf \
collector dispatcher database</userinput></screen>
</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="rhel;centos;fedora;opensuse;sles;ubuntu">
<para>Create a <literal>ceilometer</literal> user that the
Telemetry service uses to authenticate with the Identity
Service. Use the <literal>service</literal> tenant and give
the user the <literal>admin</literal> role:</para>
<screen><prompt>$</prompt> <userinput>keystone user-create --name ceilometer --pass <replaceable>CEILOMETER_PASS</replaceable> --email <replaceable>ceilometer@example.com</replaceable></userinput>
<prompt>$</prompt> <userinput>keystone user-role-add --user ceilometer --tenant service --role admin</userinput></screen>
</step>
<step>
<para>Configure the Telemetry service to authenticate with the Identity
Service.</para>
<para>Set the <option>auth_strategy</option> value to
<literal>keystone</literal> in the
<filename>/etc/ceilometer/ceilometer.conf</filename> file:</para>
<screen os="centos;rhel;fedora;opensuse;sles"><prompt>#</prompt> <userinput>openstack-config --set /etc/ceilometer/ceilometer.conf \
DEFAULT auth_strategy keystone</userinput></screen>
<programlisting language="ini" os="debian;ubuntu">[DEFAULT]
...
auth_strategy = keystone</programlisting>
</step>
<step>
<para>Add the credentials to the configuration files for the
Telemetry service:</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 auth_uri http://<replaceable>controller</replaceable>:5000</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_auth_url http://<replaceable>controller</replaceable>:5000/v2.0</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></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
auth_uri = http://<replaceable>controller</replaceable>:5000
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="rhel;centos;fedora;opensuse;sles;ubuntu">
<para>Register the Telemetry service with the Identity Service so
that other OpenStack services can locate it. Use the
<command>keystone</command> command to register the service
and specify the endpoint:</para>
<screen><prompt>$</prompt> <userinput>keystone service-create --name ceilometer --type metering \
--description "Telemetry"</userinput>
<prompt>$</prompt> <userinput>keystone endpoint-create \
--service-id $(keystone service-list | awk '/ metering / {print $2}') \
--publicurl http://<replaceable>controller</replaceable>:8777 \
--internalurl http://<replaceable>controller</replaceable>:8777 \
--adminurl http://<replaceable>controller</replaceable>:8777</userinput></screen>
</step>
<step os="ubuntu;debian">
<para>Restart the services with their new settings:</para>
<screen><prompt>#</prompt> <userinput>service ceilometer-agent-central restart</userinput>
<prompt>#</prompt> <userinput>service ceilometer-agent-notification restart</userinput>
<prompt>#</prompt> <userinput>service ceilometer-api restart</userinput>
<prompt>#</prompt> <userinput>service ceilometer-collector restart</userinput>
<prompt>#</prompt> <userinput>service ceilometer-alarm-evaluator restart</userinput>
<prompt>#</prompt> <userinput>service ceilometer-alarm-notifier restart</userinput></screen>
</step>
<step os="rhel;fedora;centos;opensuse;sles">
<para>Start the <systemitem class="service"
>openstack-ceilometer-api</systemitem>, <systemitem class="service"
os="opensuse;sles">openstack-ceilometer-agent-central</systemitem><systemitem
class="service" os="rhel;fedora;centos">openstack-ceilometer-central</systemitem>,
<systemitem class="service">openstack-ceilometer-collector</systemitem>,
<systemitem class="service" os="opensuse;sles">openstack-ceilometer-alarm-evaluator</systemitem>,
and <systemitem class="service" os="opensuse;sles">openstack-ceilometer-alarm-notifier</systemitem>
services and configure them to start when the system boots:</para>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>service openstack-ceilometer-api start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-agent-notification start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-agent-central start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-collector start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-alarm-evaluator start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-alarm-notifier start</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-api on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-agent-notification on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-agent-central on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-collector on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-alarm-evaluator on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-alarm-notifier on</userinput></screen>
<screen os="rhel;fedora;centos"><prompt>#</prompt> <userinput>service openstack-ceilometer-api start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-notification start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-central start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-collector start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-alarm-evaluator start</userinput>
<prompt>#</prompt> <userinput>service openstack-ceilometer-alarm-notifier start</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-api on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-notification on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-central on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-collector on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-alarm-evaluator on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-ceilometer-alarm-notifier on</userinput></screen>
</step>
</procedure>
</section>