416fb8b288
This patch contains fixes based on testing the install guide for ubuntu. The following chapters have been confirmed under Ubuntu 2 Basic Operating System Configuration 3 Configuring Identity Service 4 Configuring Image Service 6. Adding a dashboard Currently testing: 5 Configuring the Compute Services The following sections are verified OK: Installing the Nova Controller Services. It cannot verify the full chapter as the networking section does not exist. Change-Id: I6d1f1ae7e1ef78b56be3481c5a17ebed883cb7f1
231 lines
13 KiB
XML
231 lines
13 KiB
XML
<section xmlns="http://docbook.org/ns/docbook"
|
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
version="5.0"
|
|
xml:id="nova-controller">
|
|
<title>Installing the Nova Controller Services</title>
|
|
|
|
<para>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.</para>
|
|
<procedure>
|
|
<title>Install the Nova Controller Services</title>
|
|
<step>
|
|
<para os="fedora;rhel;centos">Install the <literal>openstack-nova</literal>
|
|
meta-package. This package installs all of the various Compute packages, most of
|
|
which will be used on the controller node in this guide.</para>
|
|
|
|
<screen os="fedora;rhel;centos"><prompt>#</prompt> <userinput>yum install openstack-nova python-novaclient</userinput></screen>
|
|
|
|
<para os="ubuntu;debian;opensuse">Install the following Nova packages. These packages provide
|
|
the OpenStack Compute services that will be run on the controller node in this
|
|
guide.</para>
|
|
|
|
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install nova-novncproxy novnc nova-api nova-ajax-console-proxy nova-cert \
|
|
nova-conductor nova-consoleauth nova-doc nova-scheduler nova-network python-novaclient</userinput></screen>
|
|
<screen os="opensuse"><prompt>#</prompt> <userinput>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</userinput></screen>
|
|
</step>
|
|
|
|
<step>
|
|
<para>The Compute Service stores information in a database. This guide uses
|
|
the MySQL database used by other OpenStack services.</para>
|
|
<para os="fedora;rhel;centos;opensuse"> Use the
|
|
<command>openstack-db</command> command to create the database and tables
|
|
for the Compute Service, as well as a database user called
|
|
<literal>nova</literal> to connect to the database. Replace
|
|
<literal><replaceable>NOVA_DBPASS</replaceable></literal> with a
|
|
password of your choosing.</para>
|
|
<screen os="fedora;rhel;centos;opensuse"><prompt>#</prompt> <userinput>openstack-db --init --service nova --password <replaceable>NOVA_DBPASS</replaceable></userinput></screen>
|
|
<para os="ubuntu;debian">Edit <filename>/etc/nova/nova.conf</filename> and add the <literal>[database]</literal> section.</para>
|
|
<programlisting os="ubuntu;debian" language="ini">
|
|
...
|
|
[database]
|
|
# The SQLAlchemy connection string used to connect to the database
|
|
connection = mysql://nova:NOVA_DBPASS@controller/nova
|
|
</programlisting>
|
|
</step>
|
|
<step os="ubuntu;debian">
|
|
<para>Next, we need to create a database user called <literal>nova</literal>, by logging in
|
|
as root using the password we set earlier.</para>
|
|
<screen><prompt>#</prompt> <userinput>mysql -u root -p</userinput>
|
|
<prompt>mysql></prompt> <userinput>CREATE DATABASE nova;</userinput>
|
|
<prompt>mysql></prompt> <userinput>GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' \
|
|
IDENTIFIED BY 'NOVA_DBPASS';</userinput></screen>
|
|
</step>
|
|
<step os="ubuntu;debian">
|
|
<para>We now create the tables for the nova service.</para>
|
|
<screen><prompt>#</prompt> <userinput>nova-manage db sync</userinput></screen>
|
|
</step>
|
|
|
|
<step os="fedora;rhel;centos;opensuse">
|
|
<para>Tell the Compute Service to use the created database.</para>
|
|
|
|
<screen><prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf \
|
|
database connection mysql://nova:<replaceable>NOVA_DBPASS</replaceable>@controller/nova</userinput></screen>
|
|
|
|
</step>
|
|
<step>
|
|
<para>Set the configuration keys <literal>my_ip</literal>,
|
|
<literal>vncserver_listen</literal>, and
|
|
<literal>vncserver_proxyclient_address</literal> to the internal IP address of the
|
|
controller node.</para>
|
|
|
|
<screen os="fedora;rhel;centos;opensuse"><prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT my_ip 192.168.0.10</userinput>
|
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_listen 192.168.0.10</userinput>
|
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_proxyclient_address 192.168.0.10</userinput></screen>
|
|
<para os="ubuntu;debian">Edit <filename>/etc/nova/nova.conf</filename> and add to the <literal>[DEFAULT]</literal> section.</para>
|
|
<programlisting os="ubuntu;debian" language="ini">
|
|
...
|
|
[DEFAULT]
|
|
...
|
|
my_ip=192.168.0.10
|
|
vncserver_listen=192.168.0.10
|
|
vncserver_proxyclient_address=192.168.0.10
|
|
</programlisting>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
<para>Create a user called <literal>nova</literal> that the Compute Service
|
|
can use to authenticate with the Identity Service. Use the
|
|
<literal>service</literal> tenant and give the user the
|
|
<literal>admin</literal> role.</para>
|
|
|
|
<screen><prompt>#</prompt> <userinput>keystone user-create --name=nova --pass=<replaceable>NOVA_DBPASS</replaceable> --email=<replaceable>nova@example.com</replaceable></userinput>
|
|
<prompt>#</prompt> <userinput>keystone user-role-add --user=nova --tenant=service --role=admin</userinput></screen>
|
|
</step>
|
|
<step>
|
|
<para>For the Compute Service to use these credentials, you must alter the <filename>nova.conf</filename> configuration file.</para>
|
|
<!-- FIXME don't think this is necessary - now happens in api-paste.ini -->
|
|
<screen os="fedora;rhel;centos;opensuse"><prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT auth_strategy keystone</userinput>
|
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT auth_host <replaceable>controller</replaceable></userinput>
|
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT admin_user nova</userinput>
|
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT admin_tenant_name service</userinput>
|
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT admin_password <replaceable>NOVA_DBPASS</replaceable></userinput></screen>
|
|
<para os="ubuntu;debian">Edit <filename>/etc/nova/nova.conf</filename> and add to the <literal>[DEFAULT]</literal> section.</para>
|
|
<programlisting os="ubuntu;debian" language="ini">
|
|
...
|
|
[DEFAULT]
|
|
...
|
|
auth_strategy=keystone
|
|
</programlisting>
|
|
|
|
|
|
|
|
</step>
|
|
|
|
<step>
|
|
<para>Add the credentials to the file
|
|
<filename>/etc/nova/api-paste.ini</filename>. Open the file in a text editor
|
|
and locate the section <literal>[filter:authtoken]</literal>.
|
|
Make sure the following options are set:</para>
|
|
|
|
<programlisting language="ini">[filter:authtoken]
|
|
paste.filter_factory=keystoneclient.middleware.auth_token:filter_factory
|
|
auth_host=<replaceable>controller</replaceable>
|
|
admin_tenant_name=service
|
|
admin_user=nova
|
|
admin_password=<replaceable>NOVA_DBPASS</replaceable>
|
|
</programlisting>
|
|
<note os="fedora;rhel;centos;opensuse;debian"><para>Ensure that <literal>api_paste_config=/etc/nova/api-paste.ini</literal>
|
|
is set in <filename>/etc/nova/nova.conf</filename>.</para></note>
|
|
</step>
|
|
<step>
|
|
|
|
<para>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 <command>keystone</command> command.</para>
|
|
|
|
<screen><prompt>#</prompt> <userinput>keystone service-create --name=nova --type=compute \
|
|
--description="Nova Compute Service"</userinput></screen>
|
|
</step>
|
|
|
|
<step><para>Note the <literal>id</literal> property returned and use it when
|
|
creating the endpoint.</para>
|
|
<screen><prompt>#</prompt> <userinput>keystone endpoint-create \
|
|
--service-id=<replaceable>the_service_id_above</replaceable> \
|
|
--publicurl=http://<replaceable>controller</replaceable>:8774/v2/%\(tenant_id\)s \
|
|
--internalurl=http://<replaceable>controller</replaceable>:8774/v2/%\(tenant_id\)s \
|
|
--adminurl=http://<replaceable>controller</replaceable>:8774/v2/%\(tenant_id\)s</userinput></screen>
|
|
|
|
</step>
|
|
<step os="fedora;rhel;centos">
|
|
<para>Configure the Compute Service to use the
|
|
Qpid message broker by setting the following configuration keys.</para>
|
|
|
|
<screen><prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf \
|
|
DEFAULT rpc_backend nova.openstack.common.rpc.impl_qpid</userinput>
|
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT qpid_hostname <replaceable>controller</replaceable></userinput>
|
|
</screen>
|
|
</step>
|
|
|
|
<step os="ubuntu;debian">
|
|
<para>Configure the Compute Service to use the RabbitMQ
|
|
message broker by setting the following configuration keys. Add them in the <literal>DEFAULT</literal> configuration group of the
|
|
<filename>/etc/nova/nova.conf</filename> file.</para>
|
|
<screen>rpc_backend = nova.rpc.impl_kombu
|
|
rabbit_host = controller</screen>
|
|
</step>
|
|
<step os="opensuse">
|
|
<para>Configure the Compute Service to use the RabbitMQ
|
|
message broker by setting the following configuration keys.</para>
|
|
<screen><prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf \
|
|
DEFAULT rpc_backend nova.rpc.impl_kombu</userinput>
|
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT rabbit_host controller</userinput></screen>
|
|
</step>
|
|
<step>
|
|
<para os="centos;fedora;rhel;opensuse">Finally, start the various Nova services and configure them
|
|
to start when the system boots.</para>
|
|
<para os="ubuntu;debian">Finally, restart the various Nova services.</para>
|
|
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>service nova-api start</userinput>
|
|
<prompt>#</prompt> <userinput>service nova-cert restart</userinput>
|
|
<prompt>#</prompt> <userinput>service nova-consoleauth restart</userinput>
|
|
<prompt>#</prompt> <userinput>service nova-scheduler restart</userinput>
|
|
<prompt>#</prompt> <userinput>service nova-conductor restart</userinput>
|
|
<prompt>#</prompt> <userinput>service nova-novncproxy restart</userinput></screen>
|
|
<screen os='centos;rhel;fedora'><prompt>#</prompt> <userinput>service openstack-nova-api start</userinput>
|
|
<prompt>#</prompt> <userinput>service openstack-nova-cert start</userinput>
|
|
<prompt>#</prompt> <userinput>service openstack-nova-consoleauth start</userinput>
|
|
<prompt>#</prompt> <userinput>service openstack-nova-scheduler start</userinput>
|
|
<prompt>#</prompt> <userinput>service openstack-nova-conductor start</userinput>
|
|
<prompt>#</prompt> <userinput>service openstack-nova-novncproxy start</userinput>
|
|
<prompt>#</prompt> <userinput>chkconfig openstack-nova-api on</userinput>
|
|
<prompt>#</prompt> <userinput>chkconfig openstack-nova-cert on</userinput>
|
|
<prompt>#</prompt> <userinput>chkconfig openstack-nova-consoleauth on</userinput>
|
|
<prompt>#</prompt> <userinput>chkconfig openstack-nova-scheduler on</userinput>
|
|
<prompt>#</prompt> <userinput>chkconfig openstack-nova-conductor on</userinput>
|
|
<prompt>#</prompt> <userinput>chkconfig openstack-nova-novncproxy on</userinput></screen>
|
|
<screen os="opensuse"><prompt>#</prompt> <userinput>systemctl start openstack-nova-api.service</userinput>
|
|
<prompt>#</prompt> <userinput>systemctl start openstack-nova-cert.service</userinput>
|
|
<prompt>#</prompt> <userinput>systemctl start openstack-nova-consoleauth.service</userinput>
|
|
<prompt>#</prompt> <userinput>systemctl start openstack-nova-scheduler.service</userinput>
|
|
<prompt>#</prompt> <userinput>systemctl start openstack-nova-conductor.service</userinput>
|
|
<prompt>#</prompt> <userinput>systemctl start openstack-nova-novncproxy.service</userinput>
|
|
<prompt>#</prompt> <userinput>systemctl enable openstack-nova-api.service</userinput>
|
|
<prompt>#</prompt> <userinput>systemctl enable openstack-nova-cert.service</userinput>
|
|
<prompt>#</prompt> <userinput>systemctl enable openstack-nova-consoleauth.service</userinput>
|
|
<prompt>#</prompt> <userinput>systemctl enable openstack-nova-scheduler.service</userinput>
|
|
<prompt>#</prompt> <userinput>systemctl enable openstack-nova-conductor.service</userinput>
|
|
<prompt>#</prompt> <userinput>systemctl enable openstack-nova-novncproxy.service</userinput></screen>
|
|
</step>
|
|
<step>
|
|
<para>To verify that everything is configured correctly, use the
|
|
<command>nova image-list</command> to get a list of available images. The
|
|
output is similar to the output of <command>glance image-list</command>.</para>
|
|
|
|
<screen><prompt>#</prompt> <userinput>nova image-list</userinput>
|
|
<computeroutput>+--------------------------------------+-----------------+--------+--------+
|
|
| ID | Name | Status | Server |
|
|
+--------------------------------------+-----------------+--------+--------+
|
|
| acafc7c0-40aa-4026-9673-b879898e1fc2 | CirrOS 0.3.1 | ACTIVE | |
|
|
+--------------------------------------+-----------------+--------+--------+</computeroutput></screen>
|
|
</step>
|
|
</procedure>
|
|
</section>
|