Last active
December 28, 2015 04:39
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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