Merge "ceilometer: build the configuration file from scratch"

This commit is contained in:
Jenkins 2012-10-26 15:28:18 +00:00 committed by Gerrit Code Review
commit e33dfd553e

View File

@ -8,7 +8,6 @@
# - functions # - functions
# - OS_USERNAME, OS_PASSWORD, OS_TENANT_NAME, OS_AUTH_URL set for admin credentials # - OS_USERNAME, OS_PASSWORD, OS_TENANT_NAME, OS_AUTH_URL set for admin credentials
# - DEST set to the destination directory # - DEST set to the destination directory
# - NOVA_CONF set to the nova configuration file
# stack.sh # stack.sh
# --------- # ---------
@ -36,8 +35,7 @@ else
CEILOMETER_BIN_DIR=/usr/local/bin CEILOMETER_BIN_DIR=/usr/local/bin
fi fi
CEILOMETER_CONF_DIR=/etc/ceilometer CEILOMETER_CONF_DIR=/etc/ceilometer
CEILOMETER_AGENT_CONF=$CEILOMETER_CONF_DIR/ceilometer-agent.conf CEILOMETER_CONF=$CEILOMETER_CONF_DIR/ceilometer.conf
CEILOMETER_COLLECTOR_CONF=$CEILOMETER_CONF_DIR/ceilometer-collector.conf
CEILOMETER_API_LOG_DIR=/var/log/ceilometer-api CEILOMETER_API_LOG_DIR=/var/log/ceilometer-api
# cleanup_ceilometer() - Remove residual data files, anything left over from previous # cleanup_ceilometer() - Remove residual data files, anything left over from previous
@ -57,13 +55,14 @@ function configure_ceilometer() {
[ ! -d $CEILOMETER_API_LOG_DIR ] && sudo mkdir -m 755 -p $CEILOMETER_API_LOG_DIR [ ! -d $CEILOMETER_API_LOG_DIR ] && sudo mkdir -m 755 -p $CEILOMETER_API_LOG_DIR
sudo chown $USER $CEILOMETER_API_LOG_DIR sudo chown $USER $CEILOMETER_API_LOG_DIR
# ceilometer confs are copy of /etc/nova/nova.conf which must exist first iniset $CEILOMETER_CONF DEFAULT rpc_backend 'ceilometer.openstack.common.rpc.impl_kombu'
grep -v format_string $NOVA_CONF > $CEILOMETER_AGENT_CONF iniset $CEILOMETER_CONF DEFAULT notification_topics 'notifications,glance_notifications'
iniset $CEILOMETER_AGENT_CONF DEFAULT rpc_backend 'ceilometer.openstack.common.rpc.impl_kombu' iniset $CEILOMETER_CONF DEFAULT verbose True
iniset $CEILOMETER_CONF DEFAULT rabbit_host $RABBIT_HOST
iniset $CEILOMETER_CONF DEFAULT rabbit_password $RABBIT_PASSWORD
iniset $CEILOMETER_CONF DEFAULT sql_connection $BASE_SQL_CONN/nova?charset=utf8
grep -v format_string $NOVA_CONF > $CEILOMETER_COLLECTOR_CONF iniset $CEILOMETER_CONF keystone_authtoken auth_protocol http
iniset $CEILOMETER_COLLECTOR_CONF DEFAULT rpc_backend 'ceilometer.openstack.common.rpc.impl_kombu'
iniset $CEILOMETER_COLLECTOR_CONF DEFAULT notification_topics 'notifications,glance_notifications'
} }
# install_ceilometer() - Collect source and prepare # install_ceilometer() - Collect source and prepare
@ -73,10 +72,10 @@ function install_ceilometer() {
# start_ceilometer() - Start running processes, including screen # start_ceilometer() - Start running processes, including screen
function start_ceilometer() { function start_ceilometer() {
screen_it ceilometer-acompute "cd $CEILOMETER_DIR && sg libvirtd \"$CEILOMETER_BIN_DIR/ceilometer-agent-compute --config-file $CEILOMETER_AGENT_CONF\"" screen_it ceilometer-acompute "cd $CEILOMETER_DIR && sg libvirtd \"$CEILOMETER_BIN_DIR/ceilometer-agent-compute --config-file $CEILOMETER_CONF\""
screen_it ceilometer-acentral "export OS_USERNAME=$OS_USERNAME OS_PASSWORD=$OS_PASSWORD OS_TENANT_NAME=$OS_TENANT_NAME OS_AUTH_URL=$OS_AUTH_URL && cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-agent-central --config-file $CEILOMETER_AGENT_CONF" screen_it ceilometer-acentral "export OS_USERNAME=$OS_USERNAME OS_PASSWORD=$OS_PASSWORD OS_TENANT_NAME=$OS_TENANT_NAME OS_AUTH_URL=$OS_AUTH_URL && cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-agent-central --config-file $CEILOMETER_CONF"
screen_it ceilometer-collector "cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-collector --config-file $CEILOMETER_COLLECTOR_CONF" screen_it ceilometer-collector "cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-collector --config-file $CEILOMETER_CONF"
screen_it ceilometer-api "cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-api -d -v --log-dir=$CEILOMETER_API_LOG_DIR" screen_it ceilometer-api "cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-api -d -v --log-dir=$CEILOMETER_API_LOG_DIR --config-file $CEILOMETER_CONF"
} }
# stop_ceilometer() - Stop running processes # stop_ceilometer() - Stop running processes