Merge "Add ceilometer"
This commit is contained in:
commit
555767abbf
2
files/apts/ceilometer-collector
Normal file
2
files/apts/ceilometer-collector
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
python-pymongo
|
||||||
|
mongodb-server
|
2
files/rpms/ceilometer-collector
Normal file
2
files/rpms/ceilometer-collector
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
mongodb-server
|
||||||
|
pymongo
|
@ -129,6 +129,10 @@ function get_packages() {
|
|||||||
if [[ ! $file_to_parse =~ cinder ]]; then
|
if [[ ! $file_to_parse =~ cinder ]]; then
|
||||||
file_to_parse="${file_to_parse} cinder"
|
file_to_parse="${file_to_parse} cinder"
|
||||||
fi
|
fi
|
||||||
|
elif [[ $service == ceilometer-* ]]; then
|
||||||
|
if [[ ! $file_to_parse =~ ceilometer ]]; then
|
||||||
|
file_to_parse="${file_to_parse} ceilometer"
|
||||||
|
fi
|
||||||
elif [[ $service == n-* ]]; then
|
elif [[ $service == n-* ]]; then
|
||||||
if [[ ! $file_to_parse =~ nova ]]; then
|
if [[ ! $file_to_parse =~ nova ]]; then
|
||||||
file_to_parse="${file_to_parse} nova"
|
file_to_parse="${file_to_parse} nova"
|
||||||
@ -406,6 +410,7 @@ function is_service_enabled() {
|
|||||||
[[ ,${ENABLED_SERVICES}, =~ ,${service}, ]] && return 0
|
[[ ,${ENABLED_SERVICES}, =~ ,${service}, ]] && return 0
|
||||||
[[ ${service} == "nova" && ${ENABLED_SERVICES} =~ "n-" ]] && return 0
|
[[ ${service} == "nova" && ${ENABLED_SERVICES} =~ "n-" ]] && return 0
|
||||||
[[ ${service} == "cinder" && ${ENABLED_SERVICES} =~ "c-" ]] && return 0
|
[[ ${service} == "cinder" && ${ENABLED_SERVICES} =~ "c-" ]] && return 0
|
||||||
|
[[ ${service} == "ceilometer" && ${ENABLED_SERVICES} =~ "ceilometer-" ]] && return 0
|
||||||
[[ ${service} == "glance" && ${ENABLED_SERVICES} =~ "g-" ]] && return 0
|
[[ ${service} == "glance" && ${ENABLED_SERVICES} =~ "g-" ]] && return 0
|
||||||
[[ ${service} == "quantum" && ${ENABLED_SERVICES} =~ "q-" ]] && return 0
|
[[ ${service} == "quantum" && ${ENABLED_SERVICES} =~ "q-" ]] && return 0
|
||||||
done
|
done
|
||||||
|
60
lib/ceilometer
Normal file
60
lib/ceilometer
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
# lib/ceilometer
|
||||||
|
# Install and start Ceilometer service
|
||||||
|
|
||||||
|
# Dependencies:
|
||||||
|
# - functions
|
||||||
|
|
||||||
|
# stack.sh
|
||||||
|
# ---------
|
||||||
|
# install_XXX
|
||||||
|
# configure_XXX
|
||||||
|
# init_XXX
|
||||||
|
# start_XXX
|
||||||
|
# stop_XXX
|
||||||
|
# cleanup_XXX
|
||||||
|
|
||||||
|
# Print the commands being run so that we can see the command that triggers
|
||||||
|
# an error. It is also useful for following along as the install occurs.
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
|
||||||
|
# Defaults
|
||||||
|
# --------
|
||||||
|
|
||||||
|
# set up default directories
|
||||||
|
CEILOMETER_DIR=$DEST/ceilometer
|
||||||
|
CEILOMETER_CONF_DIR=/etc/ceilometer
|
||||||
|
CEILOMETER_AGENT_CONF=$CEILOMETER_CONF_DIR/ceilometer-agent.conf
|
||||||
|
CEILOMETER_COLLECTOR_CONF=$CEILOMETER_CONF_DIR/ceilometer-collector.conf
|
||||||
|
|
||||||
|
# cleanup_ceilometer() - Remove residual data files, anything left over from previous
|
||||||
|
# runs that a clean run would need to clean up
|
||||||
|
function cleanup_ceilometer() {
|
||||||
|
# This function intentionally left blank
|
||||||
|
:
|
||||||
|
}
|
||||||
|
|
||||||
|
# configure_ceilometer() - Set config files, create data dirs, etc
|
||||||
|
function configure_ceilometer() {
|
||||||
|
setup_develop $CEILOMETER_DIR
|
||||||
|
if [ ! -d $CEILOMETER_CONF_DIR ]; then
|
||||||
|
sudo mkdir -m 755 -p $CEILOMETER_CONF_DIR
|
||||||
|
fi
|
||||||
|
sudo chown `whoami` $CEILOMETER_CONF_DIR
|
||||||
|
|
||||||
|
# ceilometer confs are copy of /etc/nova/nova.conf which must exist first
|
||||||
|
grep -v format_string $NOVA_CONF_DIR/$NOVA_CONF > $CEILOMETER_AGENT_CONF
|
||||||
|
grep -v format_string $NOVA_CONF_DIR/$NOVA_CONF > $CEILOMETER_COLLECTOR_CONF
|
||||||
|
}
|
||||||
|
|
||||||
|
# install_ceilometer() - Collect source and prepare
|
||||||
|
function install_ceilometer() {
|
||||||
|
git_clone $CEILOMETER_REPO $CEILOMETER_DIR $CEILOMETER_BRANCH
|
||||||
|
}
|
||||||
|
|
||||||
|
# start_ceilometer() - Start running processes, including screen
|
||||||
|
function start_ceilometer() {
|
||||||
|
screen_it ceilometer-acompute "cd $CEILOMETER_DIR && $CEILOMETER_DIR/bin/ceilometer-agent-compute --config-file $CEILOMETER_AGENT_CONF"
|
||||||
|
screen_it ceilometer-acentral "cd $CEILOMETER_DIR && $CEILOMETER_DIR/bin/ceilometer-agent-central --config-file $CEILOMETER_AGENT_CONF"
|
||||||
|
screen_it ceilometer-collector "cd $CEILOMETER_DIR && $CEILOMETER_DIR/bin/ceilometer-collector --config-file $CEILOMETER_COLLECTOR_CONF"
|
||||||
|
}
|
8
stack.sh
8
stack.sh
@ -240,6 +240,7 @@ sudo chown `whoami` $DATA_DIR
|
|||||||
|
|
||||||
# Get project function libraries
|
# Get project function libraries
|
||||||
source $TOP_DIR/lib/cinder
|
source $TOP_DIR/lib/cinder
|
||||||
|
source $TOP_DIR/lib/ceilometer
|
||||||
|
|
||||||
# Set the destination directories for openstack projects
|
# Set the destination directories for openstack projects
|
||||||
NOVA_DIR=$DEST/nova
|
NOVA_DIR=$DEST/nova
|
||||||
@ -789,6 +790,9 @@ fi
|
|||||||
if is_service_enabled cinder; then
|
if is_service_enabled cinder; then
|
||||||
install_cinder
|
install_cinder
|
||||||
fi
|
fi
|
||||||
|
if is_service_enabled ceilometer; then
|
||||||
|
install_ceilometer
|
||||||
|
fi
|
||||||
|
|
||||||
# Initialization
|
# Initialization
|
||||||
# ==============
|
# ==============
|
||||||
@ -2119,6 +2123,10 @@ screen_it n-cauth "cd $NOVA_DIR && ./bin/nova-consoleauth"
|
|||||||
if is_service_enabled cinder; then
|
if is_service_enabled cinder; then
|
||||||
start_cinder
|
start_cinder
|
||||||
fi
|
fi
|
||||||
|
if is_service_enabled ceilometer; then
|
||||||
|
configure_ceilometer
|
||||||
|
start_ceilometer
|
||||||
|
fi
|
||||||
screen_it horizon "cd $HORIZON_DIR && sudo tail -f /var/log/$APACHE_NAME/horizon_error.log"
|
screen_it horizon "cd $HORIZON_DIR && sudo tail -f /var/log/$APACHE_NAME/horizon_error.log"
|
||||||
screen_it swift "cd $SWIFT_DIR && $SWIFT_DIR/bin/swift-proxy-server ${SWIFT_CONFIG_DIR}/proxy-server.conf -v"
|
screen_it swift "cd $SWIFT_DIR && $SWIFT_DIR/bin/swift-proxy-server ${SWIFT_CONFIG_DIR}/proxy-server.conf -v"
|
||||||
|
|
||||||
|
4
stackrc
4
stackrc
@ -24,6 +24,10 @@ NOVA_ENABLED_APIS=ec2,osapi_compute,osapi_volume,metadata
|
|||||||
# Another option is http://review.openstack.org/p
|
# Another option is http://review.openstack.org/p
|
||||||
GIT_BASE=https://github.com
|
GIT_BASE=https://github.com
|
||||||
|
|
||||||
|
# metering service
|
||||||
|
CEILOMETER_REPO=https://github.com/stackforge/ceilometer.git
|
||||||
|
CEILOMETER_BRANCH=master
|
||||||
|
|
||||||
# volume service
|
# volume service
|
||||||
CINDER_REPO=${GIT_BASE}/openstack/cinder
|
CINDER_REPO=${GIT_BASE}/openstack/cinder
|
||||||
CINDER_BRANCH=master
|
CINDER_BRANCH=master
|
||||||
|
Loading…
Reference in New Issue
Block a user