devstack: make option hmac_keys configurable
Let the Devstack users override the default value of option `hmac_keys` by the means of the environment variable set in local.conf. Change-Id: I0241abc4129f2d0130246723b78c584d448870a2
This commit is contained in:
parent
93aec6a99f
commit
5d4fd50fac
@ -14,6 +14,13 @@ To configure DevStack to enable OSProfiler edit
|
||||
|
||||
to the ``[[local|localrc]]`` section.
|
||||
|
||||
One can also configure 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
|
||||
|
||||
.. note:: The order of enabling plugins matter.
|
||||
|
||||
Run DevStack as normal::
|
||||
|
@ -50,7 +50,7 @@ function configure_osprofiler() {
|
||||
then
|
||||
iniset $conf profiler enabled True
|
||||
iniset $conf profiler trace_sqlalchemy True
|
||||
iniset $conf profiler hmac_keys SECRET_KEY
|
||||
iniset $conf profiler hmac_keys $OSPROFILER_HMAC_KEYS
|
||||
fi
|
||||
done
|
||||
CEILOMETER_CONF=/etc/ceilometer/ceilometer.conf
|
||||
|
@ -1,3 +1,8 @@
|
||||
# Devstack settings
|
||||
|
||||
# A comma-separated list of secrets, that will be used for triggering
|
||||
# of profiling in OpenStack services: profiling is only performed for
|
||||
# requests that specify one of these keys in HTTP headers.
|
||||
OSPROFILER_HMAC_KEYS=${OSPROFILER_HMAC_KEYS:-"SECRET_KEY"}
|
||||
|
||||
enable_service osprofiler
|
||||
|
Loading…
Reference in New Issue
Block a user