openstack-manuals/doc/install-guide/section_nova-compute.xml
Tom Fifield 416fb8b288 More ubuntu fixes for install guide
This patch contains fixes based on testing the install guide
for ubuntu.

The following chapters have been confirmed under Ubuntu

2 Basic Operating System Configuration
3 Configuring Identity Service
4 Configuring Image Service
6. Adding a dashboard

Currently testing:
5 Configuring the Compute Services

The following sections are verified OK:
Installing the Nova Controller Services.

It cannot verify the full chapter as the networking section
does not exist.

Change-Id: I6d1f1ae7e1ef78b56be3481c5a17ebed883cb7f1
2013-10-14 16:44:45 +11:00

123 lines
7.5 KiB
XML

<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="nova-compute">
<title>Configuring a Compute Node</title>
<para>After configuring the Compute Services on the controller node, configure a second system to
be a Compute node. The Compute node receives requests from the controller node and hosts virtual
machine instances. You can run all services on a single node, but this guide uses separate
systems. This makes it easy to scale horizontally by adding additional Compute nodes following
the instructions in this section.</para>
<para>The Compute Service relies on a hypervisor to run virtual machine
instances. OpenStack can use various hypervisors, but this guide uses
KVM.</para>
<procedure>
<title>Configure a Compute Node</title>
<step><para>Begin by configuring the system using the instructions in
<xref linkend="ch_basics"/>. Note the following differences from the
controller node:</para>
<itemizedlist>
<listitem>
<para>Use different IP addresses when configuring <filename>eth0</filename>
and <filename>eth1</filename>. This guide uses <literal>192.168.0.11</literal> for
the internal network and <literal>10.0.0.11</literal> for the external network.</para>
</listitem>
<listitem>
<para>Set the hostname to <literal>compute1</literal>. Ensure that the
IP addresses and hostnames for both nodes are listed in the
<filename>/etc/hosts</filename> file on each system.</para>
</listitem>
<listitem>
<para>Follow the instructions in
<xref linkend="basics-ntp"/> to synchronize from the controller node.</para>
</listitem>
<listitem>
<para>Install the MySQL client libraries. You do not need to install the MySQL database
server or start the MySQL service.</para>
</listitem>
</itemizedlist>
</step>
<step><para>After configuring the operating system, install the appropriate
packages for the compute service.</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install nova-compute-kvm</userinput></screen>
<screen os="centos;rhel;fedora"><prompt>#</prompt> <userinput>yum install openstack-nova-compute</userinput></screen>
<screen os="opensuse"><prompt>#</prompt> <userinput>zypper install openstack-nova-compute kvm</userinput></screen>
</step>
<step><para>Either copy the file <filename>/etc/nova/nova.conf</filename> from the
<replaceable>controller</replaceable> node, or run the same configuration commands.</para>
<screen os="fedora;rhel;centos;opensuse"><prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf \
database connection mysql://nova:<replaceable>NOVA_DBPASS</replaceable>@controller/nova</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT auth_strategy keystone</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT auth_host <replaceable>controller</replaceable></userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT admin_user nova</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT admin_tenant_name service</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT admin_password <replaceable>NOVA_DBPASS</replaceable></userinput></screen>
<para os="ubuntu;debian">Edit <filename>/etc/nova/nova.conf</filename> and add to the <literal>[DEFAULT]</literal> section.</para>
<programlisting os="ubuntu;debian" language="ini">...
[DEFAULT]
...
auth_strategy=keystone</programlisting>
<screen os="fedora;rhel;centos"><prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf \
DEFAULT rpc_backend nova.openstack.common.rpc.impl_qpid</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT qpid_hostname <replaceable>controller</replaceable></userinput></screen>
<para os="ubuntu;debian">
Configure the Compute Service to use the RabbitMQ
message broker by setting the following configuration keys. They are found in
the <literal>DEFAULT</literal> configuration group of the
<filename>/etc/nova/nova.conf</filename> file.</para>
<screen os="ubuntu;debian">rpc_backend = nova.rpc.impl_kombu
rabbit_host = controller</screen>
</step>
<step><para>Set the configuration keys <literal>my_ip</literal>,
<literal>vncserver_listen</literal>, and
<literal>vncserver_proxyclient_address</literal> to the IP address of the
compute node on the internal network.</para>
<screen os="fedora;rhel;centos;opensuse"><prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT my_ip 192.168.0.11</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_listen 192.168.0.11</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_proxyclient_address 192.168.0.11</userinput></screen>
<para os="ubuntu;debian">Edit <filename>/etc/nova/nova.conf</filename> and add to the <literal>[DEFAULT]</literal> section.</para>
<programlisting os="ubuntu;debian" language="ini">[DEFAULT]
...
my_ip=192.168.0.11
vncserver_listen=192.168.0.11
vncserver_proxyclient_address=192.168.0.11</programlisting>
</step>
<step><para>Specify the host running the Image Service.<phrase os="ubuntu;debian"> Edit <filename>/etc/nova/nova.conf</filename> and add to the <literal>[DEFAULT]</literal> section.</phrase></para>
<screen os="fedora;rhel;centos;opensuse"><prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT glance_host <replaceable>controller</replaceable></userinput></screen>
<programlisting os="ubuntu;debian" language="ini">[DEFAULT]
...
glance_host=<replaceable>controller</replaceable></programlisting>
</step>
<step><para>Copy the file <filename>/etc/nova/api-paste.ini</filename> from the
<replaceable>controller</replaceable> node, or edit the file to add the credentials in the
<literal>[filter:authtoken]</literal> section.</para>
<programlisting language="ini">[filter:authtoken]
paste.filter_factory=keystoneclient.middleware.auth_token:filter_factory
auth_host=controller
admin_user=nova
admin_tenant_name=service
admin_password=<replaceable>NOVA_DBPASS</replaceable>
</programlisting>
<note os="fedora;rhel;centos;opensuse"><para>Ensure that <filename>api_paste_config=/etc/nova/api-paste.ini</filename> is set in
<filename>/etc/nova/nova.conf</filename>.</para></note>
</step>
<step>
<para os="fedora;rhel;centos;opensuse">Start the Compute service and configure it to start when the system boots.</para>
<para os="ubuntu;debian">Restart the Compute service.</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>service nova-compute restart</userinput></screen>
<screen os="centos;rhel;fedora"><prompt>#</prompt> <userinput>service openstack-nova-compute start</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-nova-compute on</userinput></screen>
<screen os="opensuse"><prompt>#</prompt> <userinput>systemctl start openstack-nova-compute</userinput>
<prompt>#</prompt> <userinput>systemctl enable openstack-nova-compute</userinput></screen></step>
</procedure>
</section>