Install Compute controller services

Compute is a collection of services that enable you to launch virtual machine instances. You can configure these services to run on separate nodes or the same node. In this guide, most services run on the controller node and the service that launches virtual machines runs on a dedicated compute node. This section shows you how to install and configure these services on the controller node.

  1. Install these Compute packages, which provide the Compute services that run 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
  2. Compute stores information in a database. The examples in this guide use the MySQL database that is used by other OpenStack services.

    Configure the location of the database. Replace NOVA_DBPASS with your Compute service password:

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

    ...
    [database]
    # The SQLAlchemy connection string used to connect to the database
    connection = mysql://nova:NOVA_DBPASS@controller/nova
    [keystone_authtoken]
    auth_host = controller
    auth_port = 35357
    auth_protocol = http
    admin_tenant_name = service
    admin_user = nova
    admin_password = NOVA_PASS
  3. Configure the Compute Service to use the RabbitMQ message broker 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 = controller
    rabbit_password = RABBIT_PASS
  4. 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.

  5. Use the password you created previously to log in as root. Create a nova database user:

    # 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';
  6. Create the Compute service tables:

    # nova-manage db sync
  7. Set the my_ip, vncserver_listen, and vncserver_proxyclient_address configuration options to the internal IP address of the controller node:

    Edit the /etc/nova/nova.conf file and add these lines to the [DEFAULT] section:

    ...
    [DEFAULT]
    ...
    my_ip=192.168.0.10
    vncserver_listen=192.168.0.10
    vncserver_proxyclient_address=192.168.0.10
  8. Create a nova user that Compute uses 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=[email protected]
    # keystone user-role-add --user=nova --tenant=service --role=admin
  9. Configure Compute to use these credentials with the Identity Service running on the controller. Replace NOVA_PASS with your Compute password.

    Edit the [DEFAULT] section in the /etc/nova/nova.conf file to add this key:

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

    [Note]Use of .ini files

    You might sometimes have to edit .ini files during initial setup. However, do not edit these files for general configuration tasks.

    [filter:authtoken]
    paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
    auth_host = controller
    auth_port = 35357
    auth_protocol = http
    auth_uri = http://controller:5000/v2.0
    admin_tenant_name = service
    admin_user = nova
    admin_password = NOVA_PASS
    [Note]Note

    Ensure that the api_paste_config=/etc/nova/api-paste.ini option is set in the /etc/nova/nova.conf file.

  11. 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"
  12. Use the id property that is returned to create 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
  13. 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
  14. To verify your configuration, list available images:

    # nova image-list
    +--------------------------------------+-----------------+--------+--------+
    | ID                                   | Name            | Status | Server |
    +--------------------------------------+-----------------+--------+--------+
    | acafc7c0-40aa-4026-9673-b879898e1fc2 | CirrOS 0.3.1    | ACTIVE |        |
    +--------------------------------------+-----------------+--------+--------+
Log a bug against this page


loading table of contents...