CloudKitty installation and configuration

Install from source

There is no release of CloudKitty as of now, the installation can be done from the git repository.

Retrieve and install CloudKitty:

git clone git://
cd cloudkitty
python install

This procedure installs the cloudkitty python library and a few executables:

  • cloudkitty-api: API service
  • cloudkitty-processor: Processing service (collecting and rating)
  • cloudkitty-dbsync: Tool to create and upgrade the database schema
  • cloudkitty-storage-init: Tool to initiate the storage backend
  • cloudkitty-writer: Reporting tool

Install sample configuration files:

mkdir /etc/cloudkitty
cp etc/cloudkitty/cloudkitty.conf.sample /etc/cloudkitty/cloudkitty.conf
cp etc/cloudkitty/policy.json /etc/cloudkitty

Install from packages

Packages for RHEL/CentOS 7 and Ubuntu 14.04 are available for the Kilo release.

For RHEL/CentOS 7

  1. Enable the EPEL and RDO repositories for Kilo:
yum install
yum install
  1. Create the /etc/yum.repos.d/cloudkitty.repo configuration file to enable the CloudKitty repository:
name=CloudKitty repository (Kilo)
  1. Install the packages:
yum install cloudkitty-api cloudkitty-processor cloudkitty-dashboard

For Ubuntu 14.04

  1. Enable the Canonical cloud-archive repository for the Kilo release:
apt-get install ubuntu-cloud-keyring
echo "deb trusty-updates/kilo main" > \
  1. Install the CloudKitty repository public key and configure apt:
apt-key adv --keyserver --recv-keys 71E414B3
echo 'deb trusty/kilo main' > \
apt-get update
  1. Install the packages:
apt-get install cloudkitty-api cloudkitty-processor cloudkitty-dashboard

Configure CloudKitty

Edit /etc/cloudkitty/cloudkitty.conf to configure CloudKitty.

The following shows the basic configuration items:

verbose = True
log_dir = /var/log/cloudkitty

rabbit_userid = openstack
rabbit_password = RABBIT_PASSWORD
rabbit_hosts = RABBIT_HOST

username = cloudkitty
password = CK_PASSWORD
tenant = service
region = RegionOne
url = http://localhost:5000/v2.0

username = cloudkitty
password = CK_PASSWORD
project_name = service
region = RegionOne
auth_url = http://localhost:5000/v2.0
auth_plugin = password

connection = mysql://cloudkitty:CK_DBPASS@localhost/cloudkitty

username = admin
tenant = admin
region = RegionOne
url = http://localhost:5000/v2.0

username = cloudkitty
password = CK_PASSWORD
tenant = service
region = RegionOne
url = http://localhost:5000

Setup the database and storage backend

MySQL/MariaDB is the recommended database engine. To setup the database, use the mysql client:

mysql -uroot -p << EOF
GRANT ALL PRIVILEGES ON cloudkitty.* TO 'cloudkitty'@'localhost' IDENTIFIED BY 'CK_DBPASS';

Run the database synchronisation scripts:

cloudkitty-dbsync upgrade

Init the storage backend:


Setup Keystone

CloudKitty uses Keystone for authentication, and provides a rating service.

To integrate CloudKitty to Keystone, run the following commands (as OpenStack administrator):

keystone user-create --name cloudkitty --pass CK_PASS
keystone user-role-add --user cloudkitty --role admin --tenant service

Give the rating role to cloudkitty for each tenant that should be handled by CloudKitty:

keystone role-create --name rating
keystone user-role-add --user cloudkitty --role rating --tenant XXX

Create the rating service and its endpoints:

keystone service-create --name CloudKitty --type rating
keystone endpoint-create --service-id RATING_SERVICE_ID \
    --publicurl http://localhost:8888 \
    --adminurl http://localhost:8888 \
    --internalurl http://localhost:8888

Start CloudKitty

Start the API and processing services:

cloudkitty-api --config-file /etc/cloudkitty/cloudkitty.conf
cloudkitty-processor --config-file /etc/cloudkitty/cloudkitty.conf

Horizon integration

Retrieve and install CloudKitty’s dashboard:

git clone git://
cd cloudkitty-dashboard
python install

Find where the python packages are installed:

PY_PACKAGES_PATH=`pip --version | cut -d' ' -f4`

Then add the enabled file to the horizon settings or installation. Depending on your setup, you might need to add it to /usr/share or directly in the horizon python package:

# If horizon is installed by packages:
ln -s $PY_PACKAGES_PATH/cloudkittydashboard/enabled/_[0-9]*.py \

# Directly from sources:
ln -s $PY_PACKAGES_PATH/cloudkittydashboard/enabled/_[0-9]*.py \

Restart the web server hosting Horizon.