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 Nova Controller Services Install the openstack-nova meta-package. This package installs all of the various Compute packages, most of which will be used on the controller node in this guide. # yum install openstack-nova python-novaclient 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 # apt-get install nova-consoleproxy nova-api \ nova-cert nova-conductor nova-consoleauth nova-scheduler # zypper install openstack-nova-api openstack-nova-scheduler \ openstack-nova-cert openstack-nova-conductor openstack-nova-console \ openstack-nova-consoleauth openstack-nova-doc \ openstack-nova-novncproxy python-novaclient Answer to the debconf prompts to configure the Nova Controller Services. This includes configuring the database, the keystone_autotoken, the RabbitMQ credentials, and registering nova-api in the Keystone catalogue. The nova-manage db sync will then be done for you automatically. The Compute Service stores information in a database. This guide uses the MySQL database used by other OpenStack services. Specify the location of the database in the configuration files. Replace NOVA_DBPASS with a Compute Service password of your choosing. # openstack-config --set /etc/nova/nova.conf \ database connection mysql://nova:NOVA_DBPASS@controller/nova Edit /etc/nova/nova.conf and add the [database] section. ... [database] # The SQLAlchemy connection string used to connect to the database connection = mysql://nova:NOVA_DBPASS@controller/nova Use the openstack-db command to create the Compute Service database and tables and a nova database user. # openstack-db --init --service nova --password NOVA_DBPASS Next, we need to create a database user called nova, 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'; mysql> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' \ IDENTIFIED BY 'NOVA_DBPASS'; We now create the tables for the nova service. # nova-manage db sync Set the configuration keys my_ip, vncserver_listen, and vncserver_proxyclient_address to the internal 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 Edit /etc/nova/nova.conf and add to the [DEFAULT] section. Under Debian, the my_ip parameter will be automatically setup by the debconf system, but you still need to edit /etc/nova/nova.conf for the vncserver_listen and vncserver_proxyclient_address, which are located at the end of the file. ... [DEFAULT] ... my_ip=192.168.0.10 vncserver_listen=192.168.0.10 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 must alter 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 Edit /etc/nova/nova.conf and add to the [DEFAULT] section. ... [DEFAULT] ... auth_strategy=keystone 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 auth_uri=http://controller:5000 admin_tenant_name=service admin_user=nova admin_password=NOVA_PASS Ensure that api_paste_config=/etc/nova/api-paste.ini is set in /etc/nova/nova.conf. 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. Add them 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. Finally, restart the various Nova 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 # 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 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 | | +--------------------------------------+-----------------+--------+--------+