Configuring a Compute NodeAfter 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.The Compute Service relies on a hypervisor to run virtual machine
instances. OpenStack can use various hypervisors, but this guide uses
KVM.Configure a Compute NodeBegin by configuring the system using the instructions in
. Note the following differences from the
controller node:Use different IP addresses when configuring
eth0. This guide uses
192.168.0.11 for the internal network. Change
or configure eth1 to manual rather than
static.Set the hostname to compute1. Ensure that the
IP addresses and hostnames for both nodes are listed in the
/etc/hosts file on each system.Follow the instructions in
to synchronize from the controller node.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 you are using, see .After configuring the operating system, install the appropriate
packages for the compute service.#apt-get install nova-compute-kvm python-novaclient python-guestfsSelect "Yes" when asked to create a supermin appliance during install.#yum install openstack-nova-compute#zypper install openstack-nova-compute kvm openstack-utilsDue to this bug
that is marked "Won't Fix", guestfs is restricted.
Run the following command to relax the restriction:#chmod 0644 /boot/vmlinuz*Either copy and modify the file /etc/nova/nova.conf from the
controller node, or run the same configuration commands.#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_DBPASS#openstack-config --set /etc/nova/nova.conf \
database connection mysql://nova:NOVA_DBPASS@controller/novaEdit /etc/nova/nova.conf and add 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
#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 controller
Configure the Compute Service to use the RabbitMQ
message broker by setting the following configuration keys. They are found 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 configuration keys my_ip,
vncserver_listen, and
vncserver_proxyclient_address 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 running the Image Service. Edit /etc/nova/nova.conf and add to the [DEFAULT] section.#openstack-config --set /etc/nova/nova.conf DEFAULT glance_host controller[DEFAULT]
...
glance_host=controllerCopy the file /etc/nova/api-paste.ini from the
controller node, or edit the file to add the credentials in 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_DBPASSEnsure that api_paste_config=/etc/nova/api-paste.ini is set in
/etc/nova/nova.conf.Start the Compute service and configure it to start when the system boots.Restart the Compute service.#service nova-compute restart#service openstack-nova-compute start#chkconfig openstack-nova-compute on