diff options
-rw-r--r-- | devstack/README.rst | 4 | ||||
-rw-r--r-- | devstack/lib/osprofiler | 16 | ||||
-rw-r--r-- | devstack/plugin.sh | 2 | ||||
-rw-r--r-- | setup.cfg | 2 |
4 files changed, 21 insertions, 3 deletions
diff --git a/devstack/README.rst b/devstack/README.rst index 2d4ceab..f226f0d 100644 --- a/devstack/README.rst +++ b/devstack/README.rst @@ -16,6 +16,7 @@ that control this: * ``<empty>`` - default messaging driver is used * ``redis`` - Redis is installed + * ``jaeger`` - Jaeger is installed The default value of ``OSPROFILER_CONNECTION_STRING`` is set automatically depending on ``OSPROFILER_COLLECTOR`` value. @@ -29,6 +30,7 @@ that control this: * ``elasticsearch://host:port`` - use Elasticsearch as trace storage * ``mongodb://host:port`` - use MongoDB as trace storage * ``loginsight://username:password@host`` - use LogInsight as trace collector/storage + * ``jaeger://host:port`` - use Jaeger as trace collector To configure DevStack and enable OSProfiler edit ``${DEVSTACK_DIR}/local.conf`` @@ -69,7 +71,7 @@ a comma-separated list of string values:: **OSPROFILER_CONNECTION_STRING** - connection string to identify the driver. Default value is ``messaging://`` refers to messaging driver. For a full list of drivers please refer to -``http://git.openstack.org/cgit/openstack/osprofiler/tree/osprofiler/drivers``. +``https://git.openstack.org/cgit/openstack/osprofiler/tree/osprofiler/drivers``. Example: enable ElasticSearch driver with the server running on localhost:: OSPROFILER_CONNECTION_STRING=elasticsearch://127.0.0.1:9200 diff --git a/devstack/lib/osprofiler b/devstack/lib/osprofiler index cd73a4e..0627372 100644 --- a/devstack/lib/osprofiler +++ b/devstack/lib/osprofiler @@ -56,12 +56,28 @@ function install_redis() { pip_install_gr redis } +function install_jaeger() { + if is_ubuntu; then + install_package docker.io + start_service docker + add_user_to_group stack docker + sg docker -c "docker run -d --name jaeger -p 6831:6831/udp -p 16686:16686 jaegertracing/all-in-one:1.7" + else + exit_distro_not_supported "docker.io installation" + fi + + pip_install jaeger-client +} + function install_osprofiler_collector() { if [ -z "$OSPROFILER_COLLECTOR" ]; then OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-"messaging://"} elif [ "$OSPROFILER_COLLECTOR" == "redis" ]; then install_redis OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-"redis://localhost:6379"} + elif [ "$OSPROFILER_COLLECTOR" == "jaeger" ]; then + install_jaeger + OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-"jaeger://localhost:6831"} else die $LINENO "OSProfiler collector $OSPROFILER_COLLECTOR is not supported" fi diff --git a/devstack/plugin.sh b/devstack/plugin.sh index b2b6b6d..600c86e 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -7,7 +7,7 @@ set -o xtrace source $DEST/osprofiler/devstack/lib/osprofiler -if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then +if [[ "$1" == "stack" && "$2" == "install" ]]; then echo_summary "Configuring system services for OSProfiler" install_osprofiler_collector @@ -4,7 +4,7 @@ summary = OpenStack Profiler Library description-file = README.rst author = OpenStack -author-email = openstack-dev@lists.openstack.org +author-email = openstack-discuss@lists.openstack.org home-page = https://docs.openstack.org/osprofiler/latest/ classifier = Environment :: OpenStack |