Configure a Compute nodeAfter 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 , but note the following differences
from the controller node:Use different IP addresses when you configure
eth0. This guide uses
192.168.0.11 for the internal
network. Do not configure eth1 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 the uname -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 .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 .After you configure the operating system, install the
appropriate packages for the Compute service.Run this command:#apt-get install nova-compute-kvm python-guestfsWhen prompted to create a
supermin appliance, respond
yes.To use the meta-packages and install other components on
your compute node, such as OVS Networking and Ceilometer
agents, run this command:#apt-get install openstack-compute-nodeThe controller node has the
openstack-proxy-node and
openstack-toaster meta-packages that
install openstack-proxy-node and
openstack-toaster at the same
time.#yum install openstack-nova-compute#zypper install openstack-nova-compute kvm openstack-utilsRespond to the prompts for database
management, [keystone_authtoken] settings,
RabbitMQ
credentials, and API endpoint registration.Due to this bug, which is marked Won't
Fix, guestfs is restricted. Run this command to
relax the restriction:#chmod 0644 /boot/vmlinuz*Edit the /etc/nova/nova.conf configuration file:#openstack-config --set /etc/nova/nova.conf database connection mysql://nova:NOVA_DBPASS@controller/nova#openstack-config --set /etc/nova/nova.conf DEFAULT auth_strategy keystone#openstack-config --set /etc/nova/nova.conf DEFAULT auth_host controller#openstack-config --set /etc/nova/nova.conf DEFAULT admin_user nova#openstack-config --set /etc/nova/nova.conf DEFAULT admin_tenant_name service#openstack-config --set /etc/nova/nova.conf DEFAULT admin_password NOVA_PASS#openstack-config --set /etc/nova/nova.conf DEFAULT rpc_backend nova.openstack.common.rpc.impl_qpid#openstack-config --set /etc/nova/nova.conf DEFAULT qpid_hostname controllerEdit 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/novaConfigure 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 = controllerRemove the SQLite database created by the packages:#rm /var/lib/nova/nova.sqliteSet the my_ip,
vncserver_listen, and
vncserver_proxyclient_address
configuration keys to the IP address of the compute node on
the internal network:#openstack-config --set /etc/nova/nova.conf DEFAULT my_ip 192.168.0.11#openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_listen 192.168.0.11#openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_proxyclient_address 192.168.0.11Edit
/etc/nova/nova.conf and add to the
[DEFAULT] section.[DEFAULT]
...
my_ip=192.168.0.11
vncserver_listen=0.0.0.0
vncserver_proxyclient_address=192.168.0.11Specify the host that runs the Image Service. Edit
/etc/nova/nova.conf file and add
these lines to the [DEFAULT]
section:#openstack-config --set /etc/nova/nova.conf DEFAULT glance_host controller[DEFAULT]
...
glance_host=controllerEdit the /etc/nova/api-paste.ini
configuration file to add the credentials to the
[filter:authtoken] section:[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=NOVA_PASSEnsure that the
option is set in /etc/nova/nova.conf
file.Start the Compute
service and configure it to start when the system
boots.Restart the Compute service.#service nova-compute restart#service libvirtd start#service messagebus start#chkconfig libvirtd on#chkconfig messagebus on#service openstack-nova-compute start#chkconfig openstack-nova-compute on#service libvirtd start#chkconfig libvirtd on