openstack-doc-tools/autogenerate_config_docs
Jenkins b4a830678f Merge "[diff_branches] Projects can be passed as arguments" 2015-12-08 05:49:13 +00:00
..
extra_repos Repo change for networking-bagpipe-l2 2015-11-13 10:49:16 +08:00
releasenotes/notes autohelp.py: switch to jinja templates 2015-11-15 19:40:17 +01:00
requirements Repo change for networking-bagpipe-l2 2015-11-13 10:49:16 +08:00
templates [autohelp] Avoid long lines in templates 2015-12-07 17:03:51 +01:00
test Drop use of 'oslo' namespace package 2015-04-28 22:18:23 +00:00
README.rst Update README for autogenerate_config_docs 2015-11-18 19:20:34 +09:00
__init__.py Rename autogenerate-config-docs to autogenerate_config_docs 2014-01-21 17:00:22 +01:00
autohelp-wrapper [autohelp] misc fixes 2015-11-25 17:09:10 +01:00
autohelp.ignore [autohelp] Move ignored modules list to a file 2015-11-15 17:50:55 +01:00
autohelp.py Merge "[autohelp] Add table label for RST reference" 2015-11-23 12:48:26 +00:00
diff_branches.py [diff_branches] Projects can be passed as arguments 2015-12-07 14:36:29 +01:00
extract_swift_flags.py [autohelp] misc fixes 2015-11-25 17:09:10 +01:00
flow.dia Rename autogenerate-config-docs to autogenerate_config_docs 2014-01-21 17:00:22 +01:00
hooks.py Fix alphabetical order in hooks.py 2015-09-24 10:40:24 +02:00
requirements.txt swift flags: read from RST 2015-11-15 15:24:49 +01:00

README.rst

autogenerate_config_docs

Automatically generate configuration tables to document OpenStack.

Using the wrapper

autohelp-wrapper is the recommended tool to generate the configuration tables. Don't bother using autohelp.py manually.

The autohelp-wrapper script installs a virtual environment and all the needed dependencies, clones or updates the projects and manuals repositories, then runs the autohelp.py script in the virtual environment.

New and updated flagmappings are generated in the openstack-manuals repository (tools/autogenerate-config-flagmappings/ directory).

Prior to running the following commands you need to install several development packages. For Ubuntu install the required packages with the following command:

$ sudo apt-get install python-dev libxml2-dev libxslt1-dev libz-dev \
                       libmysqlclient-dev libpq-dev libffi-dev \
                       libsqlite3-dev libldap2-dev libsasl2-dev

The workflow is:

$ pip install -rrequirements.txt
$ ./autohelp-wrapper update
$ $EDITOR sources/openstack-manuals/tools/autogenerate-config-flagmappings/*.flagmappings
$ ./autohelp-wrapper rst
$ # check the results in sources/openstack-manuals

This will generate the tables for all the known projects. Note for Neutron project: If the driver/plugin resides outside the Neutron repository in stackforge, then the driver/plugin has to be explicitly installed within the virtual environment to generate the configuration options.

To generate the mappings and tables for a subset of projects, use the code names as arguments:

$ ./autohelp-wrapper update cinder heat
$ # edit the mappings files
$ ./autohelp-wrapper rst cinder heat

Creating mappings for a new project

Run the wrapper with the create subcommand:

$ ./autohelp-wrapper create zaqar

Flagmappings files

The flagmappings files use the following format:

OPTION_SECTION/OPTION_NAME group1 [group2, ...]

Groups need to be defined manually to organize the configuration tables.

The group values can only contain alphanumeric characters, _ and - (they will be used as docbook IDs).

To make the table titles more user friendly, create or edit the PROJECT.headers file in the manuals repository. Each line of this file is of the form:

GROUP A Nice Title

Working with branches

autohelp-wrapper works on the master branch by default, but you can tell it to work on another branch:

$ ./autohelp-wrapper update -b stable/liberty

Note

The -b switch doesn't apply to the openstack-manuals repository which will be left untouched (no git branch, no git update).

Updating swift options

Swift configuration tables are generated using the extract_swift_flags.py script. This script doesn't use a mapping file, but organize the tables using the various configuration files and sections. Most of the options must be described manually at the moment.