824a40cda5
These fixes are needed for Ubuntu and openSUSE/SLES: Setup nova.conf properly Start libvirtd (openSUSE/SLES) Change-Id: Ied6580fbbde85bf86e8d1986dc5e94e7a54b27d7 backport: havana Closes-Bug: 1245846 Closes-Bug: 1245869
181 lines
11 KiB
XML
181 lines
11 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>. This guide uses
|
|
<literal>192.168.0.11</literal> for the internal network.
|
|
Do not configure <literal>eth1</literal> with a static IP address.
|
|
An IP address will be assigned and configured by the networking component of OpenStack.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Set the hostname to <literal>compute1</literal> (this can be
|
|
checked using <code>uname -n</code>). 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>
|
|
<listitem>
|
|
<para>Enable the OpenStack packages for the distribution you are using, see <xref linkend="basics-packages"/>.</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</step>
|
|
|
|
<step><para>After configuring the operating system, install the appropriate
|
|
packages for the compute service.</para>
|
|
<note os="debian"><title>Note for Debian users</title>
|
|
<para>Before installing anything, make sure that you have installed dbconfig-common, and that
|
|
you configured it correctly to allow the use of remote database servers:</para>
|
|
<screen><prompt>#</prompt> <userinput>dpkg-reconfigure dbconfig-common</userinput></screen>
|
|
<para>Then, on the host running the MySQL server (which is the controller
|
|
node in this manual), simply run:
|
|
<screen><prompt>#</prompt> <userinput>/usr/share/openstack-proxy-node/mysql-remote-root</userinput></screen>
|
|
(available from the openstack-proxy-node package) so that your
|
|
controller node is configured to allow the compute node to access it.</para>
|
|
</note>
|
|
<para os="ubuntu;debian">Then do:</para>
|
|
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install nova-compute-kvm python-guestfs</userinput></screen>
|
|
<para os="ubuntu;debian">Select "Yes" when asked to create a supermin appliance during install.</para>
|
|
<note os="debian"><title>Note for Debian users</title>
|
|
<para>You can also use the meta-package with:
|
|
<screen><prompt>#</prompt> <userinput>apt-get install openstack-compute-node</userinput></screen>
|
|
which will also install other components on your compute node, like the OVS
|
|
Neutron agent, Ceilometer agent, and more.</para>
|
|
<para>As for the rest of OpenStack, the Nova packages are configured through
|
|
debconf. So you will not need to manually configure the database, do the
|
|
"nova-manage db sync" manually, configure the keystone auth token, or
|
|
the RabbitMQ parameters of Nova. Therefore, all the below steps can be
|
|
skipped. If you need to reconfigure Nova, you can use:
|
|
<screen><prompt>#</prompt> <userinput>dpkg-reconfigure -plow nova-common</userinput></screen>
|
|
or edit the configuration files and manually restart the daemons.
|
|
Remember that if your database server is installed remotely, before
|
|
installing the Compute service, you will need to do:
|
|
<screen><prompt>#</prompt> <userinput>apt-get install dbconfig-common && dpkg-reconfigure -plow dbconfig-common</userinput></screen></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="ubuntu;debian">
|
|
<para>Due to <link xlink:href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759725">this bug</link>
|
|
that is marked "Won't Fix", guestfs is restricted.
|
|
Run the following command to relax the restriction:</para>
|
|
<screen><prompt>#</prompt> <userinput>chmod 0644 /boot/vmlinuz*</userinput></screen>
|
|
</step>
|
|
<step os="rhel;centos;fedora"><para>Either copy and modify 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;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 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_PASS</replaceable></userinput>
|
|
</screen>
|
|
<para os="ubuntu;debian">Edit <filename>/etc/nova/nova.conf</filename> and add to the appropriate sections.</para>
|
|
<programlisting os="ubuntu;debian" language="ini">...
|
|
[DEFAULT]
|
|
...
|
|
auth_strategy=keystone
|
|
...
|
|
[database]
|
|
# The SQLAlchemy connection string used to connect to the database
|
|
connection = mysql://nova:NOVA_DBPASS@controller/nova
|
|
</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>
|
|
<programlisting os="ubuntu;debian" language="ini">rpc_backend = nova.rpc.impl_kombu
|
|
rabbit_host = controller</programlisting>
|
|
|
|
</step>
|
|
|
|
<step os="ubuntu;debian">
|
|
<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>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;sles"><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=0.0.0.0
|
|
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;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>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
|
|
auth_port = 35357
|
|
auth_protocol = http
|
|
admin_user=nova
|
|
admin_tenant_name=service
|
|
admin_password=<replaceable>NOVA_PASS</replaceable>
|
|
</programlisting>
|
|
<note os="fedora;rhel;centos;opensuse;sles"><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;sles">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="fedora;rhel;centos"><prompt>#</prompt> <userinput>service libvirtd start</userinput>
|
|
<prompt>#</prompt> <userinput>service messagebus start</userinput>
|
|
<prompt>#</prompt> <userinput>chkconfig libvirtd on</userinput>
|
|
<prompt>#</prompt> <userinput>chkconfig messagebus on</userinput></screen>
|
|
<screen os="centos;rhel;fedora;opensuse;sles"><prompt>#</prompt> <userinput>service openstack-nova-compute start</userinput>
|
|
<prompt>#</prompt> <userinput>chkconfig openstack-nova-compute on</userinput>
|
|
<prompt>#</prompt> <userinput>service libvirtd start</userinput>
|
|
<prompt>#</prompt> <userinput>chkconfig libvirtd on</userinput></screen>
|
|
</step>
|
|
</procedure>
|
|
</section>
|