diff options
| author | Boris Pavlovic <boris@pavlovic.me> | 2016-01-12 13:34:38 -0800 |
|---|---|---|
| committer | Boris Pavlovic <boris@pavlovic.me> | 2016-01-14 01:41:39 -0800 |
| commit | a6cb3c08cc002829c51d944ce755ed828da6833a (patch) | |
| tree | c040e07653425a9652b07ea96e0970ca102bfc2b /devstack/lib | |
| parent | d75fa8911586f4769679e36424305f76e58250a1 (diff) | |
| download | osprofiler-a6cb3c08cc002829c51d944ce755ed828da6833a.tar.gz | |
Add DevStack plugin
This allows us to automate enabling OSProfiler in OpenStack
Just add to DevStack localrc file:
enable_plugin ceilometer https://github.com/openstack/ceilometer
enable_plugin osprofiler https://github.com/openstack/osprofiler
Change-Id: I3607407dd506723c1aad6696ec98eaed8a8ddd9e
Diffstat (limited to 'devstack/lib')
| -rw-r--r-- | devstack/lib/osprofiler | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/devstack/lib/osprofiler b/devstack/lib/osprofiler new file mode 100644 index 0000000..850aa53 --- /dev/null +++ b/devstack/lib/osprofiler @@ -0,0 +1,82 @@ +# lib/rally +# Functions to control the configuration and operation of the **Rally** + +# Dependencies: +# +# - ``functions`` file +# - ``DEST``, ``DATA_DIR``, ``STACK_USER`` must be defined + +# ``stack.sh`` calls the entry points in this order: +# +# - install_osprofiler +# - configure_osprofiler +# - init_osprofiler + +# Save trace setting +XTRACE=$(set +o | grep xtrace) +set +o xtrace + + +# Defaults +# -------- + +OLD_STYLE_CONF_FILES=( + /etc/cinder/cinder.conf + /etc/heat/heat.conf +) + +NEW_STYLE_CONF_FILES=( + /etc/keystone/keystone.conf + /etc/nova/nova.conf + /etc/neutron/neutron.conf + /etc/glance/glance-api.conf + /etc/glance/glance-registry.conf + /etc/trove/trove.conf + /etc/trove/trove-conductor.conf + /etc/trove/trove-guestagent.conf + /etc/trove/trove-taskmanager.conf +) + +# This will update CEILOMETER_NOTIFICATION_TOPICS in ceilometer.conf file +export CEILOMETER_NOTIFICATION_TOPICS=notifications,profiler + + +# Functions +# --------- + +# configure_osprofiler() - Nothing for now +function configure_osprofiler() { + + for conf in ${OLD_STYLE_CONF_FILES[@]}; do + if [ -f $conf ] + then + iniset $conf profiler profiler_enabled True + iniset $conf profiler trace_sqlalchemy True + iniset $conf profiler hmac_keys SECRET_KEY + fi + done + + for conf in ${NEW_STYLE_CONF_FILES[@]}; do + if [ -f $conf ] + then + iniset $conf profiler enabled True + iniset $conf profiler trace_sqlalchemy True + iniset $conf profiler hmac_keys SECRET_KEY + fi + done +} + + +# init_rally() - Initialize databases, etc. +function init_osprofiler() { + + echo "Do nothing here for now" +} + +# Restore xtrace +$XTRACE + +# Tell emacs to use shell-script-mode +## Local variables: +## mode: shell-script +## End: |
