Skip to content

Instantly share code, notes, and snippets.

@cloudnull
Last active December 28, 2015 04:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cloudnull/7444013 to your computer and use it in GitHub Desktop.
Save cloudnull/7444013 to your computer and use it in GitHub Desktop.
Patch Ceilometer for Havana Openstack to allow for the Ceilometer Metaquery functions to run. This also allows Ceilometer to render Graphs and Metrics in Horizon.
#!/usr/bin/env bash
# Ceilometer patch
set -e
set -u
set -v
# OS Check
if [ "$(grep -i -e redhat -e centos /etc/redhat-release)" ]; then
yum -y install git python-pip
SERVICES="/etc/init.d/openstack-ceilometer*"
elif [ "$(grep -i ubuntu /etc/lsb-release)" ];then
apt-get -y install git python-pip
SERVICES="/etc/init.d/ceilometer*"
else
echo "This is not a supported OS, So this script will not work."
exit 1
fi
if [ -d "/tmp/ceilometer-patch" ];then
rm -rf /tmp/ceilometer-patch
fi
# Clone Down Ceilometer havana
git clone -b "stable/havana" https://github.com/openstack/ceilometer.git /tmp/ceilometer-patch
# Patch Ceilometer to support MetaQuery
pushd /tmp/ceilometer-patch
# Get our patch
git fetch https://review.openstack.org/openstack/ceilometer refs/changes/56/49456/13
git checkout FETCH_HEAD
# Install it
pip install --upgrade Babel==1.3
python setup.py install
popd
ceilometer-dbsync
# Restart all of the services
for SERVICE in ${SERVICES};do
${SERVICE} restart
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment