This assumes a RHEL6.4 @base installation of Red Hat Enterprise Linux OpenStack Platform (RHELOSP) and registration to a satellite which has access to both RHELOSP Channels and RHEL Server Optional. Much of the Ceilometer installation instructions came from this Fedora QA Test case, but I made a few changes and added a few more details.
Setup a RHELOSP system and configure ceilometer.
# sudo rhn-channel --add -c rhel-x86_64-server-6-ost-3 -c rhel-x86_64-server-optional-6
# sudo yum update -y
# sudo reboot
sudo yum install *ceilometer*
The mongoDB store also must be installed and started:
sudo yum install mongodb-server
sudo sed -i '/--smallfiles/!s/OPTIONS=\"/OPTIONS=\"--smallfiles /' /etc/sysconfig/mongod
sudo service mongod start
Create the appropriate users and roles:
SERVICE_TENANT=$(keystone tenant-list | grep services | awk '{print $2}')
ADMIN_ROLE=$(keystone role-list | grep ' admin ' | awk '{print $2}')
SERVICE_PASSWORD=servicepass
CEILOMETER_USER=$(keystone user-create --name=ceilometer \
--pass="$SERVICE_PASSWORD" \
--tenant_id $SERVICE_TENANT \
--email=ceilometer@example.com | awk '/ id / {print $4}')
RESELLER_ROLE=$(keystone role-create --name=ResellerAdmin | awk '/ id / {print $4}')
ADMIN_ROLE=$(keystone role-list | awk '/ admin / {print $2}')
for role in $RESELLER_ROLE $ADMIN_ROLE ; do
keystone user-role-add --tenant_id $SERVICE_TENANT \
--user_id $CEILOMETER_USER --role_id $role
done
Set the authtoken config appropriately in the ceilometer config file:
sudo openstack-config --set /etc/ceilometer/ceilometer.conf keystone_authtoken auth_host 127.0.0.1
sudo openstack-config --set /etc/ceilometer/ceilometer.conf keystone_authtoken auth_port 35357
sudo openstack-config --set /etc/ceilometer/ceilometer.conf keystone_authtoken auth_protocol http
sudo openstack-config --set /etc/ceilometer/ceilometer.conf keystone_authtoken admin_tenant_name services
sudo openstack-config --set /etc/ceilometer/ceilometer.conf keystone_authtoken admin_user ceilometer
sudo openstack-config --set /etc/ceilometer/ceilometer.conf keystone_authtoken admin_password $SERVICE_PASSWORD
Set the user credentials config appropriately in the ceilometer config file:
sudo openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT os_auth_url http://127.0.0.1:35357/v2.0
sudo openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT os_tenant_name services
sudo openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT os_password $SERVICE_PASSWORD
sudo openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT os_username ceilometer
Then start the services:
for svc in compute central collector api ; do
sudo service openstack-ceilometer-$svc start
done
Finally, register an appropriate endpoint with the service catalog. Be sure to replace $EXTERNALIFACE with the IP address of your external interface.
keystone service-create --name=ceilometer \
--type=metering --description="Ceilometer Service"
CEILOMETER_SERVICE=$(keystone service-list | awk '/ceilometer/ {print $2}')
keystone endpoint-create \
--region RegionOne \
--service_id $CEILOMETER_SERVICE \
--publicurl "http://$EXTERNALIFACE:8777/" \
--adminurl "http://$EXTERNALIFACE:8777/" \
--internalurl "http://localhost:8777/"
# sudo iptables -A INPUT -p tcp -m multiport --dports 8777 -m comment --comment "001 ceilometer incoming" -j ACCEPT
# sudo iptables save
# openstack-status
# for svc in compute central collector api ; do
sudo service openstack-ceilometer-$svc status
done
At this point you can verify ceilometer is working correctly by authenticating as a user that has instances running (such as admin).
# . ~/keystonerc_admin
Then list the sample for the cpu meter. I pipe this to count lines below and just check to see that the value changes every few minutes depending on what is specified in the /etc/ceilometer/pipeline.yaml (the interval is 600 seconds by default)
ceilometer sample-list -m cpu |wc -l
Add the provider to CloudForms Management Engine and you begin seeing capacity and utilization data for your instances populate in a few minutes.