Install and configure a compute nodeThis section describes how to install and configure the Compute
service on a compute node. The service supports several
hypervisors to
deploy instances or
VMs. For simplicity,
this configuration uses the
QEMU hypervisor
with the
KVM 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.To install and configure the Compute hypervisor componentsInstall the packages:#apt-get install nova-compute#yum install openstack-nova-compute#zypper install openstack-nova-computeEdit the /etc/nova/nova.conf file and
complete the following actions:In the [database] section, configure
database access:[database]
...
connection = mysql://nova:NOVA_DBPASS@controller/novaReplace NOVA_DBPASS with the password
you chose for the Compute database.In the [DEFAULT] section, configure
RabbitMQ message broker access:[DEFAULT]
...
rpc_backend = rabbit
rabbit_host = controller
rabbit_password = RABBIT_PASSReplace RABBIT_PASS with the password
you chose for the guest account in
RabbitMQ.In the [keystone_authtoken] section,
configure Identity service access:
[keystone_authtoken]
...
auth_uri = http://controller:5000/v2.0
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = NOVA_PASSReplace NOVA_PASS with the password
you chose for the nova user in the Identity
service.In the [DEFAULT] section, configure the
my_ip key:[DEFAULT]
...
my_ip = MANAGEMENT_INTERFACE_IP_ADDRESSReplace
MANAGEMENT_INTERFACE_IP_ADDRESS with
the IP address of the management network interface on your
first compute node, typically 10.0.0.31 in the
example
architecture.In the [DEFAULT] section, enable and
configure remote console access:[DEFAULT]
...
vnc_enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = MANAGEMENT_INTERFACE_IP_ADDRESS
novncproxy_base_url = http://controller:6080/vnc_auto.htmlThe 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.Replace
MANAGEMENT_INTERFACE_IP_ADDRESS with
the IP address of the management network interface on your
first compute node, typically 10.0.0.31 in the
example
architecture.If the web browser to access remote consoles resides on a
host that cannot resolve the
controller hostname, you must replace
controller with the management
interface IP address of the controller node.In the [DEFAULT] section, configure the
location of the Image Service:[DEFAULT]
...
glance_host = controllerTo install and configure the Compute hypervisor componentsInstall the packages:#apt-get install nova-computeRespond to the prompts for
database management,
Identity service
credentials,
service endpoint
registration, and
message broker
credentials..To finalize installationDetermine whether your compute node supports hardware acceleration
for virtual machines:$egrep -c '(vmx|svm)' /proc/cpuinfoIf this command returns a value of
one or greater, your compute node supports
hardware acceleration which typically requires no additional
configuration.If this command returns a value of zero,
your compute node does not support hardware acceleration and you must
configure libvirt to use QEMU instead of KVM.Edit the [libvirt]
section in the
/etc/nova/nova-compute.conf/etc/nova/nova.conf file as follows:[libvirt]
...
virt_type = qemuOn 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
/var/log/nova/nova-compute.log file:libvirtError: internal error: no supported architecture for os type 'hvm'As a workaround for this issue, you must add the appropriate
module for your compute node to the
/etc/modules file.For systems with Intel processors:#echo 'kvm_intel' >> /etc/modulesFor systems with AMD processors:#echo 'kvm_amd' >> /etc/modulesRestart the Compute service:#service nova-compute restartStart the Compute service including its dependencies and configure
them to start automatically when the system boots:For RHEL, CentOS, and compatible derivatives:#service libvirtd start#service messagebus start#service openstack-nova-compute start#chkconfig libvirtd on#chkconfig messagebus on#chkconfig openstack-nova-compute onFor Fedora:#service libvirtd start#service dbus start#service openstack-nova-compute start#chkconfig libvirtd on#chkconfig dbus on#chkconfig openstack-nova-compute on#service libvirtd start#chkconfig libvirtd on#service openstack-nova-compute start#chkconfig openstack-nova-compute onBy default, the Ubuntu packages create an SQLite database.Because this configuration uses a SQL database server, you can
remove the SQLite database file:#rm /var/lib/nova/nova.sqlite