Skip to content

Commit 995f93d

Browse files
author
Mehdi Abaakouk
committed
devstack: allow to configure not backend
This change allows to configure ceilometer with no backend. For example if we want to use only panko. This also change the default backend to this one since mysql is not recommanded. Change-Id: Ie85d7fa5476fc68a0a867072517191ae6ed7aad7
1 parent f77415b commit 995f93d

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

devstack/plugin.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
# of Ceilometer (see within for additional settings):
3535
#
3636
# CEILOMETER_PIPELINE_INTERVAL: Seconds between pipeline processing runs. Default 600.
37-
# CEILOMETER_BACKEND: Database backend (e.g. 'mysql', 'mongodb', 'es')
37+
# CEILOMETER_BACKEND: Database backend (e.g. 'mysql', 'mongodb', 'es', 'gnocchi', 'none')
3838
# CEILOMETER_COORDINATION_URL: URL for group membership service provided by tooz.
3939
# CEILOMETER_EVENT_ALARM: Set to True to enable publisher for event alarming
4040

@@ -237,7 +237,13 @@ function _ceilometer_configure_cache_backend {
237237

238238
# Set configuration for storage backend.
239239
function _ceilometer_configure_storage_backend {
240-
if [ "$CEILOMETER_BACKEND" = 'mysql' ] || [ "$CEILOMETER_BACKEND" = 'postgresql' ] ; then
240+
if [ "$CEILOMETER_BACKEND" = 'none' ] ; then
241+
inidelete $CEILOMETER_CONF DEFAULT meter_dispatchers
242+
inidelete $CEILOMETER_CONF DEFAULT event_dispatchers
243+
if ! is_service_enabled panko-api; then
244+
echo_summary "All Ceilometer backends seems disabled, set \$CEILOMETER_BACKEND to select one."
245+
fi
246+
elif [ "$CEILOMETER_BACKEND" = 'mysql' ] || [ "$CEILOMETER_BACKEND" = 'postgresql' ] ; then
241247
iniset $CEILOMETER_CONF DEFAULT meter_dispatchers database
242248
iniset $CEILOMETER_CONF database event_connection $(database_connection_url ceilometer)
243249
iniset $CEILOMETER_CONF database metering_connection $(database_connection_url ceilometer)

devstack/settings

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ CEILOMETER_CONF=$CEILOMETER_CONF_DIR/ceilometer.conf
1515
CEILOMETER_AUTH_CACHE_DIR=${CEILOMETER_AUTH_CACHE_DIR:-/var/cache/ceilometer}
1616
CEILOMETER_WSGI_DIR=${CEILOMETER_WSGI_DIR:-/var/www/ceilometer}
1717

18-
# Set up database backend
19-
CEILOMETER_BACKEND=${CEILOMETER_BACKEND:-mysql}
18+
# Set up no backend
19+
CEILOMETER_BACKEND=${CEILOMETER_BACKEND:-none}
2020

2121
# Gnocchi default archive_policy for Ceilometer
2222
GNOCCHI_ARCHIVE_POLICY=${GNOCCHI_ARCHIVE_POLICY:-low}

0 commit comments

Comments
 (0)