summaryrefslogtreecommitdiff
path: root/devstack/README.rst
blob: 2cf7d20429b51da4a0a569bb1ebb433dcf59c650 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
==================================
Enabling OSProfiler using DevStack
==================================

This directory contains the files necessary to run OpenStack with enabled
OSProfiler in DevStack.

OSProfiler can send trace data into different collectors. There are 2 parameters
that control this:

* ``OSPROFILER_COLLECTOR`` specifies which collector to install in DevStack.
  By default OSProfiler plugin does not install anything, thus default
  messaging driver with Ceilometer storage will be used.

  Possible values:

  * ``<empty>`` - default messaging driver with Ceilometer is used
  * ``redis`` - Redis is installed

  The default value of ``OSPROFILER_CONNECTION_STRING`` is set automatically
  depending on ``OSPROFILER_COLLECTOR`` value.

* ``OSPROFILER_CONNECTION_STRING`` specifies which driver is used by OSProfiler.

  Possible values:

  * ``messaging://`` - use messaging as trace collector (with the transport configured by oslo.messaging)
  * ``redis://host:port`` - use Redis as trace storage
  * ``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


To configure DevStack and enable OSProfiler edit ``${DEVSTACK_DIR}/local.conf``
file and add the following to ``[[local|localrc]]`` section:

* to use Redis collector::

      enable_plugin osprofiler https://git.openstack.org/openstack/osprofiler master
      OSPROFILER_COLLECTOR=redis

  OSProfiler plugin will install Redis and configure OSProfiler to use Redis driver

* to use specified driver::

      enable_plugin osprofiler https://git.openstack.org/openstack/osprofiler master
      OSPROFILER_CONNECTION_STRING=<connection string value>

  the driver is chosen depending on the value of
  ``OSPROFILER_CONNECTION_STRING`` variable (refer to the next section for
  details)

* to use default Ceilometer driver::

      enable_plugin panko https://git.openstack.org/openstack/panko master
      enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer master
      enable_plugin osprofiler https://git.openstack.org/openstack/osprofiler master

  Note: the order of enabling plugins matters.

Run DevStack as normal::

    $ ./stack.sh


Config variables
----------------

**OSPROFILER_HMAC_KEYS** - a set of HMAC secrets, that are used for triggering
of profiling in OpenStack services: only the requests that specify one of these
keys in HTTP headers will be profiled. E.g. multiple secrets are specified as
a comma-separated list of string values::

    OSPROFILER_HMAC_KEYS=swordfish,foxtrot,charlie

**OSPROFILER_CONNECTION_STRING** - connection string to identify the driver.
Default value is ``messaging://`` refers to Ceilometer driver. For a full
list of drivers please refer to
``http://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

**OSPROFILER_COLLECTOR** - controls which collector to install into DevStack.
The driver is then chosen automatically based on the collector. Empty value assumes
that the default messaging driver with Ceilometer is used.
Example: enable Redis collector::

    OSPROFILER_COLLECTOR=redis