Improved install guide nova compute section

I improved the nova compute section of the installation guide
as follows:

1) Restructured steps to improve flow/clarity and consistency with
   similar sections.
2) Adjusted titles.

Most of these improvements incorporate changes approved for other
patches associated with this blueprint.

Co-Authored-By: Stephen Gordon <sgordon@redhat.com>
Change-Id: I311a104b928549badec2a9ea4637f72bde084324
Implements: blueprint installation-guide-improvements
This commit is contained in:
Matthew Kassawara 2014-07-01 19:17:34 +00:00
parent 233c23dd7b
commit 4d1b6943cc
3 changed files with 218 additions and 230 deletions

View File

@ -7,6 +7,6 @@
<title>Add the Compute service</title>
<xi:include href="../common/section_getstart_compute.xml"/>
<xi:include href="section_nova-controller-install.xml"/>
<xi:include href="section_nova-compute.xml"/>
<xi:include href="section_nova-compute-install.xml"/>
<xi:include href="section_nova-verify.xml"/>
</chapter>

View File

@ -0,0 +1,217 @@
<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-install">
<title>Install and configure a compute node</title>
<para>This section describes how to install and configure the Compute
service on a compute node. The service supports several
<glossterm baseform="hypervisor">hypervisors</glossterm> to
deploy <glossterm baseform="instance">instances</glossterm> or
<glossterm baseform="virtual machine (VM)">VMs</glossterm>. For simplicity,
this configuration uses the
<glossterm baseform="Quick EMUlator (QEMU)">QEMU</glossterm> hypervisor
with the
<glossterm baseform="kernel-based VM (KVM)">KVM</glossterm> extension
on compute nodes that support hardware acceleration for virtual machines.
On legacy hardware, this configuration uses the generic QEMU hypervisor.
You can follow these instructions with minor modifications to horizontally
scale your environment with additional compute nodes.</para>
<procedure os="ubuntu;rhel;centos;fedora;sles;opensuse">
<title>To install and configure the Compute hypervisor components</title>
<step>
<para>Install the packages:</para>
<screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install nova-compute</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install openstack-nova-compute</userinput></screen>
<screen os="sles;opensuse"><prompt>#</prompt> <userinput>zypper install openstack-nova-compute</userinput></screen>
</step>
<step>
<para>Edit the <filename>/etc/nova/nova.conf</filename> file and
complete the following actions:</para>
<substeps>
<step>
<para>In the <literal>[database]</literal> section, configure
database access:</para>
<programlisting language="ini">[database]
...
connection = mysql://nova:<replaceable>NOVA_DBPASS</replaceable>@<replaceable>controller</replaceable>/nova</programlisting>
<para>Replace <replaceable>NOVA_DBPASS</replaceable> with the password
you chose for the Compute database.</para>
</step>
<step>
<para>In the <literal>[DEFAULT]</literal> section, configure
<application>RabbitMQ</application> message broker access:</para>
<programlisting language="ini">[DEFAULT]
...
rpc_backend = rabbit
rabbit_host = <replaceable>controller</replaceable>
rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>
<para>Replace <replaceable>RABBIT_PASS</replaceable> with the password
you chose for the <literal>guest</literal> account in
<application>RabbitMQ</application>.</para>
</step>
<step>
<para>In the <literal>[keystone_authtoken</literal>] section,
configure Identity service access:</para>
<programlisting language="ini">
[keystone_authtoken]
...
auth_uri = http://<replaceable>controller</replaceable>:5000/v2.0
auth_host = <replaceable>controller</replaceable>
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = <replaceable>NOVA_PASS</replaceable></programlisting>
<para>Replace <replaceable>NOVA_PASS</replaceable> with the password
you chose for the <literal>nova</literal> user in the Identity
service.</para>
</step>
<step>
<para>In the <literal>[DEFAULT]</literal> section, configure the
<literal>my_ip</literal> key:</para>
<programlisting language="ini">[DEFAULT]
...
my_ip = <replaceable>MANAGEMENT_INTERFACE_IP_ADDRESS</replaceable></programlisting>
<para>Replace
<replaceable>MANAGEMENT_INTERFACE_IP_ADDRESS</replaceable> with
the IP address of the management network interface on your
first compute node, typically 10.0.0.31 in the
<link linkend="architecture_example-architectures">example
architecture</link>.</para>
</step>
<step>
<para>In the <literal>[DEFAULT]</literal> section, enable and
configure remote console access:</para>
<programlisting language="ini">[DEFAULT]
...
vnc_enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = <replaceable>MANAGEMENT_INTERFACE_IP_ADDRESS</replaceable>
novncproxy_base_url = http://<replaceable>controller</replaceable>:6080/vnc_auto.html</programlisting>
<para>The server component listens on all IP addresses and the proxy
component only listens on the management interface IP address of
the compute node. The base URL indicates the location where you
can use a web browser to access remote consoles of instances
on this compute node.</para>
<para>Replace
<replaceable>MANAGEMENT_INTERFACE_IP_ADDRESS</replaceable> with
the IP address of the management network interface on your
first compute node, typically 10.0.0.31 in the
<link linkend="architecture_example-architectures">example
architecture</link>.</para>
<note>
<para>If the web browser to access remote consoles resides on a
host that cannot resolve the
<replaceable>controller</replaceable> hostname, you must replace
<replaceable>controller</replaceable> with the management
interface IP address of the controller node.</para>
</note>
</step>
<step>
<para>In the <literal>[DEFAULT]</literal> section, configure the
location of the Image Service:</para>
<programlisting language="ini">[DEFAULT]
...
glance_host = <replaceable>controller</replaceable></programlisting>
</step>
</substeps>
</step>
</procedure>
<procedure os="debian">
<title>To install and configure the Compute hypervisor components</title>
<step>
<para>Install the packages:</para>
<screen><prompt>#</prompt> <userinput>apt-get install nova-compute</userinput></screen>
</step>
<step>
<para>Respond to the prompts for
<link linkend="debconf-dbconfig-common">database management</link>,
<link linkend="debconf-keystone_authtoken">Identity service
credentials</link>,
<link linkend="debconf-api-endpoints">service endpoint
registration</link>, and
<link linkend="debconf-rabbitmq">message broker
credentials.</link>.</para>
</step>
</procedure>
<procedure>
<title>To finalize installation</title>
<step>
<para>Determine whether your compute node supports hardware acceleration
for virtual machines:</para>
<screen><prompt>$</prompt> <userinput>egrep -c '(vmx|svm)' /proc/cpuinfo</userinput></screen>
<para>If this command returns a value of
<emphasis>one or greater</emphasis>, your compute node supports
hardware acceleration which typically requires no additional
configuration.</para>
<para>If this command returns a value of <emphasis>zero</emphasis>,
your compute node does not support hardware acceleration and you must
configure <literal>libvirt</literal> to use QEMU instead of KVM.</para>
<substeps>
<step>
<para>Edit the <literal>[libvirt]</literal>
section in the
<filename os="ubuntu;debian">/etc/nova/nova-compute.conf</filename>
<filename os="rhel;centos;fedora;sles;opensuse"
>/etc/nova/nova.conf</filename> file as follows:</para>
<programlisting language="ini">[libvirt]
...
virt_type = qemu</programlisting>
<warning os="ubuntu">
<para>On Ubuntu 12.04, kernels backported from newer releases may
not automatically load the KVM modules for hardware acceleration
when the compute node boots. In this case, launching an instance
will fail with the following message in the
<filename>/var/log/nova/nova-compute.log</filename> file:</para>
<screen><computeroutput>libvirtError: internal error: no supported architecture for os type 'hvm'</computeroutput></screen>
<para>As a workaround for this issue, you must add the appropriate
module for your compute node to the
<filename>/etc/modules</filename> file.</para>
<para>For systems with Intel processors:</para>
<screen><prompt>#</prompt> <userinput>echo 'kvm_intel' >> /etc/modules</userinput></screen>
<para>For systems with AMD processors:</para>
<screen><prompt>#</prompt> <userinput>echo 'kvm_amd' >> /etc/modules</userinput></screen>
</warning>
</step>
</substeps>
</step>
<step os="ubuntu;debian">
<para>Restart the Compute service:</para>
<screen><prompt>#</prompt> <userinput>service nova-compute restart</userinput></screen>
</step>
<step os="rhel;centos;fedora;sles;opensuse">
<para>Start the Compute service including its dependencies and configure
them to start automatically when the system boots:</para>
<stepalternatives os="rhel;centos;fedora">
<step>
<para>For RHEL, CentOS, and compatible derivatives:</para>
<screen><prompt>#</prompt> <userinput>service libvirtd start</userinput>
<prompt>#</prompt> <userinput>service messagebus start</userinput>
<prompt>#</prompt> <userinput>service openstack-nova-compute start</userinput>
<prompt>#</prompt> <userinput>chkconfig libvirtd on</userinput>
<prompt>#</prompt> <userinput>chkconfig messagebus on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-nova-compute on</userinput></screen>
</step>
<step>
<para>For Fedora:</para>
<screen><prompt>#</prompt> <userinput>service libvirtd start</userinput>
<prompt>#</prompt> <userinput>service dbus start</userinput>
<prompt>#</prompt> <userinput>service openstack-nova-compute start</userinput>
<prompt>#</prompt> <userinput>chkconfig libvirtd on</userinput>
<prompt>#</prompt> <userinput>chkconfig dbus on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-nova-compute on</userinput></screen>
</step>
</stepalternatives>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>service libvirtd start</userinput>
<prompt>#</prompt> <userinput>chkconfig libvirtd on</userinput>
<prompt>#</prompt> <userinput>service openstack-nova-compute start</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-nova-compute on</userinput></screen>
</step>
<step os="ubuntu">
<para>By default, the Ubuntu packages create an SQLite database.</para>
<para>Because this configuration uses a SQL database server, you can
remove the SQLite database file:</para>
<screen><prompt>#</prompt> <userinput>rm /var/lib/nova/nova.sqlite</userinput></screen>
</step>
</procedure>
</section>

View File

@ -1,229 +0,0 @@
<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>Configure a compute node</title>
<para>After you configure the Compute service on the controller
node, you must configure another system as 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 the examples in this guide use 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>
<step>
<para>Install the Compute packages:</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install nova-compute-kvm python-guestfs</userinput></screen>
<para os="ubuntu;debian">When prompted to create a
<literal>supermin</literal> appliance, respond
<userinput>yes</userinput>.</para>
<note os="debian">
<para>To use the meta-packages and install other components on
your compute node, such as OpenStack Networking and Telemetry
agents, run this command:</para>
<screen><prompt>#</prompt> <userinput>apt-get install openstack-compute-node</userinput></screen>
<para>The controller node has the
<package>openstack-proxy-node</package> and
<package>openstack-toaster</package> meta-packages that
install <package>openstack-proxy-node</package> and
<package>openstack-toaster</package> at the same
time.</para>
</note>
<screen os="centos;rhel;fedora"><prompt>#</prompt> <userinput>yum install openstack-nova-compute</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-nova-compute kvm openstack-utils</userinput></screen>
</step>
<step os="debian">
<para>Respond to the prompts for <link
linkend="debconf-dbconfig-common">database
management</link>, <link linkend="debconf-keystone_authtoken"
><literal>[keystone_authtoken]</literal> settings</link>,
<link linkend="debconf-rabbitmq">RabbitMQ
credentials</link>, and <link linkend="debconf-api-endpoints"
>API endpoint</link> registration.</para>
</step>
<step os="ubuntu">
<para>For security reasons, the Linux kernel is not readable by
normal users which restricts hypervisor services such as qemu
and libguestfs. For details, see <link
xlink:href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759725"
>this bug</link>. To make the current kernel readable, run:
<screen><prompt>#</prompt> <userinput>dpkg-statoverride --update --add root root 0644 /boot/vmlinuz-$(uname -r)</userinput></screen>
To also enable this override for all future kernel updates, create the
file <filename>/etc/kernel/postinst.d/statoverride</filename>
containing:<programlisting language="bash">#!/bin/sh
version="$1"
# passing the kernel version is required
[ -z "${version}" ] &amp;&amp; exit 0
dpkg-statoverride --update --add root root 0644 /boot/vmlinuz-${version}</programlisting>
Remember to make the file executable:
<screen><prompt>#</prompt> <userinput>chmod +x /etc/kernel/postinst.d/statoverride</userinput></screen>
</para>
</step>
<step os="fedora;rhel;centos;opensuse;sles;ubuntu">
<para os="fedora;rhel;centos;opensuse;sles">Edit the
<filename>/etc/nova/nova.conf</filename> configuration file:
</para>
<screen os="fedora;rhel;centos;opensuse;sles"><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 keystone_authtoken auth_uri http://<replaceable>controller</replaceable>:5000</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_host <replaceable>controller</replaceable></userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_protocol http</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_port 35357</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_user nova</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_tenant_name service</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_password <replaceable>NOVA_PASS</replaceable></userinput></screen>
<para os="ubuntu">Edit the
<filename>/etc/nova/nova.conf</filename> configuration file and add these
lines to the appropriate sections:</para>
<programlisting os="ubuntu" language="ini">[DEFAULT]
...
auth_strategy = keystone
...
[database]
# The SQLAlchemy connection string used to connect to the database
connection = mysql://nova:NOVA_DBPASS@controller/nova
[keystone_authtoken]
auth_uri = http://<replaceable>controller</replaceable>:5000
auth_host = <replaceable>controller</replaceable>
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = <replaceable>NOVA_PASS</replaceable></programlisting>
</step>
<step os="fedora;rhel;centos;ubuntu;opensuse;sles">
<para os="ubuntu">Configure the Compute service to use
the RabbitMQ message broker by setting these configuration
keys in the <literal>[DEFAULT]</literal> configuration group of
the <filename>/etc/nova/nova.conf</filename> file:</para>
<programlisting os="ubuntu" language="ini">[DEFAULT]
...
rpc_backend = rabbit
rabbit_host = controller
rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>
<para os="opensuse;sles;rhel;centos;fedora">Configure the Compute service to use the RabbitMQ message broker
by setting these configuration keys:</para>
<screen os="opensuse;sles;fedora;rhel;centos"><prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf \
DEFAULT rpc_backend nova.rpc.impl_kombu</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT rabbit_host controller</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT rabbit_password <replaceable>RABBIT_PASS</replaceable></userinput></screen>
</step>
<step>
<para>Configure Compute to provide remote console access to instances.</para>
<screen os="fedora;rhel;centos;opensuse;sles"><prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT my_ip 10.0.0.31</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT vnc_enabled True</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_listen 0.0.0.0</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_proxyclient_address 10.0.0.31</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf \
DEFAULT novncproxy_base_url http://<replaceable>controller</replaceable>:6080/vnc_auto.html</userinput></screen>
<para os="ubuntu;debian">Edit
<filename>/etc/nova/nova.conf</filename> and add the following
keys under the
<literal>[DEFAULT]</literal>
section:</para>
<programlisting os="ubuntu;debian" language="ini">[DEFAULT]
...
my_ip = 10.0.0.31
vnc_enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = 10.0.0.31
novncproxy_base_url = http://<replaceable>controller</replaceable>:6080/vnc_auto.html</programlisting>
</step>
<step>
<para>Specify the host that runs the Image Service.<phrase
os="ubuntu;debian"> Edit
<filename>/etc/nova/nova.conf</filename> file and add
these lines to the <literal>[DEFAULT]</literal>
section:</phrase></para>
<screen os="fedora;rhel;centos;opensuse;sles"><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>You must determine whether your system's processor and/or
hypervisor support hardware acceleration for virtual machines.</para>
<para>Run the following command:</para>
<screen><prompt>$</prompt> <userinput>egrep -c '(vmx|svm)' /proc/cpuinfo</userinput></screen>
<para>If this command returns a value of
<emphasis>one or greater</emphasis>, your system supports hardware
acceleration which typically requires no additional configuration.
</para>
<para>If this command returns a value of <emphasis>zero</emphasis>,
your system does not support hardware acceleration and you must
configure <literal>libvirt</literal> to use QEMU instead of KVM.</para>
<substeps>
<step os="ubuntu;debian">
<para>Edit the <literal>[libvirt]</literal> section in the
<filename>/etc/nova/nova-compute.conf</filename> file to modify
this key:</para>
<programlisting language="ini">[libvirt]
...
virt_type = qemu</programlisting>
</step>
<step os="rhel;centos;fedora;sles;opensuse">
<para>Run the following command:</para>
<screen><prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf libvirt virt_type qemu</userinput></screen>
</step>
</substeps>
<warning os="ubuntu">
<para>On Ubuntu 12.04, kernels backported from newer releases may not
automatically load the KVM modules for hardware acceleration when
the system boots. In this case, launching an instance will fail
with the following message in the
<filename>/var/log/nova/nova-compute.log</filename> file:</para>
<screen><computeroutput>libvirtError: internal error: no supported architecture for os type 'hvm'</computeroutput></screen>
<para>As a workaround for this issue, you must add the appropriate
module for your system to the <filename>/etc/modules</filename> file.
</para>
<para>For systems with Intel processors, run the following command:
</para>
<screen><prompt>#</prompt> <userinput>echo 'kvm_intel' >> /etc/modules</userinput></screen>
<para>For systems with AMD processors, run the following command:
</para>
<screen><prompt>#</prompt> <userinput>echo 'kvm_amd' >> /etc/modules</userinput></screen>
</warning>
</step>
<step os="ubuntu">
<para>Remove the SQLite database created by the packages:</para>
<screen><prompt>#</prompt> <userinput>rm /var/lib/nova/nova.sqlite</userinput></screen>
</step>
<step>
<para os="fedora;rhel;centos;opensuse;sles">Start the Compute service and
its dependencies. Configure them to start automatically 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>
<stepalternatives os="fedora;rhel;centos">
<step>
<para>For RHEL or CentOS:</para>
<screen><prompt>#</prompt> <userinput>service libvirtd start</userinput>
<prompt>#</prompt> <userinput>service messagebus start</userinput>
<prompt>#</prompt> <userinput>service openstack-nova-compute start</userinput>
<prompt>#</prompt> <userinput>chkconfig libvirtd on</userinput>
<prompt>#</prompt> <userinput>chkconfig messagebus on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-nova-compute on</userinput></screen>
</step>
<step><para>For Fedora:</para>
<screen><prompt>#</prompt> <userinput>service libvirtd start</userinput>
<prompt>#</prompt> <userinput>service dbus start</userinput>
<prompt>#</prompt> <userinput>service openstack-nova-compute start</userinput>
<prompt>#</prompt> <userinput>chkconfig libvirtd on</userinput>
<prompt>#</prompt> <userinput>chkconfig dbus on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-nova-compute on</userinput></screen>
</step>
</stepalternatives>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>service libvirtd start</userinput>
<prompt>#</prompt> <userinput>service openstack-nova-compute start</userinput>
<prompt>#</prompt> <userinput>chkconfig libvirtd on</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-nova-compute on</userinput></screen>
</step>
</procedure>
</section>