Installing the Nova Controller Services The OpenStack Compute Service is a collection of services that allow you to spin up virtual machine instances. These services can be configured to run on separate nodes or all on the same system. In this guide, we run most of the services on the controller node, and use a dedicated compute node to run the service that launches virtual machines. This section details the installation and configuration on the controller node. Install the openstack-nova meta-package. This package will install all of the various Nova packages, most of which will be used on the controller node in this guide. # yum install openstack-nova # zypper install openstack-nova Install the following Nova packages. These packages provide the OpenStack Compute services that will be run on the controller node in this guide. # apt-get install nova-novncproxy novnc nova-api nova-ajax-console-proxy nova-cert \ nova-conductor nova-consoleauth nova-doc nova-scheduler nova-network The Compute Service stores information in a database. This guide uses the MySQL database used by other OpenStack services. Use the openstack-db command to create the database and tables for the Compute Service, as well as a database user called nova to connect to the database. Replace NOVA_DBPASS with a password of your choosing. # openstack-db --init --service nova --password NOVA_DBPASS Edit /etc/nova/nova.conf and change the [database] section. ... [database] # The SQLAlchemy connection string used to connect to the database connection = mysql://nova:NOVA_DBPASS@controller/nova ... Next, we need to create a database user called , by logging in as root using the password we set earlier. # mysql -u root -p mysql> CREATE DATABASE nova; mysql> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' \ IDENTIFIED BY 'NOVA_DBPASS'; We now create the tables for the nova service. # nova-manage db_sync You now have to tell the Compute Service to use that database. # openstack-config --set /etc/nova/nova.conf \ database connection mysql://nova:NOVA_DBPASS@controller/nova Set the configuration keys my_ip, vncserver_listen, and vncserver_proxyclient_address to the IP address of the controller node. # openstack-config --set /etc/nova/nova.conf DEFAULT my_ip 192.168.0.10 # openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_listen 192.168.0.10 # openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_proxyclient_address 192.168.0.10 Create a user called nova that the Compute Service can use to authenticate with the Identity Service. Use the service tenant and give the user the admin role. # keystone user-create --name=nova --pass=NOVA_PASS --email=nova@example.com # keystone user-role-add --user=nova --tenant=service --role=admin For the Compute Service to use these credentials, you have to add them to the nova.conf configuration file. # 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 You also have to add the credentials to the file /etc/nova/api-paste.ini. Open the file in a text editor and locate the section [filter:authtoken]. Make sure the following options are set: [filter:authtoken] paste.filter_factory=keystoneclient.middleware.auth_token:filter_factory auth_host=controller admin_user=nova admin_tenant_name=service admin_password=NOVA_PASS You have to register the Compute Service with the Identity Service so that other OpenStack services can locate it. Register the service and specify the endpoint using the keystone command. # keystone service-create --name=nova --type=compute \ --description="Nova Compute Service" Note the id property returned and use it when creating the endpoint. # keystone endpoint-create \ --service-id=the_service_id_above \ --publicurl=http://controller:8774/v2/%(tenant_id)s \ --internalurl=http://controller:8774/v2/%(tenant_id)s \ --adminurl=http://controller:8774/v2/%(tenant_id)s Configure the Compute Service to use the Qpid message broker by setting the following configuration keys. # 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 = controller Configure the Compute Service to use the RabbitMQ message broker by setting the following configuration keys. # openstack-config --set /etc/nova/nova.conf \ DEFAULT rpc_backend nova.rpc.impl_kombu # openstack-config --set /etc/nova/nova.conf DEFAULT rabbit_host controller Finally, start the various Nova services and configure them to start when the system boots. # service nova-api start # service nova-cert start # service nova-consoleauth start # service nova-scheduler start # service nova-conductor start # service nova-novncproxy start # chkconfig nova-api on # chkconfig nova-cert on # chkconfig nova-consoleauth on # chkconfig nova-scheduler on # chkconfig nova-conductor on # chkconfig nova-novncproxy on # service openstack-nova-api start # service openstack-nova-cert start # service openstack-nova-consoleauth start # service openstack-nova-scheduler start # service openstack-nova-conductor start # service openstack-nova-novncproxy start # chkconfig openstack-nova-api on # chkconfig openstack-nova-cert on # chkconfig openstack-nova-consoleauth on # chkconfig openstack-nova-scheduler on # chkconfig openstack-nova-conductor on # chkconfig openstack-nova-novncproxy on # systemctl start openstack-nova-api.service # systemctl start openstack-nova-cert.service # systemctl start openstack-nova-consoleauth.service # systemctl start openstack-nova-scheduler.service # systemctl start openstack-nova-conductor.service # systemctl start openstack-nova-novncproxy.service # systemctl enable openstack-nova-api.service # systemctl enable openstack-nova-cert.service # systemctl enable openstack-nova-consoleauth.service # systemctl enable openstack-nova-scheduler.service # systemctl enable openstack-nova-conductor.service # systemctl enable openstack-nova-novncproxy.service To verify that everything is configured correctly, use the nova image-list to get a list of available images. The output is similar to the output of glance image-list. # nova image-list +--------------------------------------+-----------------+--------+--------+ | ID | Name | Status | Server | +--------------------------------------+-----------------+--------+--------+ | acafc7c0-40aa-4026-9673-b879898e1fc2 | CirrOS 0.3.1 | ACTIVE | | +--------------------------------------+-----------------+--------+--------+