Add deployment code for gnocchi
- Check if gnocchi/ceilometer services are enabled - Configures gnocchi service - Update devstackGSG.rst to remove workaround - Modulepath previously needed to be changed manually - Add COLLECTD_{CEILOMETER,GNOCCHI}_ENABLED option Change-Id: Ic644f53b53dcdbb92eef2c8ddf7d2888fc308797
This commit is contained in:
parent
1dd391a3de
commit
fc514f3f0f
@ -45,17 +45,36 @@ function adapt_collectd_conf {
|
||||
sudo mkdir -p "$COLLECTD_CONF_DIR"
|
||||
fi
|
||||
|
||||
sudo cp $COLLECTD_CEILOMETER_DIR/etc/collectd.conf.d/collectd-ceilometer-plugin.conf $COLLECTD_CONF_DIR/
|
||||
# Configure collectd-ceilometer-plugin
|
||||
if [[ "$COLLECTD_CEILOMETER_ENABLED" == "True" ]]; then
|
||||
sudo cp $COLLECTD_CEILOMETER_DIR/etc/collectd.conf.d/collectd-ceilometer-plugin.conf $COLLECTD_CONF_DIR/
|
||||
|
||||
# Configure collectd-ceiloemter-plugin.conf
|
||||
sudo sed -i 's|ModulePath.*$|ModulePath "'$COLLECTD_CEILOMETER_DIR'"|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
sudo sed -i 's|VERBOSE.*$|VERBOSE '$COLLECTD_CEILOMETER_VERBOSE'|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
sudo sed -i 's|BATCH_SIZE.*$|BATCH_SIZE "'$COLLECTD_BATCH_SIZE'"|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
sudo sed -i 's|OS_AUTH_URL.*$|OS_AUTH_URL "'$OS_AUTH_URL'"|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
sudo sed -i 's|CEILOMETER_URL_TYPE.*$|CEILOMETER_URL_TYPE "'$CEILOMETER_URL_TYPE'"|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
sudo sed -i 's|CEILOMETER_TIMEOUT.*$|CEILOMETER_TIMEOUT "'$CEILOMETER_TIMEOUT'"|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
sudo sed -i 's|OS_PASSWORD.*$|OS_PASSWORD "'$SERVICE_PASSWORD'"|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
sudo sed -i 's|OS_TENANT_NAME.*$|OS_TENANT_NAME "'$SERVICE_TENANT_NAME'"|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
# Configure collectd-ceiloemter-plugin.conf
|
||||
sudo sed -i 's|ModulePath.*$|ModulePath "'$COLLECTD_CEILOMETER_DIR'"|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
sudo sed -i 's|VERBOSE.*$|VERBOSE '$COLLECTD_CEILOMETER_VERBOSE'|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
sudo sed -i 's|BATCH_SIZE.*$|BATCH_SIZE "'$COLLECTD_BATCH_SIZE'"|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
sudo sed -i 's|OS_AUTH_URL.*$|OS_AUTH_URL "'$OS_AUTH_URL'"|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
sudo sed -i 's|CEILOMETER_URL_TYPE.*$|CEILOMETER_URL_TYPE "'$CEILOMETER_URL_TYPE'"|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
sudo sed -i 's|CEILOMETER_TIMEOUT.*$|CEILOMETER_TIMEOUT "'$CEILOMETER_TIMEOUT'"|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
sudo sed -i 's|OS_PASSWORD.*$|OS_PASSWORD "'$SERVICE_PASSWORD'"|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
sudo sed -i 's|OS_TENANT_NAME.*$|OS_TENANT_NAME "'$SERVICE_TENANT_NAME'"|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
fi
|
||||
|
||||
# configure collectd-gnocchi plugin
|
||||
if [[ "$COLLECTD_GNOCCHI_ENABLED" == "True" ]]; then
|
||||
|
||||
sudo cp $COLLECTD_CEILOMETER_DIR/etc/collectd.conf.d/collectd-gnocchi-plugin.conf $COLLECTD_CONF_DIR/
|
||||
|
||||
# Configure collectd-gnocchi-plugin.conf
|
||||
sudo sed -i 's|ModulePath.*$|ModulePath "'$COLLECTD_CEILOMETER_DIR'"|g' $COLLECTD_CONF_DIR/collectd-gnocchi-plugin.conf
|
||||
sudo sed -i 's|VERBOSE.*$|VERBOSE '$COLLECTD_CEILOMETER_VERBOSE'|g' $COLLECTD_CONF_DIR/collectd-gnocchi-plugin.conf
|
||||
sudo sed -i 's|BATCH_SIZE.*$|BATCH_SIZE "'$COLLECTD_BATCH_SIZE'"|g' $COLLECTD_CONF_DIR/collectd-gnocchi-plugin.conf
|
||||
sudo sed -i 's|OS_AUTH_URL.*$|OS_AUTH_URL "'$OS_AUTH_URL'"|g' $COLLECTD_CONF_DIR/collectd-gnocchi-plugin.conf
|
||||
sudo sed -i 's|CEILOMETER_URL_TYPE.*$|CEILOMETER_URL_TYPE "'$CEILOMETER_URL_TYPE'"|g' $COLLECTD_CONF_DIR/collectd-gnocchi-plugin.conf
|
||||
sudo sed -i 's|CEILOMETER_TIMEOUT.*$|CEILOMETER_TIMEOUT "'$CEILOMETER_TIMEOUT'"|g' $COLLECTD_CONF_DIR/collectd-gnocchi-plugin.conf
|
||||
sudo sed -i 's|OS_PASSWORD.*$|OS_PASSWORD "'$SERVICE_PASSWORD'"|g' $COLLECTD_CONF_DIR/collectd-gnocchi-plugin.conf
|
||||
sudo sed -i 's|OS_TENANT_NAME.*$|OS_TENANT_NAME "'$SERVICE_TENANT_NAME'"|g' $COLLECTD_CONF_DIR/collectd-gnocchi-plugin.conf
|
||||
fi
|
||||
|
||||
# Configure custom units
|
||||
if [[ "$COLLECTD_CEILOMETER_UNITS" != none ]]; then
|
||||
@ -80,7 +99,6 @@ function adapt_collectd_conf {
|
||||
|
||||
}
|
||||
|
||||
|
||||
# remove plugin conf file
|
||||
function restore_collectd_conf {
|
||||
|
||||
|
@ -6,6 +6,9 @@ COLLECTD_CONF_DIR=${COLLECTD_CONF_DIR:-''}
|
||||
|
||||
COLLECTD_CEILOMETER_VERBOSE=${COLLECTD_CEILOMETER_VERBOSE:-False}
|
||||
|
||||
COLLECTD_CEILOMETER_ENABLED=${COLLECTD_CEILOMETER_ENABLED:-False}
|
||||
COLLECTD_GNOCCHI_ENABLED=${COLLECTD_GNOCCHI_ENABLED:-True}
|
||||
|
||||
# Configurations for Collectd LogFile plugin
|
||||
COLLECTD_LOG_FILE=${COLLECTD_LOG_FILE:-$LOGDIR/collectd.log}
|
||||
COLLECTD_LOG_LEVEL=${COLLECTD_LOG_LEVEL:-info}
|
||||
|
@ -86,12 +86,9 @@ To deploy with gnocchi using devstack, add the following to you local.conf:
|
||||
enable_plugin collectd-ceilometer-plugin http://github.com/openstack/collectd-ceilometer-plugin
|
||||
|
||||
COLLECTD_INSTALL=True
|
||||
COLLECTD_CONF_DIR=/etc/collectd/collectd.conf.d/
|
||||
|
||||
# GNOCCHI
|
||||
enable_plugin gnocchi https://github.com/openstack/gnocchi master
|
||||
enable_service gnocchi-api,gnocchi-metricd,gnocchi-statsd
|
||||
GNOCCHI_USE_KEYSTONE=True
|
||||
|
||||
Once deployment is complete, edit collectd-ceilometer-plugin.conf to point at
|
||||
the collectd_ceiloemter.gnocchi.plugin module.
|
||||
COLLECTD_GNOCCHI_ENABLED=True
|
||||
|
@ -28,3 +28,4 @@ enable_plugin collectd-ceilometer https://github.com/openstack/collectd-ceilomet
|
||||
|
||||
COLLECTD_INSTALL=True
|
||||
COLLECTD_CEILOMETER_VERBOSE=True
|
||||
COLLECTD_CEILOMETER_ENABLED=True
|
||||
|
@ -44,9 +44,9 @@ CEILOMETER_TIMEOUT
|
||||
|
||||
|
||||
COLLECTD_CEILOMETER_VERBOSE
|
||||
(True|False) Set this to True to make collectd-ceilometer debugging
|
||||
messages visible as info messagges. This is useful when running the
|
||||
plugin inside a collectd compiled without debug message support.
|
||||
(True|False) Set this to True to make collectd-{ceilometer,gnocchi}
|
||||
debugging messages visible as info messagges. This is useful when running
|
||||
the plugin inside a collectd compiled without debug message support.
|
||||
Default: False
|
||||
|
||||
|
||||
@ -69,6 +69,15 @@ COLLECTD_CUSTOM_UNITS
|
||||
|
||||
Example: COLLECTD_CUSTOM_UNITS="<meter> <unit>,<meter> <unit>"
|
||||
|
||||
COLLECTD_CEILOMETER_ENABLED
|
||||
(True|False) Toggle whether collectd-ceilometer-plugin is enabled.
|
||||
|
||||
Default: False
|
||||
|
||||
COLLECTD_GNOCCHI_ENABLED
|
||||
(True|False) Toggles whether collectd-gnocchi-plugin is enabled.
|
||||
|
||||
Default: True
|
||||
|
||||
Authenticating using Identity Server API v3
|
||||
===========================================
|
||||
|
Loading…
Reference in New Issue
Block a user