openstack-manuals/doc/install-guide/section_debconf-concepts.xml
Thomas Goirand c9728d9539 Adds a new debconf chapter
This patch adds a new debconf chapter in the Debian docs.
It describe generalities about the Debconf OpenStack. It
explains how the following is handled:
- Database config (using dbconfig-common)
- RabbitMQ config
- API endpoint registrations
- keystone_authtoken config
- preseeding

Also, a number of screenshots are added.

Note that this is a break-down of:
https://review.openstack.org/54394/

into smaller patches.

backport: havana
Change-Id: Ia5d8e5fc3d397f9441ecb50ef4a3458672307bdc
2013-11-01 23:31:08 +08:00

91 lines
5.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<section xml:id="debconf-general-principles"
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">
<title>Debconf concepts</title>
<para>This chapter explains how to use the Debian <systemitem
class="library">debconf</systemitem> and <systemitem
class="library">dbconfig-common</systemitem> packages to
configure OpenStack services. If you are familiar with these
packages and pre-seeding, you can proceed to <xref
linkend="ch_keystone"/>.</para>
<section xml:id="debian_packages">
<title>The Debian packages</title>
<para>The rules described here are from the <link
xlink:href="http://www.debian.org/doc/debian-policy/"
><citetitle>Debian Policy Manual</citetitle></link>. If any
rule described in this chapter is not respected, you have found
a serious bug that must be fixed.</para>
<para>When you install or upgrade a Debian package, all
configuration file values are preserved. Using the <systemitem
class="library">debconf</systemitem> database as a registry is
considered a bug in Debian. If you edit something in any
OpenStack configuration file, the <systemitem class="library"
>debconf</systemitem> package reads that value when it
prepares to prompt the user. For example, to change the log in
name for the RabbitMQ messaging queue for a service, you can
edit its value in the corresponding configuration file.</para>
<para>To opt out of using the <systemitem class="library"
>debconf</systemitem> package, run the
<command>dpkg-reconfigure</command> command and select
non-interactive mode:</para>
<screen><prompt>#</prompt> <userinput>dpkg-reconfigure -plow debconf</userinput></screen>
<para>Then, <systemitem class="library">debconf</systemitem> does
not prompt you.</para>
<para>Another way to disable the <systemitem class="library"
>debconf</systemitem> package is to prefix the
<command>apt</command> command with
<literal>DEBIAN_FRONTEND=noninteractive</literal>, as
follows:</para>
<screen><prompt>#</prompt> <userinput>DEBIAN_FRONTEND=noninteractive apt-get install nova-api</userinput></screen>
<para>If you configure a package with <systemitem class="library"
>debconf</systemitem> incorrectly, you can re-configure it, as
follows:</para>
<screen><prompt>#</prompt> <userinput>dpkg-reconfigure <replaceable>PACKAGE-NAME</replaceable></userinput></screen>
<para>This calls the post-installation script for the
<replaceable>PACKAGE-NAME</replaceable> package after the user
responds to all prompts. If you cannot install a Debian package
in a non-interactive way, you have found a release-critical bug
in Debian. Report it to the Debian bug tracking system.</para>
<para>Generally, the <systemitem class="library"
>-common</systemitem> packages install the configuration
files. For example, the <literal>glance-common</literal> package
installs the <filename>glance-api.conf</filename> and
<filename>glance-registry.conf</filename> files. So, for the
Image Service, you must re-configure the
<literal>glance-common</literal> package. The same applies for
<literal>cinder-common</literal>,
<literal>nova-common</literal>, and
<literal>heat-common</literal> packages.</para>
<para>In <systemitem class="library">debconf</systemitem>, the
higher the <firstterm>priority</firstterm> for a screen, the
greater the chance that the user sees that screen. If a
<systemitem class="library">debconf</systemitem> screen has
<literal>medium</literal> priority and you configure the
Debian system to show only <literal>critical</literal> prompts,
which is the default in Debian, the user does not see that
<systemitem class="library">debconf</systemitem> screen.
Instead, the default for the related package is used. In the
Debian OpenStack packages, a number of <systemitem
class="library">debconf</systemitem> screens are set with
<literal>medium</literal> priority. Consequently, if you want
to respond to all <systemitem class="library"
>debconf</systemitem> screens from the Debian OpenStack
packages, you must run the following command and select the
<literal>medium</literal> priority before you install any
packages:</para>
<screen><prompt>#</prompt> <userinput>dpkg-reconfigure debconf</userinput></screen>
<note>
<para>The packages do not require pre-depends. If <systemitem
class="library">dbconfig-common</systemitem> is already
installed on the system, the user sees all prompts. However,
you cannot define the order in which the <systemitem
class="library">debconf</systemitem> screens appear. The user
must make sense of it even if the prompts appear in an
illogical order.</para>
</note>
</section>
<xi:include href="section_debconf-preseeding.xml"/>
</section>