From 4016d11e91a669c152053e8c0f5d5f57dc88ddaf Mon Sep 17 00:00:00 2001 From: Nikhil Komawar Date: Mon, 9 May 2016 00:03:55 -0400 Subject: [PATCH] Generate and include sample config as part of docs Use oslo.config sphinx extension "sphinxconfiggen" to generate sample configuration files at the beginning of each sphinx build. Include the generated sample configuration files as part of the developer docs so that they can be removed from the code tree eventually. Change-Id: I42934a437272b3822efd84bfe16392341804baed Co-Authored-By: Nikhil Komawar Co-Authored-By: Hemanth Makkapati --- doc/source/conf.py | 16 ++++++++++ doc/source/configuring.rst | 7 ++--- doc/source/index.rst | 1 + doc/source/sample-configuration.rst | 48 +++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 4 deletions(-) create mode 100644 doc/source/sample-configuration.rst diff --git a/doc/source/conf.py b/doc/source/conf.py index 372e9a8b99..24c92801b3 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -52,8 +52,24 @@ extensions = ['sphinx.ext.coverage', 'oslo_config.sphinxext', 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', + 'oslo_config.sphinxconfiggen', ] +config_generator_config_file = [ + ('../../etc/oslo-config-generator/glance-api.conf', + '_static/glance-api'), + ('../../etc/oslo-config-generator/glance-cache.conf', + '_static/glance-cache'), + ('../../etc/oslo-config-generator/glance-glare.conf', + '_static/glance-glare'), + ('../../etc/oslo-config-generator/glance-manage.conf', + '_static/glance-manage'), + ('../../etc/oslo-config-generator/glance-registry.conf', + '_static/glance-registry'), + ('../../etc/oslo-config-generator/glance-scrubber.conf', + '_static/glance-scrubber'), +] + # Add any paths that contain templates here, relative to this directory. # templates_path = [] diff --git a/doc/source/configuring.rst b/doc/source/configuring.rst index f7310d7a25..764eb9bb8c 100644 --- a/doc/source/configuring.rst +++ b/doc/source/configuring.rst @@ -42,10 +42,9 @@ installed Glance via your operating system's package management system, it is likely that you will have sample configuration files installed in ``/etc/glance``. -In addition to this documentation page, you can check the -``etc/glance-api.conf`` and ``etc/glance-registry.conf`` sample configuration -files distributed with Glance for example configuration files for each server -application with detailed comments on what each options does. +In addition, sample configuration files for each server application with +detailed comments are available in the :doc:`Glance Sample Configuration +` section. The PasteDeploy configuration (controlling the deployment of the WSGI application for each component) may be found by default in diff --git a/doc/source/index.rst b/doc/source/index.rst index 553055a6b9..1b8b2f34da 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -69,6 +69,7 @@ Installing/Configuring Glance installing configuring + sample-configuration authentication policies image-location-strategy-modules diff --git a/doc/source/sample-configuration.rst b/doc/source/sample-configuration.rst new file mode 100644 index 0000000000..062e048e3d --- /dev/null +++ b/doc/source/sample-configuration.rst @@ -0,0 +1,48 @@ +=========================== +Glance Sample Configuration +=========================== + +The following are sample configuration files for all Glance services and +utilities. These are generated from code and reflect the current state of code +in the Glance repository. + +Sample configuration for Glance API +----------------------------------- +This sample configuration can also be viewed in `file form <_static/glance-api.conf.sample>`_. + +.. literalinclude:: _static/glance-api.conf.sample + + +Sample configuration for Glance Registry +---------------------------------------- +This sample configuration can also be viewed in `file form <_static/glance-registry.conf.sample>`_. + +.. literalinclude:: _static/glance-registry.conf.sample + + +Sample configuration for Glance Scrubber +---------------------------------------- +This sample configuration can also be viewed in `file form <_static/glance-scrubber.conf.sample>`_. + +.. literalinclude:: _static/glance-scrubber.conf.sample + + +Sample configuration for Glance Manage +-------------------------------------- +This sample configuration can also be viewed in `file form <_static/glance-manage.conf.sample>`_. + +.. literalinclude:: _static/glance-manage.conf.sample + + +Sample configuration for Glance Cache +------------------------------------- +This sample configuration can also be viewed in `file form <_static/glance-cache.conf.sample>`_. + +.. literalinclude:: _static/glance-cache.conf.sample + + +Sample configuration for Glare +------------------------------ +This sample configuration can also be viewed in `file form <_static/glance-glare.conf.sample>`_. + +.. literalinclude:: _static/glance-glare.conf.sample