
Replaced [keystone_authtoken] auth_* options with identity_uri option. This patch supersedes #125847 and no longer conflicts with #120332. Change-Id: I81cd29b5bb0d75ced2f319aa1438774a3b133c0a Co-Authored-By: Matt Kassawara <mkassawara@gmail.com>
190 lines
9.6 KiB
XML
190 lines
9.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<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="cinder-install-controller-node">
|
|
<title>Install and configure controller node</title>
|
|
<para>This section describes how to install and configure the Block
|
|
Storage service, code-named cinder, on the controller node. This
|
|
optional service requires at least one additional node to provide
|
|
storage volumes created by the
|
|
<glossterm baseform="Logical Volume Manager (LVM)"
|
|
>logical volume manager (LVM)</glossterm>
|
|
and served over
|
|
<glossterm baseform="Internet Small Computer System Interface (iSCSI)"
|
|
>iSCSI</glossterm> transport.</para>
|
|
<procedure os="ubuntu;rhel;centos;fedora;sles;opensuse">
|
|
<title>To configure prerequisites</title>
|
|
<para>Before you install and configure the Block Storage service, you must
|
|
create a database and Identity service credentials including
|
|
endpoints.</para>
|
|
<step>
|
|
<para>To create the database:</para>
|
|
<substeps>
|
|
<step>
|
|
<para>Use the database access client to connect to the database
|
|
server as the <literal>root</literal> user:</para>
|
|
<screen><prompt>$</prompt> <userinput>mysql -u root -p</userinput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Create the <literal>cinder</literal> database:</para>
|
|
<screen><prompt>mysql></prompt> <userinput>CREATE DATABASE cinder;</userinput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Grant proper access to the <literal>cinder</literal>
|
|
database:</para>
|
|
<screen><prompt>mysql></prompt> <userinput>GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' IDENTIFIED BY '<replaceable>CINDER_DBPASS</replaceable>';</userinput>
|
|
<prompt>mysql></prompt> <userinput>GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY '<replaceable>CINDER_DBPASS</replaceable>';</userinput></screen>
|
|
<para>Replace <replaceable>CINDER_DBPASS</replaceable> with
|
|
a suitable password.</para>
|
|
</step>
|
|
<step>
|
|
<para>Exit the database access client:</para>
|
|
<screen><prompt>mysql></prompt> <userinput>exit</userinput></screen>
|
|
</step>
|
|
</substeps>
|
|
</step>
|
|
<step>
|
|
<para>Source the <literal>admin</literal> credentials to gain access to
|
|
admin-only CLI commands:</para>
|
|
<screen><prompt>$</prompt> <userinput>source admin-openrc.sh</userinput></screen>
|
|
</step>
|
|
<step>
|
|
<para>To create the Identity service credentials:</para>
|
|
<substeps>
|
|
<step>
|
|
<para>Create a <literal>cinder</literal> user:</para>
|
|
<screen><prompt>$</prompt> <userinput>keystone user-create --name cinder --pass <replaceable>CINDER_PASS</replaceable> --email <replaceable>EMAIL_ADDRESS</replaceable></userinput></screen>
|
|
<para>Replace <replaceable>CINDER_PASS</replaceable> with a suitable
|
|
password and <replaceable>EMAIL_ADDRESS</replaceable> with
|
|
a suitable e-mail address.</para>
|
|
</step>
|
|
<step>
|
|
<para>Link the <literal>cinder</literal> user to the
|
|
<literal>service</literal> tenant and <literal>admin</literal>
|
|
role:</para>
|
|
<screen><prompt>$</prompt> <userinput>keystone user-role-add --user cinder --tenant service --role admin</userinput></screen>
|
|
</step>
|
|
</substeps>
|
|
</step>
|
|
<step>
|
|
<para>Create the Block Storage service (version 1 API) endpoints:</para>
|
|
<screen><prompt>$</prompt> <userinput>keystone service-create --name cinder --type volume --description "OpenStack Block Storage"</userinput>
|
|
<prompt>$</prompt> <userinput>keystone endpoint-create \
|
|
--service-id $(keystone service-list | awk '/ volume / {print $2}') \
|
|
--publicurl http://<replaceable>controller</replaceable>:8776/v1/%\(tenant_id\)s \
|
|
--internalurl http://<replaceable>controller</replaceable>:8776/v1/%\(tenant_id\)s \
|
|
--adminurl http://<replaceable>controller</replaceable>:8776/v1/%\(tenant_id\)s</userinput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Create the Block Storage service (version 2 API) endpoints:</para>
|
|
<screen><prompt>$</prompt> <userinput>keystone service-create --name cinderv2 --type volumev2 --description "OpenStack Block Storage v2"</userinput>
|
|
<prompt>$</prompt> <userinput>keystone endpoint-create \
|
|
--service-id $(keystone service-list | awk '/ volumev2 / {print $2}') \
|
|
--publicurl http://<replaceable>controller</replaceable>:8776/v2/%\(tenant_id\)s \
|
|
--internalurl http://<replaceable>controller</replaceable>:8776/v2/%\(tenant_id\)s \
|
|
--adminurl http://<replaceable>controller</replaceable>:8776/v2/%\(tenant_id\)s</userinput></screen>
|
|
</step>
|
|
</procedure>
|
|
<procedure os="ubuntu;rhel;centos;fedora;sles;opensuse">
|
|
<title>To install and configure Block Storage controller components</title>
|
|
<step>
|
|
<para>Install the packages:</para>
|
|
<screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install cinder-api cinder-scheduler python-cinderclient</userinput></screen>
|
|
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install openstack-cinder python-cinderclient</userinput></screen>
|
|
<screen os="sles;opensuse"><prompt>#</prompt> <userinput>zypper install openstack-cinder-api openstack-cinder-scheduler python-cinderclient</userinput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Edit the <filename>/etc/cinder/cinder.conf</filename> file and
|
|
complete the following actions:</para>
|
|
<substeps>
|
|
<step>
|
|
<para>In the <literal>[database]</literal> section, configure
|
|
database access:</para>
|
|
<programlisting language="ini">[database]
|
|
...
|
|
connection = mysql://cinder:<replaceable>CINDER_DBPASS</replaceable>@controller/cinder</programlisting>
|
|
<para>Replace <replaceable>CINDER_DBPASS</replaceable> with the
|
|
password you chose for the Block Storage database.</para>
|
|
</step>
|
|
<step>
|
|
<para>In the <literal>[DEFAULT]</literal> section, configure
|
|
<application>RabbitMQ</application> message broker access:</para>
|
|
<programlisting language="ini">[DEFAULT]
|
|
...
|
|
rpc_backend = rabbit
|
|
rabbit_host = <replaceable>controller</replaceable>
|
|
rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>
|
|
<para>Replace <replaceable>RABBIT_PASS</replaceable> with the
|
|
password you chose for the <literal>guest</literal> account in
|
|
<application>RabbitMQ</application>.</para>
|
|
</step>
|
|
<step>
|
|
<para>In the <literal>[keystone_authtoken]</literal> section,
|
|
configure Identity service access:</para>
|
|
<programlisting language="ini">[keystone_authtoken]
|
|
...
|
|
auth_uri = http://<replaceable>controller</replaceable>:5000/v2.0
|
|
identity_uri = http://<replaceable>controller</replaceable>:35357
|
|
admin_tenant_name = service
|
|
admin_user = cinder
|
|
admin_password = <replaceable>CINDER_PASS</replaceable></programlisting>
|
|
<para>Replace <replaceable>CINDER_PASS</replaceable> with the
|
|
password you chose for the <literal>cinder</literal> user in the
|
|
Identity service.</para>
|
|
<note>
|
|
<para>Comment out any <literal>auth_host</literal>,
|
|
<literal>auth_port</literal>, and
|
|
<literal>auth_protocol</literal> options because the
|
|
<literal>identity_uri</literal> option replaces them.</para>
|
|
</note>
|
|
</step>
|
|
</substeps>
|
|
</step>
|
|
<step>
|
|
<para>Populate the Block Storage database:</para>
|
|
<screen><prompt>#</prompt> <userinput>su -s /bin/sh -c "cinder-manage db sync" cinder</userinput></screen>
|
|
</step>
|
|
</procedure>
|
|
<procedure os="debian">
|
|
<title>To install and configure Block Storage controller components</title>
|
|
<step>
|
|
<para>Install the packages:</para>
|
|
<screen><prompt>#</prompt> <userinput>apt-get install cinder-api cinder-scheduler python-cinderclient</userinput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Respond to the prompts for
|
|
<link linkend="debconf-dbconfig-common">database management</link>,
|
|
<link linkend="debconf-keystone_authtoken">Identity service
|
|
credentials</link>,
|
|
<link linkend="debconf-api-endpoints">service endpoint
|
|
registration</link>, and
|
|
<link linkend="debconf-rabbitmq">message broker
|
|
credentials</link>.</para>
|
|
</step>
|
|
</procedure>
|
|
<procedure>
|
|
<title>To finalize installation</title>
|
|
<step os="ubuntu;debian">
|
|
<para>Restart the Block Storage services:</para>
|
|
<screen><prompt>#</prompt> <userinput>service cinder-scheduler restart</userinput>
|
|
<prompt>#</prompt> <userinput>service cinder-api restart</userinput></screen>
|
|
</step>
|
|
<step os="rhel;centos;fedora;sles;opensuse">
|
|
<para>Start the Block Storage services and configure them to start when
|
|
the system boots:</para>
|
|
<screen><prompt>#</prompt> <userinput>service openstack-cinder-api start</userinput>
|
|
<prompt>#</prompt> <userinput>service openstack-cinder-scheduler start</userinput>
|
|
<prompt>#</prompt> <userinput>chkconfig openstack-cinder-api on</userinput>
|
|
<prompt>#</prompt> <userinput>chkconfig openstack-cinder-scheduler on</userinput></screen>
|
|
</step>
|
|
<step os="ubuntu">
|
|
<para>By default, the Ubuntu packages create an SQLite database.</para>
|
|
<para>Because this configuration uses a SQL database server, remove
|
|
the SQLite database file:</para>
|
|
<screen><prompt>#</prompt> <userinput>rm -f /var/lib/cinder/cinder.sqlite</userinput></screen>
|
|
</step>
|
|
</procedure>
|
|
</section>
|