Install and configure controller nodeThis section describes how to install and configure the Compute
service, code-named nova, on the controller node.To configure prerequisitesBefore you install and configure Compute, you must create a database
and Identity service credentials including endpoints.To create the database, complete these steps:Use the database access client to connect to the database
server as the root user:$mysql -u root -pCreate the nova database:mysql>CREATE DATABASE nova;Grant proper access to the nova
database: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';Replace NOVA_DBPASS with a suitable
password.Exit the database access client:mysql>exitSource the admin credentials to gain access to
admin-only CLI commands:$source admin-openrc.shTo create the Identity service credentials, complete these
steps:Create the nova user:$keystone user-create --name=nova --pass=NOVA_PASS --email=EMAIL_ADDRESSReplace NOVA_PASS with a suitable
password and EMAIL_ADDRESS with
a suitable e-mail address.Link the nova user to the
service tenant and admin
role:$keystone user-role-add --user=nova --tenant=service --role=adminCreate the nova service:$keystone service-create --name=nova --type=compute --description="OpenStack Compute"Create the Compute service endpoints:$keystone endpoint-create \
--service-id=$(keystone service-list | awk '/ compute / {print $2}') \
--publicurl=http://controller:8774/v2/%\(tenant_id\)s \
--internalurl=http://controller:8774/v2/%\(tenant_id\)s \
--adminurl=http://controller:8774/v2/%\(tenant_id\)sTo install and configure Compute controller componentsInstall the packages:#apt-get install nova-api nova-cert nova-conductor nova-consoleauth \
nova-novncproxy nova-scheduler python-novaclient#yum install openstack-nova-api openstack-nova-cert openstack-nova-conductor \
openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler \
python-novaclient#zypper install openstack-nova-api openstack-nova-scheduler \
openstack-nova-cert openstack-nova-conductor openstack-nova-console \
openstack-nova-consoleauth openstack-nova-novncproxy python-novaclientEdit the /etc/nova/nova.conf file and
complete the following actions:In the [database] section, configure
database access:[database]
...
connection = mysql://nova:NOVA_DBPASS@controller/novaReplace NOVA_DBPASS with the
password you chose for the Compute database.In the [DEFAULT] section, configure
RabbitMQ message broker access:[DEFAULT]
...
rpc_backend = rabbit
rabbit_host = controller
rabbit_password = RABBIT_PASSReplace RABBIT_PASS with the
password you chose for the guest account in
RabbitMQ.In the [keystone_authtoken] section,
configure Identity service access:
[keystone_authtoken]
...
auth_uri = http://controller:5000/v2.0
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = NOVA_PASSReplace NOVA_PASS with the password
you chose for the nova user in the Identity
service.In the [DEFAULT] section, configure the
my_ip key to use the management interface IP
address of the controller node:[DEFAULT]
...
my_ip = 10.0.0.11In the [DEFAULT] section, configure the
VNC proxy to use the management interface IP address of the
controller node:[DEFAULT]
...
vncserver_listen = 10.0.0.11
vncserver_proxyclient_address = 10.0.0.11In the [DEFAULT] section, configure the
location of the Image Service:[DEFAULT]
...
glance_host = controllerPopulate the Compute database:#su -s /bin/sh -c "nova-manage db sync" novaTo install and configure the Compute controller componentsInstall the packages:#apt-get install nova-api nova-cert nova-conductor nova-consoleauth \
nova-novncproxy nova-scheduler python-novaclientRespond to prompts for
database management,
Identity service
credentials,
service endpoint
registration, and
message broker
credentials.Edit the /etc/nova/nova.conf file and
complete the following actions:In the [DEFAULT] section, configure the VNC
proxy to use the management interface IP address of the controller
node:[DEFAULT]
...
vncserver_listen = 10.0.0.11
vncserver_proxyclient_address = 10.0.0.11To finalize installationRestart the 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 restartStart the Compute services and configure them to start when the
system boots:#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 onBy default, the Ubuntu packages create an SQLite database.Because this configuration uses a SQL database server, you can
remove the SQLite database file:#rm /var/lib/nova/nova.sqlite