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.
Do not configure eth1 with a static IP address.
An IP address will be assigned and configured by the networking component of OpenStack.Set the hostname to compute1 (this can be
checked using uname -n). 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.Note for Debian usersBefore installing anything, make sure that you have installed dbconfig-common, and that
you configured it correctly to allow the use of remote database servers:#dpkg-reconfigure dbconfig-commonThen, on the host running the MySQL server (which is the controller
node in this manual), simply run:
#/usr/share/openstack-proxy-node/mysql-remote-root
(available from the openstack-proxy-node package) so that your
controller node is configured to allow the compute node to access it.Then do:#apt-get install nova-compute-kvm python-guestfsSelect "Yes" when asked to create a supermin appliance during install.Note for Debian usersYou can also use the meta-package with:
#apt-get install openstack-compute-node
which will also install other components on your compute node, like the OVS
Neutron agent, Ceilometer agent, and more.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:
#dpkg-reconfigure -plow nova-common
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:
#apt-get install dbconfig-common && dpkg-reconfigure -plow dbconfig-common#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_PASSEdit /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_PASSEnsure 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 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