Improved documentation
Change-Id: I7e9e27316c298a79ae0c3d2f8142eea10d35b0ae
This commit is contained in:
parent
5876b9b966
commit
67c9579d10
@ -5,26 +5,28 @@ CloudKitty's Architecture
|
||||
CloudKitty can be cut in four big parts:
|
||||
|
||||
* API
|
||||
* Collector
|
||||
* Data collection (collector)
|
||||
* Rating processing
|
||||
* Writing pipeline
|
||||
* Storage
|
||||
* Report writer
|
||||
|
||||
|
||||
.. graphviz:: graph/arch.dot
|
||||
.. Graph is outdated, and needs to be modified. Skipping it.
|
||||
.. graphviz:: graph/arch.dot
|
||||
|
||||
|
||||
Module loading and extensions
|
||||
=============================
|
||||
|
||||
Nearly every part of CloudKitty make use of stevedore to load extensions
|
||||
Nearly every part of CloudKitty makes use of stevedore to load extensions
|
||||
dynamically.
|
||||
|
||||
Every rating module is loaded at runtime and can be enabled/disabled directly
|
||||
via CloudKitty's API. The module is responsible of its own API to ease the
|
||||
management of its configuration.
|
||||
|
||||
Collectors and writers are loaded with stevedore but configured in CloudKitty's
|
||||
configuration file.
|
||||
Collectors and storage backends are loaded with stevedore but configured in
|
||||
CloudKitty's configuration file.
|
||||
|
||||
|
||||
Collector
|
||||
@ -35,7 +37,7 @@ Collector
|
||||
The name of the collector to use is specified in the configuration, only one
|
||||
collector can be loaded at once.
|
||||
This part is responsible of information gathering. It consists of a python
|
||||
class that load data from a backend and return them in a format that CloudKitty
|
||||
class that loads data from a backend and return it in a format that CloudKitty
|
||||
can handle.
|
||||
|
||||
The data format of CloudKitty is the following:
|
||||
@ -61,6 +63,7 @@ The data format of CloudKitty is the following:
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Example code of a basic collector:
|
||||
|
||||
.. code-block:: python
|
||||
@ -77,6 +80,10 @@ Example code of a basic collector:
|
||||
You'll now be able to add the gathering of mydata in CloudKitty by modifying
|
||||
the configuration and specifying the new service in collect/services.
|
||||
|
||||
If you need to load multiple collectors, you can use the ``meta`` collector and
|
||||
use its API to enable/disable collector loading, and set priority.
|
||||
|
||||
|
||||
Rating
|
||||
======
|
||||
|
||||
@ -116,6 +123,18 @@ Example of minimal rating module (taken from the Noop module):
|
||||
return data
|
||||
|
||||
|
||||
Storage
|
||||
=======
|
||||
|
||||
**Loaded with stevedore**
|
||||
|
||||
The storage module is responsible of storing the data in a backend. It
|
||||
implements an API on top of the storage to be able to query the data without
|
||||
the need of knowing the type of backend used.
|
||||
|
||||
You can use the API to create reports on the fly for example.
|
||||
|
||||
|
||||
Writer
|
||||
======
|
||||
|
||||
|
@ -3,7 +3,7 @@ Devstack installation
|
||||
#####################
|
||||
|
||||
The installation of CloudKitty from devstack is pretty straightforward. Just
|
||||
add the following to your local.conf file.
|
||||
add the following lines to your local.conf file.
|
||||
|
||||
::
|
||||
|
||||
|
@ -33,6 +33,7 @@ Install a sample configuration file:
|
||||
mkdir /etc/cloudkitty
|
||||
cp etc/cloudkitty/cloudkitty.conf.sample /etc/cloudkitty/cloudkitty.conf
|
||||
|
||||
|
||||
Configure CloudKitty
|
||||
====================
|
||||
|
||||
@ -68,6 +69,13 @@ The following shows the basic configuration items:
|
||||
[database]
|
||||
connection = mysql://cloudkitty:CK_DBPASS@localhost/cloudkitty
|
||||
|
||||
[keystone_fetcher]
|
||||
username = admin
|
||||
password = ADMIN_PASSWORD
|
||||
tenant = admin
|
||||
region = RegionOne
|
||||
url = http://localhost:5000/v2.0
|
||||
|
||||
[ceilometer_collector]
|
||||
username = cloudkitty
|
||||
password = CK_PASSWORD
|
||||
@ -75,6 +83,7 @@ The following shows the basic configuration items:
|
||||
region = RegionOne
|
||||
url = http://localhost:5000
|
||||
|
||||
|
||||
Setup the database and storage backend
|
||||
======================================
|
||||
|
||||
@ -88,18 +97,21 @@ the ``mysql`` client:
|
||||
GRANT ALL PRIVILEGES ON cloudkitty.* TO 'cloudkitty'@'localhost' IDENTIFIED BY 'CK_DBPASS';
|
||||
EOF
|
||||
|
||||
|
||||
Run the database synchronisation scripts:
|
||||
|
||||
::
|
||||
|
||||
cloudkitty-dbsync upgrade
|
||||
|
||||
|
||||
Init the storage backend:
|
||||
|
||||
::
|
||||
|
||||
cloudkitty-storage-init
|
||||
|
||||
|
||||
Setup Keystone
|
||||
==============
|
||||
|
||||
@ -113,6 +125,7 @@ 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:
|
||||
|
||||
@ -121,6 +134,7 @@ 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:
|
||||
|
||||
::
|
||||
@ -153,6 +167,7 @@ Retrieve and install CloudKitty's dashboard:
|
||||
cd cloudkitty-dashboard
|
||||
python setup.py install
|
||||
|
||||
|
||||
Find where the python packages are installed:
|
||||
|
||||
::
|
||||
|
@ -9,10 +9,10 @@ Collector
|
||||
:webprefix: /v1/collector
|
||||
|
||||
.. rest-controller:: cloudkitty.api.v1.controllers.collector:MappingController
|
||||
:webprefix: /v1/collector/mapping
|
||||
:webprefix: /v1/collector/mappings
|
||||
|
||||
.. rest-controller:: cloudkitty.api.v1.controllers.collector:CollectorStateController
|
||||
:webprefix: /v1/collector/state
|
||||
:webprefix: /v1/collector/states
|
||||
|
||||
.. autotype:: cloudkitty.api.v1.datamodels.collector.CollectorInfos
|
||||
:members:
|
||||
@ -30,6 +30,9 @@ Rating
|
||||
.. rest-controller:: cloudkitty.api.v1.controllers.rating:ModulesController
|
||||
:webprefix: /v1/rating/modules
|
||||
|
||||
.. rest-controller:: cloudkitty.api.v1.controllers.rating:ModulesExposer
|
||||
:webprefix: /v1/rating/module_config
|
||||
|
||||
.. rest-controller:: cloudkitty.api.v1.controllers.rating:RatingController
|
||||
:webprefix: /v1/rating
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user