b112b46611
fixed_range in nova.conf was deprecated in Grizzly and has been removed in Havana. Change-Id: I663ab54260ab7a6041b951598b901cf95a259df3 Closes-Bug: 1207559
125 lines
6.8 KiB
XML
125 lines
6.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<section xml:id="compute-minimum-configuration-settings"
|
||
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>Configuring OpenStack Compute</title>
|
||
<para>This section describes the relevant
|
||
<filename>nova.conf</filename> settings for getting a
|
||
minimal install running. Refer to the OpenStack Compute
|
||
Administration Manual for guidance on more configuration
|
||
options.</para>
|
||
<para>In general, you can use the same
|
||
<filename>nova.conf</filename> file across the controller
|
||
and compute nodes. However, the following configuration
|
||
options need to be changed on each compute host: <itemizedlist>
|
||
<listitem>
|
||
<para><literal>my_ip</literal></para>
|
||
</listitem>
|
||
<listitem>
|
||
<para><literal>vncserver_listen</literal></para>
|
||
</listitem>
|
||
<listitem>
|
||
<para><literal>vncserver_proxyclient_address</literal></para>
|
||
</listitem>
|
||
</itemizedlist>For the above configuration options, you must
|
||
use the IP address of the specific compute host, not the cloud
|
||
controller.</para>
|
||
<para>The packages automatically do these steps for a user named
|
||
nova, but if you are installing as another user you should
|
||
ensure that the <filename>nova.conf</filename> file should
|
||
have its owner set to <literal>root:nova</literal>, and mode
|
||
set to <literal>0640</literal>, since the file contains your
|
||
MySQL server’s username and password.</para>
|
||
<note>
|
||
<para>If you are installing as another user, you should set
|
||
permissions correctly. This packaged install ensures that
|
||
the nova user belongs to the nova group and that the .conf
|
||
file permissions are set, but here are the manual
|
||
commands, which should be run as root:</para>
|
||
<screen>
|
||
<prompt>#</prompt> <userinput>groupadd nova</userinput>
|
||
<prompt>#</prompt> <userinput>usermod -g nova nova</userinput>
|
||
<prompt>#</prompt> <userinput>chown -R nova:nova /etc/nova</userinput>
|
||
<prompt>#</prompt> <userinput>chmod 640 /etc/nova/nova.conf</userinput>
|
||
</screen>
|
||
</note>
|
||
<para>The hypervisor is set by editing
|
||
<filename>/etc/nova/nova.conf</filename>. The hypervisor
|
||
defaults to <literal>kvm</literal>, but if you are working
|
||
within a VM already, switch to <literal>qemu</literal> on the
|
||
<literal>libvirt_type=</literal> line. To use Xen, refer
|
||
to the overview in this book for where to install nova
|
||
components.</para>
|
||
<note>
|
||
<para>You can also configure the <systemitem class="service"
|
||
>nova-compute</systemitem> service (and, for example
|
||
configure a hypervisor-per-compute-node) with a separate
|
||
<filename>nova-compute.conf</filename> file and then
|
||
referring to <filename>nova-compute.conf</filename> in the
|
||
<filename>nova.conf</filename> file.</para>
|
||
</note>
|
||
<para>Ensure the database connection defines your backend data
|
||
store by adding a <literal>connection</literal> line to the
|
||
<literal>[database]</literal> section in
|
||
<filename>nova.conf</filename>:
|
||
<literal>connection=mysql://<replaceable>[user]</replaceable>:<replaceable>[pass]</replaceable>@<replaceable>[primary
|
||
IP]</replaceable>/<replaceable>[db
|
||
name]</replaceable></literal>, such as
|
||
<literal>connection=mysql://nova:yourpassword@192.168.206.130/nova</literal>.</para>
|
||
<para>Add these settings to
|
||
<filename>/etc/nova/nova.conf</filename> for the network
|
||
configuration assumptions made for this installation scenario.
|
||
You can place comments in the <filename>nova.conf</filename>
|
||
file by entering a new line with a <literal>#</literal> sign
|
||
at the beginning of the line. To see a listing of all possible
|
||
configuration option settings, see <link
|
||
xlink:href="http://docs.openstack.org/trunk/config-reference/content/ch_configuring-openstack-compute.html"
|
||
>the reference in the <citetitle>OpenStack Configuration Reference</citetitle></link>.</para>
|
||
<programlisting>auth_strategy=keystone
|
||
network_manager=nova.network.manager.FlatDHCPManager
|
||
public_interface=eth0
|
||
flat_interface=eth0
|
||
flat_network_bridge=br100</programlisting>
|
||
<para>Here is an example <filename>nova.conf</filename> with
|
||
commented sections:</para>
|
||
<para>
|
||
<programlisting os="ubuntu;opensuse"><xi:include parse="text" href="../common/samples/nova.conf"/>
|
||
</programlisting>
|
||
<programlisting os="rhel;centos;fedora"><xi:include parse="text" href="../common/samples/nova.conf-yum"/>
|
||
</programlisting>
|
||
</para>
|
||
<para>
|
||
<note>
|
||
<para>The <literal>my_ip</literal> configuration option
|
||
will be different for each host, edit it
|
||
accordingly.</para>
|
||
</note>
|
||
</para>
|
||
<para>The controller node will run the <systemitem class="service"
|
||
>nova-api</systemitem>, <systemitem class="service"
|
||
>nova-scheduler</systemitem>, <systemitem class="service"
|
||
>nova-cert</systemitem>, <systemitem class="service"
|
||
>nova-consoleauth</systemitem>, <systemitem
|
||
class="service">nova-conductor</systemitem> and optionally
|
||
nova-network services. The compute node will run the
|
||
<systemitem class="service">nova-compute</systemitem> and
|
||
nova-network services. Stop the nova- services prior to
|
||
running db sync, by running stop commands as root. Otherwise
|
||
your logs show errors because the database has not yet been
|
||
populated. On the controller node run:</para>
|
||
<screen os="ubuntu">
|
||
<prompt>#</prompt> <userinput>stop nova-api</userinput>
|
||
<prompt>#</prompt> <userinput>stop nova-conductor</userinput>
|
||
<prompt>#</prompt> <userinput>stop nova-network</userinput>
|
||
<prompt>#</prompt> <userinput>stop nova-scheduler</userinput>
|
||
<prompt>#</prompt> <userinput>stop nova-novncproxy</userinput>
|
||
</screen>
|
||
<screen os="rhel;fedora;centos;opensuse"><prompt>$</prompt> <userinput>for svc in api objectstore conductor network volume scheduler cert; do sudo service openstack-nova-$svc stop ; sudo chkconfig openstack-nova-$svc on ; done</userinput></screen>
|
||
<para>On the compute node run:</para>
|
||
<screen os="ubuntu"><prompt>#</prompt> <userinput>stop nova-compute</userinput>
|
||
<prompt>#</prompt> <userinput>stop nova-network</userinput></screen>
|
||
<screen os="rhel;fedora;centos;opensuse"><prompt>$></prompt> <userinput>for svc in api compute network; do sudo service openstack-nova-$svc stop ; sudo chkconfig openstack-nova-$svc on ; done</userinput>
|
||
</screen>
|
||
</section>
|