Merge "doc: rely on oslo-config-generator to generate the config file"
This commit is contained in:
commit
ea90f78195
@ -10,19 +10,7 @@ easily created by running:
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
tox -e genconfig
|
oslo-config-generator --config-file=/etc/gnocchi/gnocchi-config-generator.conf --output-file=/etc/gnocchi/gnocchi.conf
|
||||||
|
|
||||||
This command will create an `etc/gnocchi/gnocchi.conf` file which can be used
|
|
||||||
as a base for the default configuration file at `/etc/gnocchi/gnocchi.conf`. If
|
|
||||||
you're using _devstack_, this file is already generated and put in place.
|
|
||||||
|
|
||||||
If you installed Gnocchi using pip, you can create a sample `gnocchi.conf` file
|
|
||||||
using the following commands:
|
|
||||||
|
|
||||||
::
|
|
||||||
|
|
||||||
curl -O "https://raw.githubusercontent.com/openstack/gnocchi/master/gnocchi-config-generator.conf"
|
|
||||||
oslo-config-generator --config-file=gnocchi-config-generator.conf --output-file=gnocchi.conf
|
|
||||||
|
|
||||||
The configuration file should be pretty explicit, but here are some of the base
|
The configuration file should be pretty explicit, but here are some of the base
|
||||||
options you want to change and configure:
|
options you want to change and configure:
|
||||||
|
@ -19,6 +19,6 @@ def prehook(cmd):
|
|||||||
try:
|
try:
|
||||||
from oslo_config import generator
|
from oslo_config import generator
|
||||||
generator.main(['--config-file',
|
generator.main(['--config-file',
|
||||||
'gnocchi-config-generator.conf'])
|
'etc/gnocchi/gnocchi-config-generator.conf'])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Unable to build sample configuration file: %s" % e)
|
print("Unable to build sample configuration file: %s" % e)
|
||||||
|
4
tox.ini
4
tox.ini
@ -22,7 +22,7 @@ setenv =
|
|||||||
|
|
||||||
commands =
|
commands =
|
||||||
doc8 --ignore-path doc/source/rest.rst doc/source
|
doc8 --ignore-path doc/source/rest.rst doc/source
|
||||||
oslo-config-generator --config-file=gnocchi-config-generator.conf
|
oslo-config-generator --config-file=etc/gnocchi/gnocchi-config-generator.conf
|
||||||
{toxinidir}/run-tests.sh {posargs}
|
{toxinidir}/run-tests.sh {posargs}
|
||||||
|
|
||||||
[testenv:bashate]
|
[testenv:bashate]
|
||||||
@ -63,7 +63,7 @@ show-source = true
|
|||||||
|
|
||||||
[testenv:genconfig]
|
[testenv:genconfig]
|
||||||
deps = .[mysql,postgresql,test,file,ceph,swift]
|
deps = .[mysql,postgresql,test,file,ceph,swift]
|
||||||
commands = oslo-config-generator --config-file=gnocchi-config-generator.conf
|
commands = oslo-config-generator --config-file=etc/gnocchi/gnocchi-config-generator.conf
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
# This does not work, see: https://bitbucket.org/hpk42/tox/issues/302
|
# This does not work, see: https://bitbucket.org/hpk42/tox/issues/302
|
||||||
|
Loading…
Reference in New Issue
Block a user