From 40dc11f9bfbb8917a09902f97bd5387cd2484cbd Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 27 Apr 2014 11:42:00 +0200 Subject: [PATCH] Document INI format for Config Reference Document the format of OpenStack configuration files - INI format. Add an entry to the glossary for INI. Change-Id: I4d0e16b36d1e261b223b3f842dbdac5fcfa770ab Closes-Bug: #1310457 --- doc/common/section_config_format.xml | 150 ++++++++++++++++++++ doc/config-reference/ch_config-overview.xml | 1 + doc/glossary/glossary-terms.xml | 10 ++ 3 files changed, 161 insertions(+) create mode 100644 doc/common/section_config_format.xml diff --git a/doc/common/section_config_format.xml b/doc/common/section_config_format.xml new file mode 100644 index 0000000000..a6088b3ee8 --- /dev/null +++ b/doc/common/section_config_format.xml @@ -0,0 +1,150 @@ + +
+ + Configuration file format + + + OpenStack uses the INI file format for + configuration files. An INI file is a simple text file that + specifies options as key=value pairs, + grouped into sections. The DEFAULT section + contains most of the configuration options. Lines starting with a + hash sign (#) are comment lines. For example: + + [DEFAULT] +# Print debugging output (set logging level to DEBUG instead +# of default WARNING level). (boolean value) +debug=true +# Print more verbose output (set logging level to INFO instead +# of default WARNING level). (boolean value) +verbose=true + + + Options can have different type for values. The comments in the + sample config files always mention these. The following types are + used by OpenStack: + + + + boolean value + + + Enables or disables an option. The allowed values are + true and false. + +# Enable the experimental use of database reconnect on +# connection lost (boolean value) +use_db_reconnect=false + + + + floating point value + + A floating point number like 0.25 + or 1000. + +# Sleep time in seconds for polling an ongoing async task +# (floating point value) +task_poll_interval=0.5 + + + + integer value + + + An integer number is a number without fractional components, + like 0 or 42. + +# The port which the OpenStack Compute service listens on. +# (integer value) +compute_port=8774 + + + + list value + + + Represents values of other types, separated by commas. As an + example, the following sets + to a list + containing the four elements + oslo.messaging.exceptions, + nova.exception, + cinder.exception, and + exceptions: + + # Modules of exceptions that are permitted to be recreated +# upon receiving exception data from an rpc call. (list value) +allowed_rpc_exception_modules=oslo.messaging.exceptions,nova.exception,cinder.exception,exceptions + + + + multi valued + + + A multi-valued option is a string value and can be given + more than once, all values will be used. + +# Driver or drivers to handle sending notifications. (multi +# valued) +notification_driver = nova.openstack.common.notifier.rpc_notifier +notification_driver = ceilometer.compute.nova_notifier + + + + string value + + + Strings can be optionally enclosed with single or double + quotes. + +# onready allows you to send a notification when the process +# is ready to serve. For example, to have it notify using +# systemd, one could set shell command: "onready = systemd- +# notify --ready" or a module with notify() method: "onready = +# keystone.common.systemd". (string value) +onready=systemd-notify --ready + +# If an instance is passed with the log message, format it +# like this (string value) +instance_format="[instance: %(uuid)s] " + + + + +
+ Substitution + + + Option values may reference other values using PEP + 292 string substitution. An option can be referenced by + adding a $ in front of its name, like + $OPTION. To avoid substitution, use + $$, it is replaced by a single + $. + + + The following example uses the values of + rabbit_host and + rabbit_port to define the value of the + rabbit_hosts option, in this case as + controller:5672. + +# The RabbitMQ broker address where a single node is used. +# (string value) +rabbit_host=controller + +# The RabbitMQ broker port where a single node is used. +# (integer value) +rabbit_port=5672 + +# RabbitMQ HA cluster host:port pairs. (list value) +rabbit_hosts=$rabbit_host:$rabbit_port + +
+ +
diff --git a/doc/config-reference/ch_config-overview.xml b/doc/config-reference/ch_config-overview.xml index 4b36806f3a..ac36faa682 100644 --- a/doc/config-reference/ch_config-overview.xml +++ b/doc/config-reference/ch_config-overview.xml @@ -26,4 +26,5 @@ + diff --git a/doc/glossary/glossary-terms.xml b/doc/glossary/glossary-terms.xml index d4f4348309..d0c6e99d6c 100644 --- a/doc/glossary/glossary-terms.xml +++ b/doc/glossary/glossary-terms.xml @@ -2570,6 +2570,16 @@ traffic. Supported by Compute. + + INI + + + The OpenStack configuration files use an INI format + to describe options and their values. It consists of + sections and key value pairs. + + + injection