591552a786
Fix this warning that appears with openstack version 1.0.3: # openstack service create --type identity --description "OpenStack Identity" keystone WARNING: openstackclient.identity.v2_0.service.CreateService The argument --type is deprecated, use service create --name <service-name> type instead. Note that the order is different, previously "--type TYPE NAME" and now "--name NAME TYPE". partially implements: blueprint installguide-kilo Closes-Bug: #1453883 Closes-Bug: #1453891 Co-Authored-By: Christian Berendt <berendt@b1-systems.de> Co-Authored-By: Flávio Ramalho <flaviosr@lsd.ufcg.edu.br> Change-Id: I72f89defd7f55ce2822b5b511280f40196361f68
287 lines
14 KiB
XML
287 lines
14 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
|
|
service requires at least one additional storage node that provides
|
|
volumes to instances.</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, service credentials, and API endpoint.</para>
|
|
<step>
|
|
<para>To create the database, complete these steps:</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><userinput>CREATE DATABASE cinder;</userinput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Grant proper access to the <literal>cinder</literal>
|
|
database:</para>
|
|
<screen><userinput>GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' \
|
|
IDENTIFIED BY '<replaceable>CINDER_DBPASS</replaceable>';</userinput>
|
|
<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>
|
|
</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 service credentials, complete these steps:</para>
|
|
<substeps>
|
|
<step>
|
|
<para>Create a <literal>cinder</literal> user:</para>
|
|
<screen><prompt>$</prompt> <userinput>openstack user create --password-prompt cinder</userinput>
|
|
<computeroutput>User Password:
|
|
Repeat User Password:
|
|
+----------+----------------------------------+
|
|
| Field | Value |
|
|
+----------+----------------------------------+
|
|
| email | None |
|
|
| enabled | True |
|
|
| id | 881ab2de4f7941e79504a759a83308be |
|
|
| name | cinder |
|
|
| username | cinder |
|
|
+----------+----------------------------------+</computeroutput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Add the <literal>admin</literal> role to the
|
|
<literal>cinder</literal> user:</para>
|
|
<screen><prompt>$</prompt> <userinput>openstack role add --project service --user cinder admin</userinput>
|
|
<computeroutput>+-------+----------------------------------+
|
|
| Field | Value |
|
|
+-------+----------------------------------+
|
|
| id | cd2cb9a39e874ea69e5d4b896eb16128 |
|
|
| name | admin |
|
|
+-------+----------------------------------+</computeroutput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Create the <literal>cinder</literal> service entities:</para>
|
|
<screen><prompt>$</prompt> <userinput>openstack service create --name cinder \
|
|
--description "OpenStack Block Storage" volume</userinput>
|
|
<computeroutput>+-------------+----------------------------------+
|
|
| Field | Value |
|
|
+-------------+----------------------------------+
|
|
| description | OpenStack Block Storage |
|
|
| enabled | True |
|
|
| id | 1e494c3e22a24baaafcaf777d4d467eb |
|
|
| name | cinder |
|
|
| type | volume |
|
|
+-------------+----------------------------------+</computeroutput></screen>
|
|
<screen><prompt>$</prompt> <userinput>openstack service create --name cinderv2 \
|
|
--description "OpenStack Block Storage" volumev2</userinput>
|
|
<computeroutput>+-------------+----------------------------------+
|
|
| Field | Value |
|
|
+-------------+----------------------------------+
|
|
| description | OpenStack Block Storage |
|
|
| enabled | True |
|
|
| id | 16e038e449c94b40868277f1d801edb5 |
|
|
| name | cinderv2 |
|
|
| type | volumev2 |
|
|
+-------------+----------------------------------+</computeroutput></screen>
|
|
<note>
|
|
<para>The Block Storage service requires both the
|
|
<literal>volume</literal> and <literal>volumev2</literal>
|
|
services. However, both services use the same API
|
|
endpoint that references the Block Storage version 2 API.</para>
|
|
</note>
|
|
</step>
|
|
</substeps>
|
|
</step>
|
|
<step>
|
|
<para>Create the Block Storage service API endpoints:</para>
|
|
<screen><prompt>$</prompt> <userinput>openstack endpoint create \
|
|
--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 \
|
|
--region RegionOne \
|
|
volume</userinput>
|
|
<computeroutput>+--------------+-----------------------------------------+
|
|
| Field | Value |
|
|
+--------------+-----------------------------------------+
|
|
| adminurl | http://controller:8776/v2/%(tenant_id)s |
|
|
| id | d1b7291a2d794e26963b322c7f2a55a4 |
|
|
| internalurl | http://controller:8776/v2/%(tenant_id)s |
|
|
| publicurl | http://controller:8776/v2/%(tenant_id)s |
|
|
| region | RegionOne |
|
|
| service_id | 1e494c3e22a24baaafcaf777d4d467eb |
|
|
| service_name | cinder |
|
|
| service_type | volume |
|
|
+--------------+-----------------------------------------+</computeroutput></screen>
|
|
<screen><prompt>$</prompt> <userinput>openstack endpoint create \
|
|
--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 \
|
|
--region RegionOne \
|
|
volumev2</userinput>
|
|
<computeroutput>+--------------+-----------------------------------------+
|
|
| Field | Value |
|
|
+--------------+-----------------------------------------+
|
|
| adminurl | http://controller:8776/v2/%(tenant_id)s |
|
|
| id | 097b4a6fc8ba44b4b10d4822d2d9e076 |
|
|
| internalurl | http://controller:8776/v2/%(tenant_id)s |
|
|
| publicurl | http://controller:8776/v2/%(tenant_id)s |
|
|
| region | RegionOne |
|
|
| service_id | 16e038e449c94b40868277f1d801edb5 |
|
|
| service_name | cinderv2 |
|
|
| service_type | volumev2 |
|
|
+--------------+-----------------------------------------+</computeroutput></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 python-oslo-db</userinput></screen>
|
|
<screen os="sles;opensuse"><prompt>#</prompt> <userinput>zypper install openstack-cinder-api openstack-cinder-scheduler python-cinderclient</userinput></screen>
|
|
</step>
|
|
<step>
|
|
<!-- Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1212900. -->
|
|
<para os="rhel;centos;fedora">Copy the <filename>/usr/share/cinder/cinder-dist.conf</filename> file
|
|
to <filename>/etc/cinder/cinder.conf</filename>.</para>
|
|
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>cp /usr/share/cinder/cinder-dist.conf /etc/cinder/cinder.conf</userinput>
|
|
<prompt>#</prompt> <userinput>chown -R cinder:cinder /etc/cinder/cinder.conf</userinput></screen>
|
|
<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> and
|
|
<literal>[oslo_messaging_rabbit]</literal> sections, configure
|
|
<application>RabbitMQ</application> message queue access:</para>
|
|
<programlisting language="ini">[DEFAULT]
|
|
...
|
|
rpc_backend = rabbit
|
|
|
|
[oslo_messaging_rabbit]
|
|
...
|
|
rabbit_host = <replaceable>controller</replaceable>
|
|
rabbit_userid = openstack
|
|
rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>
|
|
<para>Replace <replaceable>RABBIT_PASS</replaceable> with the
|
|
password you chose for the <literal>openstack</literal> account in
|
|
<application>RabbitMQ</application>.</para>
|
|
</step>
|
|
<step>
|
|
<para>In the <literal>[DEFAULT]</literal> and
|
|
<literal>[keystone_authtoken]</literal> sections,
|
|
configure Identity service access:</para>
|
|
<programlisting language="ini">[DEFAULT]
|
|
...
|
|
auth_strategy = keystone
|
|
|
|
[keystone_authtoken]
|
|
...
|
|
auth_uri = http://<replaceable>controller</replaceable>:5000
|
|
auth_url = http://<replaceable>controller</replaceable>:35357
|
|
auth_plugin = password
|
|
project_domain_id = default
|
|
user_domain_id = default
|
|
project_name = service
|
|
username = cinder
|
|
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 or remove any other options in the
|
|
<literal>[keystone_authtoken]</literal> section.</para>
|
|
</note>
|
|
</step>
|
|
<step>
|
|
<para>In the <literal>[DEFAULT]</literal> section, configure the
|
|
<literal>my_ip</literal> option to use the management interface IP
|
|
address of the controller node:</para>
|
|
<programlisting language="ini">[DEFAULT]
|
|
...
|
|
my_ip = 10.0.0.11</programlisting>
|
|
</step>
|
|
<step>
|
|
<para>In the <literal>[oslo_concurrency]</literal> section,
|
|
configure the lock path:</para>
|
|
<programlisting language="ini">[oslo_concurrency]
|
|
...
|
|
lock_path = /var/lock/cinder</programlisting>
|
|
</step>
|
|
<step>
|
|
<para>(Optional) To assist with troubleshooting,
|
|
enable verbose logging in the <literal>[DEFAULT]</literal>
|
|
section:</para>
|
|
<programlisting language="ini">[DEFAULT]
|
|
...
|
|
verbose = True</programlisting>
|
|
</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>systemctl enable openstack-cinder-api.service openstack-cinder-scheduler.service</userinput>
|
|
<prompt>#</prompt> <userinput>systemctl start openstack-cinder-api.service openstack-cinder-scheduler.service</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, you can
|
|
remove the SQLite database file:</para>
|
|
<screen><prompt>#</prompt> <userinput>rm -f /var/lib/cinder/cinder.sqlite</userinput></screen>
|
|
</step>
|
|
</procedure>
|
|
</section>
|