summaryrefslogtreecommitdiff
path: root/devstack/plugin.sh
diff options
context:
space:
mode:
authorBoris Pavlovic <boris@pavlovic.me>2016-01-12 13:34:38 -0800
committerBoris Pavlovic <boris@pavlovic.me>2016-01-14 01:41:39 -0800
commita6cb3c08cc002829c51d944ce755ed828da6833a (patch)
treec040e07653425a9652b07ea96e0970ca102bfc2b /devstack/plugin.sh
parentd75fa8911586f4769679e36424305f76e58250a1 (diff)
downloadosprofiler-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/plugin.sh')
-rw-r--r--devstack/plugin.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
new file mode 100644
index 0000000..303b605
--- /dev/null
+++ b/devstack/plugin.sh
@@ -0,0 +1,24 @@
+# DevStack extras script to install Rally
+
+# Save trace setting
+XTRACE=$(set +o | grep xtrace)
+set -o xtrace
+
+source $DEST/osprofiler/devstack/lib/osprofiler
+
+if [[ "$1" == "source" ]]; then
+ # Initial source
+ source $TOP_DIR/lib/rally
+# elif [[ "$1" == "stack" && "$2" == "install" ]]; then
+# echo_summary "Installing OSprofiler"
+# install_rally
+elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
+ echo_summary "Configuring OSprofiler"
+ configure_osprofiler
+elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
+ echo_summary "Initializing OSprofiler"
+ init_osprofiler
+fi
+
+# Restore xtrace
+$XTRACE