openstack-manuals/doc/config-reference/object-storage/section_object-storage-general-service-conf.xml
Andreas Jaeger 4c4c74acc4 Change command line to command-line
Use "command-line" if it's used as an adjective, for example
"command-line tool".

Improve capitalization and tagging.

Change-Id: I43c73ff295d3b6d0ad43c3c20566ce7bf3742c00
2014-02-25 19:34:18 +01:00

114 lines
4.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
xml:id="swift-general-service-configuration">
<title>Object Storage general service configuration</title>
<para>
Most Object Storage services fall into two categories, Object Storage's wsgi servers
and background daemons.
</para>
<para>
Object Storage uses paste.deploy to manage server configurations. Read more at <link xlink:href="http://pythonpaste.org/deploy/">http://pythonpaste.org/deploy/</link>.
</para>
<para>
Default configuration options are set in the `[DEFAULT]` section,
and any options specified there can be overridden in any of the
other sections when the syntax <literal>set option_name = value</literal>
is in place.</para>
<para>
Configuration for servers and daemons can be expressed together in
the same file for each type of server, or separately. If a required
section for the service trying to start is missing there will be an
error. Sections not used by the service are ignored.
</para>
<para>
Consider the example of an Object Storage node. By convention
configuration for the <systemitem
class="service">object-server</systemitem>, <systemitem
class="service">object-updater</systemitem>, <systemitem
class="service">object-replicator</systemitem>, and
<systemitem class="service">object-auditor</systemitem> exist
in a single file
<filename>/etc/swift/object-server.conf</filename>:
</para>
<programlisting language="ini">
[DEFAULT]
[pipeline:main]
pipeline = object-server
[app:object-server]
use = egg:swift#object
[object-replicator]
reclaim_age = 259200
[object-updater]
[object-auditor]
</programlisting>
<para>
Object Storage services expect a configuration path as the first argument:
</para>
<screen><prompt>$</prompt> <userinput>swift-object-auditor</userinput>
<computeroutput>Usage: swift-object-auditor CONFIG [options]
Error: missing config path argument
</computeroutput></screen>
<para>
If you omit the object-auditor section, this file cannot be used
as the configuration path when starting the
<command>swift-object-auditor</command> daemon:
</para>
<screen><prompt>$</prompt> <userinput>swift-object-auditor /etc/swift/object-server.conf</userinput>
<computeroutput>Unable to find object-auditor config section in /etc/swift/object-server.conf
</computeroutput></screen>
<para>
If the configuration path is a directory instead of a file all of
the files in the directory with the file extension &quot;.conf&quot;
will be combined to generate the configuration object which is
delivered to the Object Storage service. This is referred to generally as
&quot;directory-based configuration&quot;.
</para>
<para>
Directory-based configuration leverages ConfigParser's native
multi-file support. Files ending in &quot;.conf&quot; in the given
directory are parsed in lexicographical order. File names starting
with '.' are ignored. A mixture of file and directory configuration
paths is not supported - if the configuration path is a file, only
that file will be parsed.
</para>
<para>
The Object Storage service management tool
<filename>swift-init</filename>
has adopted the convention of looking for
<filename>/etc/swift/{type}-server.conf.d/</filename> if the file
<filename>/etc/swift/{type}-server.conf</filename> file does not
exist.
</para>
<para>
When using directory-based configuration, if the same option under
the same section appears more than once in different files, the last
value parsed is said to override previous occurrences. You can
ensure proper override precedence by prefixing the files in the
configuration directory with numerical values, as in the following
example file layout:
</para>
<programlisting>
/etc/swift/
default.base
object-server.conf.d/
000_default.conf -&gt; ../default.base
001_default-override.conf
010_server.conf
020_replicator.conf
030_updater.conf
040_auditor.conf
</programlisting>
<para>
You can inspect the resulting combined configuration object using
the <command>swift-config</command> command-line tool.
</para>
</section>