Install the Telemetry serviceOpenStack Telemetry is 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:#apt-get install ceilometer-api ceilometer-collector ceilometer-agent-central python-ceilometerclient#yum install openstack-ceilometer-api openstack-ceilometer-collector openstack-ceilometer-central python-ceilometerclient#zypper install openstack-ceilometer-api openstack-ceilometer-collector openstack-ceilometer-agent-central python-ceilometerclientRespond to the prompts for [keystone_authtoken] settings,
RabbitMQ credentials
and API endpoint
registration.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#zypper install mongodb#apt-get install mongodbConfigure MongoDB to make it listen on the controller public IP
address. Edit the /etc/mongodb.conf file and modify the
bind_ip key:bind_ip = 192.168.0.10Restart the MongoDB service to apply the configuration change:#service mongodb restartStart the MongoDB server and configure it to start when
the system boots:#systemctl start mongodb.service#systemctl enable mongodb.service#service mongod start#chkconfig mongod onCreate the database and a ceilometer
database user:#mongo>use 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/ceilometerEdit the
/etc/ceilometer/ceilometer.conf file
and change the [database] section:...
[database]
...
# The SQLAlchemy connection string used to connect to the
# database (string value)
connection = mongodb://ceilometer:CEILOMETER_DBPASS@controller:27017/ceilometer
...You must define an 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:#ADMIN_TOKEN=$(openssl rand -hex 10)#echo $ADMIN_TOKEN#openstack-config --set /etc/ceilometer/ceilometer.conf publisher_rpc metering_secret $ADMIN_TOKENFor SUSE Linux Enterprise, run the
following command:#ADMIN_TOKEN=$(openssl rand 10|hexdump -e '1/1 "%.2x"')#openssl rand -hex 10Edit the
/etc/ceilometer/ceilometer.conf file
and change the [publisher_rpc] section. Replace
ADMIN_TOKEN with the results of
the openssl command:...
[publisher_rpc]
...
# Secret value for signing metering messages (string value)
metering_secret = ADMIN_TOKEN
...Configure the RabbitMQ access:#openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT rabbit_host controller#openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT rabbit_password RABBIT_PASSEdit the /etc/ceilometer/ceilometer.conf file and update the [DEFAULT] section.rabbit_host = controller
rabbit_password = RABBIT_PASSCreate a ceilometer user that the
Telemetry Service uses to authenticate with the Identity
Service. Use the service tenant and give
the user the admin role:#keystone user-create --name=ceilometer --pass=CEILOMETER_PASS --email=ceilometer@example.com#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 admin_password CEILOMETER_PASSEdit the
/etc/ceilometer/ceilometer.conf file
and change the [keystone_authtoken]
section:[keystone_authtoken]
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = ceilometer
admin_password = CEILOMETER_PASSRegister 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="Ceilometer Telemetry Service"Note the id property that is returned
for the service. Use it when you create the endpoint:#keystone endpoint-create \
--service-id=the_service_id_above \
--publicurl=http://controller:8777/ \
--internalurl=http://controller:8777/ \
--adminurl=http://controller:8777/Restart the services with their new settings:#service ceilometer-agent-central restart#service ceilometer-api restart#service ceilometer-collector restartStart the openstack-ceilometer-api, openstack-ceilometer-agent-centralopenstack-ceilometer-central
and openstack-ceilometer-collector
services and configure them to start when the system boots:#service openstack-ceilometer-api start#service openstack-ceilometer-agent-central start#service openstack-ceilometer-collector start#chkconfig openstack-ceilometer-api on#chkconfig openstack-ceilometer-agent-central on#chkconfig openstack-ceilometer-collector on#service openstack-ceilometer-api start#service openstack-ceilometer-central start#service openstack-ceilometer-collector start#chkconfig openstack-ceilometer-api on#chkconfig openstack-ceilometer-central on#chkconfig openstack-ceilometer-collector on