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.
Install the Telemetry service on the controller node:
# yum install openstack-ceilometer-api openstack-ceilometer-collector \ openstack-ceilometer-notification openstack-ceilometer-central openstack-ceilometer-alarm \ python-ceilometerclient
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:
# yum install mongodb-server mongodb
Note By default MongoDB is configured to create several 1 GB files in the
/var/lib/mongodb/journal/
directory to support database journaling.If you need to minimize the space allocated to support database journaling then set the
smallfiles
configuration key totrue
in the/etc/mongodb.conf
configuration file. This configuration reduces the size of each journaling file to 512 MB.For more information on the
smallfiles
configuration key refer to the MongoDB documentation at http://docs.mongodb.org/manual/reference/configuration-options/#smallfiles.For instructions detailing the steps to disable database journaling entirely refer to http://docs.mongodb.org/manual/tutorial/manage-journaling/.
Configure MongoDB to make it listen on the controller management IP address. Edit the
/etc/mongodb.conf
file and modify thebind_ip
key:bind_ip = 10.0.0.11
Start the MongoDB server and configure it to start when the system boots:
# service mongod start # chkconfig mongod on
Create the database and a
ceilometer
database user:# mongo --host
controller
--eval ' db = db.getSiblingDB("ceilometer"); db.addUser({user: "ceilometer", pwd: "CEILOMETER_DBPASS
", roles: [ "readWrite", "dbAdmin" ]})'Configure the Telemetry service to use the database:
# openstack-config --set /etc/ceilometer/ceilometer.conf \ database connection mongodb://ceilometer:
CEILOMETER_DBPASS
@controller
:27017/ceilometerYou must define a secret key that is used as a shared secret among Telemetry service nodes. Use openssl to generate a random token and store it in the configuration file:
# CEILOMETER_TOKEN=$(openssl rand -hex 10) # echo $CEILOMETER_TOKEN # openstack-config --set /etc/ceilometer/ceilometer.conf publisher metering_secret $CEILOMETER_TOKEN
Create a
ceilometer
user that the Telemetry service uses to authenticate with the Identity Service. Use theservice
tenant and give the user theadmin
role:$ keystone user-create --name=ceilometer --pass=
CEILOMETER_PASS
--email=[email protected]
$ keystone user-role-add --user=ceilometer --tenant=service --role=adminAdd the credentials to the configuration files for the Telemetry service:
# openstack-config --set /etc/ceilometer/ceilometer.conf \ keystone_authtoken auth_host
controller
# openstack-config --set /etc/ceilometer/ceilometer.conf \ keystone_authtoken admin_user ceilometer # openstack-config --set /etc/ceilometer/ceilometer.conf \ keystone_authtoken admin_tenant_name service # openstack-config --set /etc/ceilometer/ceilometer.conf \ keystone_authtoken auth_protocol http # openstack-config --set /etc/ceilometer/ceilometer.conf \ keystone_authtoken auth_uri http://controller
:5000 # openstack-config --set /etc/ceilometer/ceilometer.conf \ keystone_authtoken admin_passwordCEILOMETER_PASS
# openstack-config --set /etc/ceilometer/ceilometer.conf \ service_credentials os_auth_url http://controller
:5000/v2.0 # openstack-config --set /etc/ceilometer/ceilometer.conf \ service_credentials os_username ceilometer # openstack-config --set /etc/ceilometer/ceilometer.conf \ service_credentials os_tenant_name service # openstack-config --set /etc/ceilometer/ceilometer.conf \ service_credentials os_passwordCEILOMETER_PASS
Register the Telemetry service with the Identity Service so that other OpenStack services can locate it. Use the keystone command to register the service and specify the endpoint:
$ keystone service-create --name=ceilometer --type=metering \ --description="Telemetry" $ keystone endpoint-create \ --service-id=$(keystone service-list | awk '/ metering / {print $2}') \ --publicurl=http://
controller
:8777 \ --internalurl=http://controller
:8777 \ --adminurl=http://controller
:8777Start the
openstack-ceilometer-api
,openstack-ceilometer-central
,openstack-ceilometer-collector
, , and services and configure them to start when the system boots:# service openstack-ceilometer-api start # service openstack-ceilometer-notification start # service openstack-ceilometer-central start # service openstack-ceilometer-collector start # service openstack-ceilometer-alarm-evaluator start # service openstack-ceilometer-alarm-notifier start # chkconfig openstack-ceilometer-api on # chkconfig openstack-ceilometer-notification on # chkconfig openstack-ceilometer-central on # chkconfig openstack-ceilometer-collector on # chkconfig openstack-ceilometer-alarm-evaluator on # chkconfig openstack-ceilometer-alarm-notifier on