From f15a7e47e6b9c088a2f3ab8f6d760a519cfafcd2 Mon Sep 17 00:00:00 2001 From: Ilya Shakhat Date: Tue, 12 Dec 2017 14:44:44 +0100 Subject: Make collector configurable in DevStack plugin In DevStack OSProfiler is by default configured to use messaging driver with Ceilometer backend. User can change the driver, but still needs to install collector/storage manually. This patch introduces configuration option `OSPROFILER_COLLECTOR` which is used to specify which collector/storage to install into DevStack. Currently 2 values are supported: * `redis` to install Redis server and use Redis driver * to keep the default behavior and use messaging driver To test the patch on DevStack, the following lines are needed in local.conf: enable_plugin osprofiler https://git.openstack.org/openstack/osprofiler refs/changes/06/527406/5 OSPROFILER_BRANCH=refs/changes/06/527406/5 OSPROFILER_COLLECTOR=redis Change-Id: Ia9763605db95b3f35c8b0e51211f96ee0dd3a82d --- devstack/plugin.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'devstack/plugin.sh') diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 348da47..b2b6b6d 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -1,3 +1,4 @@ +#!/bin/bash # DevStack extras script to install osprofiler # Save trace setting @@ -6,8 +7,12 @@ set -o xtrace source $DEST/osprofiler/devstack/lib/osprofiler -if [[ "$1" == "stack" && "$2" == "post-config" ]]; then - echo_summary "Configuring OSprofiler" +if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then + echo_summary "Configuring system services for OSProfiler" + install_osprofiler_collector + +elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then + echo_summary "Configuring OSProfiler" configure_osprofiler fi -- cgit v1.2.1