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.
The Compute service relies on a hypervisor to run virtual machine instances. OpenStack can use various hypervisors, but this guide uses KVM.
Configure the system. Use the instructions in Chapter 2, Basic operating system configuration, but note the following differences from the controller node:
Use different IP addresses when you configure
eth0
. This guide uses192.168.0.11
for the internal network. Do not configureeth1
with a static IP address. The networking component of OpenStack assigns and configures an IP address.Set the host name to
compute1
. To verify, use theuname -n
parameter. Ensure that the IP addresses and host names for both nodes are listed in the/etc/hosts
file on each system.Synchronize from the controller node. Follow the instructions in the section called “Network Time Protocol (NTP)”.
Install the MySQL client libraries. You do not need to install the MySQL database server or start the MySQL service.
Enable the OpenStack packages for the distribution that you are using. See the section called “OpenStack packages”.
After you configure the operating system, install the appropriate packages for the Compute service.
Run this command:
# apt-get install nova-compute-kvm python-guestfs
When prompted to create a
supermin
appliance, respondyes
.Due to this bug. To make the current kernel readable, run:
# dpkg-statoverride --update --add root root 0644 /boot/vmlinuz-$(uname -r)
To also enable this override for all future kernel updates, create the file
/etc/kernel/postinst.d/statoverride
containing:#!/bin/sh version="$1" # passing the kernel version is required [ -z "${version}" ] && exit 0 dpkg-statoverride --update --add root root 0644 /boot/vmlinuz-${version}
Remember to make the file executable:
# chmod +x /etc/kernel/postinst.d/statoverride
Edit the
/etc/nova/nova.conf
configuration file and add these lines to the appropriate sections:... [DEFAULT] ... auth_strategy=keystone ... [database] # The SQLAlchemy connection string used to connect to the database connection = mysql://nova:NOVA_DBPASS@controller/nova
Configure the Compute Service to use the RabbitMQ message broker by setting these configuration keys in the
[DEFAULT]
configuration group of the/etc/nova/nova.conf
file:rpc_backend = nova.rpc.impl_kombu rabbit_host = controller rabbit_password =
RABBIT_PASS
Configure Compute to provide remote console access to instances.
Edit
/etc/nova/nova.conf
and add the following keys under the[DEFAULT]
section:[DEFAULT] ... my_ip=192.168.0.11 vnc_enabled=True vncserver_listen=0.0.0.0 vncserver_proxyclient_address=192.168.0.11 novncproxy_base_url=http://
controller
:6080/vnc_auto.htmlSpecify the host that runs the Image Service. Edit
/etc/nova/nova.conf
file and add these lines to the[DEFAULT]
section:[DEFAULT] ... glance_host=
controller
Edit the
/etc/nova/api-paste.ini
file to add the credentials to the[filter:authtoken]
section:Use of .ini files Files with the extension
.ini
sometimes need to be edited during initial setup. However, they should not be used for general configuration tasks.[filter:authtoken] paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory auth_host =
controller
auth_port = 35357 auth_protocol = http admin_tenant_name = service admin_user = nova admin_password =NOVA_PASS
Restart the Compute service.
# service nova-compute restart
Remove the SQLite database created by the packages:
# rm /var/lib/nova/nova.sqlite