Flux7 DevOps Blog

Nova Messaging Architecture | Installation & Uses - Flux7 Blog

Apr 17, 2014 7:26:39 AM Flux7 Labs Management Tools and Processes

Nova, OpenStack Compute service is used for hosting and managing cloud computing systems. It is a component based architecture enabling quicker additions of new features. It is fault tolerant, recoverable and provides API-compatibility with systems like Amazon EC2.

Nova is built on a messaging architecture and all of its components can typically be run on several servers. This architecture allows the components to communicate through a message queue. Deferred objects are used to avoid blocking while a component waits in the message queue for a response.

Nova together with its components share a centralized SQL-based database. This is suitable for smaller deployments. However for larger deployments an aggregation system will be in place to manage the data across multiple data stores.

The following are the components of Nova:

DB: SQL database for storing data

Web Dashboard: External component to communicate with the API

API: Component that uses the queue or http to communicate with other components and to receive http requests

Auth Manager: A python class used by all components to communicate with the backend DB or LDAP. Also, this component is responsible for users, projects and roles.

Object Store: Replication of S3 API allowing storage and retrieval of images

Scheduler: Allocates hosts to the appropriate VMs

Network: Responsible for IP forwarding, bridges and vlans

Compute: Controls the communication between the hypervisor and VMs

Install Compute controller services


Install these Compute packages on the controller node.

# apt-get install nova-novncproxy novnc nova-api nova-ajax-console-proxy
nova-cert nova-conductor nova-consoleauth nova-doc nova-scheduler python-novaclient

Compute stores information in a database. We will use the MySQL database for OpenStack Compute services.

Create database


> create database nova;
> grant all privileges on nova.* to novaUser@localhost identified by ‘StrongPass’;
> grant all privileges on nova.* to novaUser@'%' identified by ‘StrongPass’;

Create nova user and add this user to tenant service with role admin.

# keystone user-create --name=nova --pass=90b68569e6da --email=nova@flux7.com
# keystone user-role-add --user=nova --tenant=service --role=admin

You must register Compute with the Identity Service so that other OpenStack services can locate it. Register the service and specify the endpoint:

# keystone service-create --name=nova --type=compute --description="Nova Compute service"

Use the id property that is returned to create the endpoint.

# keystone endpoint-create --service-id=a3f9c62df3b9443f8e66bf4e5de2349f

Edit the /etc/nova/nova.conf file and add these lines to the [database] and [keystone_authtoken] sections:


# The SQLAlchemy connection string used to connect to the database

connection = mysql://novaUser:StrongPass@


auth_host =
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = 90b68569e6da

Configure the Compute Service to use the RabbitMQ message broker, keystone authentication and set the my_ip, vncserver_listen, and vncserver_proxyclient_address configuration options to the internal IP address of the controller node 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 =
rabbit_password = RABBIT_PASS

By default, the Ubuntu packages create an SQLite database. Delete the nova.sqlite file created in the /var/lib/nova/ directory so that it does not get used by mistake.

Create the Compute service tables:

# nova-manage db sync

Add the credentials to the /etc/nova/api-paste.ini file. Add these options to the [filter:authtoken] section:

paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
auth_host =
auth_port = 35357
auth_protocol = http
auth_uri =
admin_tenant_name = service
admin_user = nova
admin_password = NOVA_PASS

Restart Compute services:

# service nova-api restart
# service nova-cert restart
# service nova-consoleauth restart
# service nova-scheduler restart
# service nova-conductor restart
# service nova-novncproxy restart

Configure a Compute node

The Compute node receives requests from the controller node and hosts virtual machine instances. The Compute service relies on a hypervisor to run virtual machine instances. OpenStack can use various hypervisors, but we will use KVM.

Install the appropriate packages for the Compute service.

# apt-get install nova-compute-kvm python-guestfs

Edit the /etc/nova/nova.conf configuration file and add / change these lines:


connection = mysql://novaUser:StrongPass@


root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
rabbit_host =
rabbit_userid = guest
#rabbit_password = RABBIT_PASS ( If changed)
# Auth
# Imaging service
# Vnc configuration
# Network settings
#If you want neutron + Nova Security groups
service_neutron_metadata_proxy = True
neutron_metadata_proxy_shared_secret = METADATA_PASS ##( set at /etc/neutron/metadata_agent.ini )
metadata_host =
metadata_listen =
metadata_listen_port = 8775
# Compute #
# Cinder #

Restart the Compute service.

# service nova-compute restart

Remove the SQLite database created by the packages:

# rm /var/lib/nova/nova.sqlite

Watch out for the next part in this tutorial series next Thursday.

Did you find this useful?  

Interested in getting tips, best practices and commentary delivered regularly? Click the button below to sign up for our blog and set your topic and frequency preferences.

Subscribe to the Flux7 Blog

Flux7 Labs

Written by Flux7 Labs

Flux7 is the only Sherpa on the DevOps journey that assesses, designs, and teaches while implementing a holistic solution for its enterprise customers, thus giving its clients the skills needed to manage and expand on the technology moving forward. Not a reseller or an MSP, Flux7 recommendations are 100% focused on customer requirements and creating the most efficient infrastructure possible that automates operations, streamlines and enhances development, and supports specific business goals.

Subscribe to Flux7's Blog

Posts by Topic

see all

Recent Posts