To enable Gnocchi in devstack, add the following to local.conf:
enable_plugin gnocchi https://github.com/openstack/gnocchi master
enable_service gnocchi-api,gnocchi-metricd
To enable Grafana support in devstack, you can also enable gnocchi-grafana:
enable_service gnocchi-grafana
Then, you can start devstack:
./stack.sh
To install Gnocchi using pip, just type:
pip install gnocchi
Depending on the drivers and features you want to use, you need to install extra variants using, for example:
pip install gnocchi[postgresql,ceph,keystone]
This would install PostgreSQL support for the indexer, Ceph support for storage, and Keystone support for authentication and authorization.
The list of variants available is:
To install Gnocchi from source, run the standard Python installation procedure:
pip install -e .
Again, depending on the drivers and features you want to use, you need to install extra variants using, for example:
pip install -e .[postgresql,ceph,ceph-pre-jewel]
Gnocchi leverages omap API of librados, but this is available in python binding only since python-rados >= 9.1.0. To handle this, Gnocchi uses ‘cradox’ python library which has exactly the same API but works with Ceph >= 0.80.0.
If Ceph and python-rados are >= 9.1.0, cradox python library becomes optional but is still recommended until 10.1.0.
Once you have configured Gnocchi properly (see Configuration), you need to initialize the indexer and storage:
gnocchi-upgrade
In order to upgrade from a previous version of Gnocchi, you need to make sure that your indexer and storage are properly upgraded. Run the following:
Gnocchi supports online upgrade of its storage system, which avoids interrupting Gnocchi for a long time. In order to upgrade from previous versions, you need to follow the following steps:
This will upgrade the indexer and storage in two passes. While a new version of Gnocchi API cannot run with an old version of the indexer, it can run with an old version of its storage back-end. For performance reasons, _metricd_ needs to run an upgraded storage back-end, otherwise it would spend too much time checking for upgrade pattern on each run.